The Linux operating system is more than just a desktop OS. It’s an adaptable and versatile swiss army knife that offers an array of utilities and tools.
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.
Discover what the command line can do for you and how it can help streamline your daily computing routine.
To name a few, the Linux CLI can do the following
Increase Productivity
Automate Tasks
Schedule Services using Cron
Use SSH to Securely Connect To Remote Systems
Customize Desktop Environment Using Settings
Perhaps one of the most common uses for the command line is to customize your desktop environment. For example, you can also use the command line to manage appearance settings for your desktop environment, such as changing the theme, colorway, window borders, and icon theme. This could be done using graphical applications, but the command line is a quick and easy alternative. Furthermore, the settings you manage using the command line can be stored in a custom configuration file so you don’t have to manage everything manually. (More on config as code later)
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, 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 run 0 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.
Furthermore, you can run the command line that uses cron from a script 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 securely 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 4 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.