How to install Gtop on Linux Mint 18.3

To install Gtop on Linux Mint 18.3

Gtop, is one of the nifty tools that capable to display system processes dynamically in graphics mode on your Linux terminal. As the name implies, Gtop stands for the graphic top command which reads system process, memory, CPU, network and disk usage information and populates the results in graphics mode with a percentage. It is very simple to install Gtop on Linux Mint 18.3 and this tutorial covers the ground on the same process.

installing Gtop

First, make sure that your system has Node.js, if not you can install it using the following command.

linuxhelp ~ # curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash &ndash 
## Installing the NodeSource Node.js v8.x LTS Carbon repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:2 http://packages.linuxmint.com sylvia InRelease                                                                
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                                
Hit:4 http://packages.linuxmint.com sylvia Release                                             
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] 
Get:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Fetched 306 kB in 1s (192 kB/s)
Reading package lists... Done
.
.
Hit:9 http://archive.canonical.com/ubuntu xenial InRelease                                    
Hit:10 http://packages.linuxmint.com sylvia Release                      
Get:12 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 110 kB in 1s (86.6 kB/s)
Reading package lists... Done

Once it is done, you need to run the following command to install Node.js v8.x LTS Carbon and npm as follows. Make sure you run it as root.

linuxhelp ~ # apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 273 not upgraded.
Need to get 12.8 MB of archives.
After this operation, 61.4 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_8.x xenial/main amd64 nodejs amd64 8.9.4-1nodesource1 [12.8 MB]
Fetched 12.8 MB in 14s (872 kB/s)                                                                                                                 
Selecting previously unselected package nodejs.
(Reading database ... 219622 files and directories currently installed.)
Preparing to unpack .../nodejs_8.9.4-1nodesource1_amd64.deb ...
Unpacking nodejs (8.9.4-1nodesource1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (8.9.4-1nodesource1) ...

You shall now install Gtop by simply running the following command.

linuxhelp ~ # npm install gtop -g
/usr/bin/gtop ->  /usr/lib/node_modules/gtop/bin/gtop
+ gtop@0.1.5
added 105 packages in 9.717s

Now that Gtop has been installed, let us see how to use Gtop. Run the following command to start Gtop.

linuxhelp ~ # gtop



Gtop allows the user to sort the process table by pressing below keywords.
p: Process id
c: CPU usage
m: Memory usage

With this, the installation of Gtop on Linux Mint 18.3 comes to an end.

FAQ
Q
How to set the environment variable for gtop?
A
Run the following command to set environment variable for gtop



$ LANG=en_US.utf8 TERM=xterm-256color gtop
Q
How to install Gtop on fedora?
A
For the installation of the Gtop on Fedora, use the following steps as given below



$ curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

$ sudo dnf -y install nodejs

$ sudo npm install gtop -g
Q
What is the requirements for gtop ?
A
you will need the following requirements, Linux / OSX / Windows Node.js >= v4
Q
what are the alternative commands like gtop?
A
Start gtop with the gtop command

$ gtop

To stop gtop use q, or ctrl+c in most shell environments.

You can sort the process table by pressing

• p: Process Id

• c: CPU usage

• m: Memory usage
Q
Please share the link for installation on ubuntu?
A
you can use the following link, https://www.linuxhelp.com/how-to-install-gtop-on-ubuntu-17-04/