5 Commands to Check the Running Processes in Linux

HomeLinux5 Commands to Check the Running Processes in Linux

5 Commands to Check the Running Processes in Linux

Linux today has been far different that Linux tens years ago. Today, you can use Linux without even knowing a single command thanks to the graphical user interface aka GUI. But, there are much things you can do if you want to learn the Linux commands.

top is one of the most basic Linux commands to learn for those who just to get started learning Linux command. The command is used to check the running processes in Linux. We have covered some example uses of the command here. If you need to restart a server using Linux commands, you may find a helpful guide in websites like Linode.

In addition to top, there are several others commands you can use to check the running processes on your Linux system. Following are top 5 commands you can use to do use.

1. ps

ps is the very basic tool to check the running processes in Linux. Well, not just Linux. This tool is also available on BSD. This tool requires no root access to run. Anyone on your system can use it to check what are the processes currently running. You can use the tool by simply type pson the terminal. It’s just, you will only see two lines if you just typepswithout being followed by any options.

The use of ps command will be more optimal if you use options. For instance, you can use ps to check which processes consume most memory and CPU resource. You can learn how to use this command by referring to this page.

2. pstree

pstree is much like ps, in which allows you to check the running processes. The biggest difference between them is that pstree displays the running processes in a tree model. It lets you know the hierarchy process in your Linux system. Useful to check the dependencies of the processes. This tool also comes with a bunch of options which you can check by typing pstree -- helpon the terminal.

3. top

The command of top is more powerful than ps and pstree in some ways. Unlike the first two tools above, top displays the running processes in a real time. The information provided by top is also complete enough. You can check the running processes along with information such us memory usage, CPU usage, process ID and so on. You can also directly kill certain process if you want. top also lets you know the overall memory consumption on your system.

Unlike ps and pstree, top has no options to use, but you need to learn some basic button use to get the most out of it. For instance, you will use the “K” button on your keyboard to kill certain process, while to exit from the top you will use the “Q” button.

4. htop

htop is the improved version of top. It’s the combination between top and pstree. htop displays the running processes in a real time. In addition, it also lets you know the hierarchy process on your Linux system. htop also features a colorful bar showing the memory usage in a real time. At the bottom, you will see a number of shortcuts to perform certain task regarding the processes.

5. glances

Another worth-trying tool to check the running processes on the Linux system is glances. This tool is also powerful. A bit similar to htop, but doesn’t display the processes in an a tree model. In addition to displaying the running processes (in a real time), glances also displays the memory as well as CPU usage in a real time. This tool also lets you how long your system has been running (uptime). It’s just, glances is not installed by default in most Linux distros. Some Linux distros, including Ubuntu, have been added this tool to their software repositories. If your distro hasn’t added this tool, you can get this package of glances from its GitHub page.

hand-picked weekly content in your inbox


related posts