Linux: The OS of Cybersecurity
The Linux operating system is more than just an OS. It’s an adaptable and versatile swiss army knife that offers a variety of utilities and tools. Generally speaking, its the OS of Cybersecurity.
As we have covered in previous posts, the command line utility is perhaps one of the most useful features in Linux. This post covers more use cases for the command line in Linux.
Let’s go over what the Linux command line can do for you and how you can get the most out of it.
To name a few, the Linux CLI can do the following
Increase Productivity
Automate Tasks
Securely Connect To Remote Systems
Schedule Services using Cron
Run heavy compute
Use the Command Line to Automate Tasks
If you’re looking to automate tasks, you might be interested in automating aspects of your computing routine through the CLI.
For instance, you might want to set up a script that automatically logs in to a system on a certain schedule or that automatically backs up some files and creates a week’s worth of archives. You can also set up scripts to perform daily tasks such as checking for software updates, or performing maintenance tasks, such as clearing old logs, backing up filesystems, or removing old backups.
Manage System Services Using Cron
Another use for the command line is to manage system services using cron. Cron is a system service scheduler that lets you schedule commands to run at certain intervals, such as once per day, once per week, or once per month.
You can specify the time in the future, or the current time. For example, you can run0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
This would run a backup in the form of a tarball at 5:00 UTC every Monday. This is utilized for Security use cases such as running backups or compressing logs on a schedule.
Furthermore, you can run the crontab command line utility that uses cron directly from your terminal or from a script in your automation workflow.
Secure Linux Network Using Firewalld
A great Security use case for the command line is managing the network. Many of the tools available in Linux can be used from the command line to manage network settings, such as the firewall.
For instance, you can quickly check the current settings of the firewall using the firewallconfig
command. You can set up rules to allow or deny certain traffic or alter the priority of traffic. All of this and more is possible with the iptables utility.
It be like that sometimes
Use SSH to Securely Connect To Remote Systems
Another important use of the command line is to securely connect to remote systems using SSH.
SSH is a secure, encrypted protocol that allows you to connect to other systems or run commands on them. You can set up SSH on the remote system so that you can easily connect to it using a command such as ssh username@remote-system. There are a few ways to set up SSH on a remote system. One way is to open up a terminal on the remote computer and type the command ssh -Y username@remote-system
.
These are just 3 ways to utilize Linux to its capabilities. For more on the fundamentals, check out my free course Intro to Linux . It’s only an hour long and I believe you will get a lot of value out of it.
Future posts will be written about each of the mentioned use cases for more detail on how to apply each to get the most out of the OS of Cybersecurity.