The command line isn’t required when using Linux.
To truly maximize your Linux experience, you should still learn it.
Some commands are more useful than others.
Before we begin, I want to be clear: Using the command line is not a requirement for using Linux. I mention this because the idea of typing commands tends to scare off new users, and my goal — for years — has been to introduce people to the open-source operating system, no matter their level.
After using Linux for over two decades, I’m totally comfortable with the command line and tend to default to it for certain things. I do this because I find the terminal more efficient than using a GUI. I can leave a terminal window open at all times and perform tasks without taking my hands off the keyboard.
So, yes, there are certain Linux commands that I can count on using every single day. Those commands help me do the things I do, keep my systems running smoothly, and ensure that I’m informed about what’s happening on my machines.
Of course, everyone’s computing experience is different, so what you need will likely differ from the commands I depend on. That said, here are the nine Linux commands that are almost guaranteed to be run daily from my keyboard.
1. top
I always like to know what’s going on under the hood, especially if I feel as if something has gone awry. When that time comes, top is my command of choice. With top, I can quickly find out how many system resources an app or command is using. On top of that, I can see the PID (process ID) associated with that command or app and use it to kill the app, should it be necessary.
The reason I use top rather than one of the GUI apps is that I can remote into a machine and uncover the information from the terminal. top is fast, easy to use, and never fails me.
To open top, issue the following command:
top
2. ssh
I could make a case for ssh being the most important command on the list. Why? Consider this: sometimes a VM or a background process misbehaves badly enough to make your desktop unusable. When that happens, I can use ssh from another machine to access the system, use top to find out the PID associated with the problematic process, then kill it with kill PID — and I’m all set.
I often have to remote into other machines on my network (or outside of my network) to get certain things done (like updating a server). I also use scp (which is part of the SSH suite) to move files around on my network, so, yeah, ssh is pretty important.
SSH is simple to use. For example, if I want to remote into a server on my LAN, I could issue the following:
ssh stackscale@192.168.2.100
Code language: CSS (css)
3. sudo
This one is probably the command I run most often — because I’m always installing software, updating apps, managing processes and services, and doing all sorts of things that require admin privileges. If it weren’t for sudo, I’d have to first change to the root user, which can be a security issue.
With sudo, I gain temporary admin privileges, can run a command or app, and then know those privileges will be automatically revoked after a set period. sudo was a very smart addition to Linux and continues to be one of the most important commands I’ve ever used.
sudo is simple to use: you just add it to the beginning of any command that requires admin privileges, like so:
sudo apt upgrade -y
4. apt
Given how often I test and review open-source software on Debian/Ubuntu-based distributions, it should come as no surprise that apt is one of my most frequently used commands. The apt package manager simplifies the process of managing applications and even fixing broken installations (sudo apt install -f has saved my hide on several occasions).
Although the GUI frontends for apt are outstanding, there are some things they cannot do (such as apt purge or apt autoremove in a single workflow), which is why I often prefer to manage packages from the command line.
apt is easy. For example, if you want to install GIMP, you’d issue the following command:
sudo apt install gimp -y
5. wget
wget is one of those commands that may not get used every hour, but when it does get used, I remember how important it is. When there’s a file or script I need to download, and there’s no convenient browser-based way to grab it, wget can get the job done.
I use wget regularly, especially when installing server-based software, where the operating system probably doesn’t have a GUI to depend on. With wget, it doesn’t matter if there’s a desktop environment or not; I can still grab whatever I need to get the job done.
Let’s say you want to download the source for the latest release of GIMP. You can do that with:
wget https://download.gimp.org/gimp/v3.0/gimp-3.0.6.tar.xz
Code language: JavaScript (javascript)
6. ps
The ps command is essential if you want to be able to manage running processes and apps. One of the main reasons why I use ps is to track down information about a process. For instance, I might need to know information about the running Zen Browser, and the top command doesn’t give me everything that I need.
To locate the time an app has been running, process IDs, and more, you can use the ps command and pipe the output to the grep command (another important tool we’ll talk about later) to see only the information related to the app you’re interested in.
By using this command, you don’t have to rely on top and then try to snag the process ID as it bounces around in the listing as other services and apps are tracked.
To use ps with grep to find information about Zen Browser, you could issue the command:
ps aux | grep zen
Comb through the output and you should find the information you’re looking for.
7. tail
I frequently review log files to identify and resolve issues with applications or services. Log files contain crucial information that can help you understand what’s going on with your system.
However, just using less simply shows the contents of the entire file. If a log file is lengthy and complicated, that may not be helpful. Additionally, you may want to view entries in a log file as they are written. This is particularly helpful when troubleshooting an issue and you need to view log entries as they occur in real time.
The command for this is tail, and it will greatly simplify your log viewing.
To use tail in the way I describe above, you run it in conjunction with the -f flag (for follow). Let’s say you want to follow the /var/log/syslog file and watch, in real time, as entries are written. To do this, you’d run the command:
tail -f /var/log/syslog
Code language: JavaScript (javascript)
By default, tail will display the last 10 lines written to the log file. If you need fewer, you could use the -n option like so:
tail -f -n 1 /var/log/syslog
Code language: JavaScript (javascript)
The above command would only list the last entry written to the log file. This is a great way to keep the confusion of large log entries at bay.
8. systemctl
systemctl allows me to control processes and system services. Not only can I start and stop them, but I can also check to see if they are running or not. If a process has died, systemctl will report it.
You can also use it to help troubleshoot why the process stopped in the first place (with journalctl, which works alongside systemd), set the default target (such as GUI or terminal), mask or unmask a service, enable a service to start at boot, list unit files, and more.
systemctl is a must-have tool to keep a system running well. Those new to Linux probably won’t need to bother with systemctl at first, but eventually, you’ll want to delve into the details of this command because it proves very handy.
The systemctl command is simple. Say you want to start the SSH daemon. This can be done with:
sudo systemctl start ssh
You can also check the status of a service like so:
systemctl status ssh
If you want to stop a service, the command will look like this:
sudo systemctl stop ssh
You can restart a service with the command:
sudo systemctl restart ssh
You might install a new application that uses a service, but the installation doesn’t enable that service. When you enable a service, it means the service will always start during the OS boot process. To enable a service, issue the command:
sudo systemctl enable ssh
To disable a service (preventing it from starting at boot), the command would be:
sudo systemctl disable ssh
You can also start and enable a service at the same time, like so:
sudo systemctl enable --now ssh
9. grep
If I had to pick one command that quietly appears everywhere in my workflow, it would be grep. It’s the Swiss army knife of text searching in Linux, and I use it constantly in combination with other commands like ps, journalctl, dmesg, ls, and even tail.
Whenever I need to filter noisy output and get straight to what matters — an error string, a username, a process name, a specific IP — grep is the tool I reach for.
A few typical use cases:
- Filter processes by name (as we saw above):
ps aux | grep nginx - Find specific errors in logs:
journalctl -u ssh | grep "Failed password" - Search recursively through configuration files:
grep -R "stackscale.com" /etc
Once you get used to piping command output into grep, your productivity on the command line jumps to another level. Instead of reading through hundreds of lines, you see only what you’re interested in.
These nine commands — top, ssh, sudo, apt, wget, ps, tail, systemctl and grep — cover a huge part of what I do every day on Linux: monitoring, troubleshooting, automation, package management, remote access and log analysis.
You don’t need to memorize the entire man page of each, but learning the basics of these nine will give you a powerful toolkit to keep your Linux systems healthy, flexible and under your control.
