The Importance of Linux
I have spoken about the power of Linux previously We have discussed the benefits for the Linux command line interface (CLI) and some of the basic commands to know.
Let’s go over just some of the use cases that Linux is great for.
Imagine being able to filter and manipulate data in real-time, just by stringing a few simple commands together. Having your own personal data tool at your fingertips, natively without having to install anything else.
Use Cases
As alluded to in a previous post, one of the most powerful features of the Linux CLI is the ability to chain commands together using pipes "|". This allows you to connect multiple commands together and use the output of one command as the input for another. (Think of links literally being chained together)
Let’s go over a simple example, the command ls -l | grep ".txt"
will list all files ending with "txt" as the extension in a detailed format. This combines the output of ls -l . and grep “.txt”.
Another advanced feature is the use of redirection operators ">" and ">>". These operators allow you to redirect and append output to a file respectively. For example, the command ls -l > filelist.txt
will create a file called "filelist.txt" and write the output of the "ls -l" command to it.
Or the command echo "1, 2, 3" >> filelist.txt
, which will append the text “1, 2, 3” to the file filelist.txt.
There’s also the ; operator, which is used to separate commands. Think of it as a stage manager, letting you run multiple commands in sequence.
For example, echo "a test"; sleep 5 ; echo "a test". This will run the first echo command, sleep for 5 seconds, then run the final echo command.
Regex
Regular expressions with grep is another powerful feature that can be used to search for patterns in text.
For example, the command grep -E "^[A-Z]" file.txt
will search for lines in "file.txt" that start with an uppercase letter. The command grep -E "^[aA-zZ]"
will look for any alphabetical letters, this time case-insensitive.
If you’ve read my previous posts, you can see how regex can come into play often.
Computing
Another use case Linux is greatly used for is computing. This is one that maybe the every day user doesn’t realize, but most apps we use on a day to day basis run on Linux. (That timeline you’re scrolling through at night 😂, it runs on Linux).
As explained in this blog post by the Linux Foundation, over 90% of public cloud instances are running on Linux. This is because this infrastructure is better suited for massive computation.
On the job for any Cybersecurity, DevOps or Engineering related roles, you will be working with more Linux servers than anything else.
These are just some of the powerful abilities of the Linux operating system to discover.
As a reminder, I have a free course available that goes over the fundamentals of Linux.
Check it out here
I hope this helps you understand more in your journey in Cybersecurity.