How I use TOP command in Linux to know which applications are draining computer resources?

How I use TOP command in Linux to know which applications are draining computer resources?

How to know which processes are draining your resources on Linux?

I have been using Windows 10 for most of my Web Development career. But as the mini box became too slow when developing using WebPack, I decided to switch back to Ubuntu.

I have a 8gb RAM with SSD mini pc. The computer is fast but seems to lag or become slow whenever UI operations is involved or whenever I use a lot of browser tabs particularly from Opera, which seems to take a lot of memory in my Ubuntu distribution.

I initially used the official DE, that is, Gnome but the entire system crashed at least once daily. I then switched to XFCE but the same thing occurs, albeit to smaller but still significant degree. I have switched from VS Code to Sublime Text with the same issue. Even Atom, which appears to be faster in this Linux system suffers the same fate.

I am now using gVim editor which takes less resources compared to others. So far, the system has not crashed but becomes laggy as soon as I open multiple browsers.

So I use the top command in the terminal to see which application devour plenty of resources. The usual suspects are:

  1. Opera browser
  2. Caprine, an alternative software to Messenger
  3. Text Editors: Sublime Text, Visual Studio Code and Atom

Maybe there is an issue with this Ubuntu release, but as a professional software development, I don't have enough time to investigate the issue. I have to use vim once again, which is a wonderful requiring to know plenty of keys that I have forgotten.

I have meanwhile, switched back to Gnome but am now careful in the number of applications I use. I can also increase the SWAP memory as it's only 2 GB, certainly not enough for Software Development.