Linux

See processes running on Linux (top/htop)

September 27, 2021

See processes running on Linux (top/htop)

In this article, you will learn how to see the processes running on Linux, what information can be extracted from the commands, and everything easily and practically.

See processes running on Linux cover

Linux Processes

We are most of the time so used to seeing the task manager in Windows, which is practical and convenient

That when it comes to looking at Linux we are lost, even more, if we are on a server interface that has only a terminal

But now your problems come to an end, let’s understand some concepts about processes and then go to the commands (or go straight to the commands haha ​​:D)

What are processes?

We can define processes as tasks that are running on our operating system

That is, from the moment you open Chrome to see this post, there is at least one more process running on your machine

And the importance of being able to see these processes is precisely knowing what is happening on your machine and also seeing processes that are consuming a lot of resources

Commands to see running processes

Well, as you can imagine there are several ways to do this process check

But two of them are great and solve the problem well, let’s see them

Top Command

The first feature, which comes native in Ubuntu, is the top command.

top

In it we can see all the necessary information of the processes running and also the current state of the machine, see:

Imagem

In this terminal screen we see the processes updating in real-time, CPU and RAM they are consuming.

It is also possible to check which user this process is, how long it is running, etc…

Realize that even the top is on the list πŸ˜€

Note: to exit the top press ctrl + c

htop Command

Another application/command that is also well used to view processes interactively and in a more β€˜graphical’ way is htop.

You will probably have to install:

sudo apt-get install htop

And to use htop, just type it in the terminal:

htop

And the following screen is displayed for you:

Imagem

Note that the information is the ‘same’ as the top, but with a higher level of detail.

We now have RAM and processors like a bar graph, separation of cores, and other infos with more details, cool right?

Note: to exit the top press ctrl + c

We were then able to demystify the processes running on Linux! πŸ˜€

Conclusion

We learned in this article how to see processes running on Linux, with top and htop

The most used commands to see processes are: top and htop, very similar but show the data in slightly different ways

And particularly I opt for htop, because the interface is easier to read and understand, how about you? πŸ˜€

And that’s it for today, until the next post!

Want to learn more about Linux? Click here!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x