How To Install And Use Gtop On Linux Mint 21

How To Install And Use Gtop On Linux Mint 21

Are you looking for a tutorial on how to install and use Gtop on Linux Mint 21? Then this guide is for you.

Monitoring your system and running processes is crucial to maintain your computer’s performance. But the procedures can get dull very fast. 

Luckily, we have tools like Gtop to make things more interactive and fun for you. If you’re running Linux Mint and want to install Gtop, we will show you every step you need to get this done.

Let’s get started!

Prerequisites

  • Linux Mint 21 Device: Since this tutorial focuses on Linux Mint 21, you need a device that is running it. Other versions may not be suitable for this tutorial 
  • Node.js >= v14+: Although the official download page sets the requirement at >=v8, from your experience, the latest versions of Gtop require a higher version of NodeJS
  • NPM installed: We will use NPM to install Gtop

What is GTop

Gtop is a graphical system monitoring dashboard for the command line. It provides an easy-to-read and interactive display of system resource usages such as CPU, memory, disk, and Network.

It displays real-time system metrics using graphs and pie format. This allows users to identify resource-hungry processes and track their system performance quickly. Gtop also allows users to sort their processes by resource usage and search for specific processes using filters.

Gtop is open-source software and is available for free. It is designed to be lightweight and fast. It’s also developed in JavaScript (Node.js runtime environment). Gtop’s source code is available online for free, and you can find it on their Github.

This graphical system monitoring dashboard is useful for system administrators, developers, and power users who need to monitor and optimize system performance from the command line.

How to Install And Use Gtop On Linux Mint 21

Now that you have a basic idea of Gtop and the things you need to get it installed, let’s discuss the primary installation process.

Install Necessary Packages

We will show you two methods of doing this. We recommend the second method but feel free to try the first one too.

Quick Install

Before installing anything on a Linux environment, you should constantly update your system. Update your Linux system using this command:

$ sudo apt update

First, we need to install NPM (Node Package Manager). Installing NPM requires you to have NodeJS. So let’s install that first. You can install NodeJS using this command:

$ sudo apt install nodejs

Output:

nodejs install linux mint

Now you have NodeJS installed, we can now install NPM. In order to do so, you have to input this command:

$ sudo apt install npm -y

Output:

npm install linux mint

When it’s done, you may verify the installation. To do that, simply run this command:

$ npm --version

Output:

npm version

If you got a version number like the screenshot above, it means that the installation was successful.

Install Latest Version

However, one problem you may face with the previous installation process is that the version of NodeJS may be incompatible with Gtop. And that’s why it’s recommended to install the latest version. One easy way to do that is to use NVM (Node Version Manager)

First, use curl to fetch and install NVM. Use this command:

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

Output:

nvm install linux mint

Then install node with this command:

$ nvm install node

Output:

node install linux mint

This also installs NPM automatically. Once again, let’s verify by checking the versions. Run these commands:

$ node --version
$ npm –version

Output:

node version linux mint

You can notice that we have the latest version now. Now you can move on to the next step.

Install Gtop on Linux Mint 21

In this step, we install Gtop using NPM. To do so, run this command:

$ sudo npm install gtop -g

Output:

How To Install And Use Gtop On Linux Mint 21

You may receive some warning messages about your NodeJS version. But it will not prevent the installation from happening. So if you followed the second method of installing NPM, you shouldn’t face such warnings. Instead, your output should look like this:

How To Install And Use Gtop On Linux Mint 21

And to test whether it was installed correctly or not, run Gtop with the below command:

$ gtop

Output:

gtop dashboard linux mint

An alternative way to launch it is to use any of these commands:

$ nodejs /usr/local/bin/gtop # If you installed NodeJS normally
$ node /home/mint/.nvm/versions/node/v19.8.1/bin/gtop

If everything went well, you should now see the Gtop dashboard. It’s colorful and interactive, which makes it better than the other choices in the market.

Dashboard and Basic Usage

You will see several sections upon running Gtop. These are as follows:

  • CPU History: CPU usage graph
  • Memory and Swap History: Main memory and swap memory information graphs on the left, usage of each on the right
  • Network History: How much network traffic is sent and received per second.
  • Disk usage: Total available disk and percentage of the disk in use
  • Processes: Currently actives processes and how much memory each is consuming

You can scroll how to see all the processes. If too many processes are running and you want to find a specific one, you may also use the search button on the terminal. Click on Search. A window will come down. Press ‘Find’.

search process in gtop

You can also use the shortcut “Shift + Ctrl + F”. Now start typing the name of the process in the search bar. Then hit enter. If the process is running, it should get highlighted like this:

search process in gtop

You can also sort the process table in the following way:

  • p: Process Id (Descending order)
  • c: CPU usage (Descending order)
  • m: Memory usage

A common error you face when launching Gtop is seeing question marks or other characters. In this case, create an environment to change and open the language. This is the full command:

$ LANG=en_US.utf8 TERM=xterm-256color gtop

If you would like to quit and come back to your terminal screen, try pressing “Q” or “Ctrl + C”.

How to Remove Gtop from Linux Mint 21

If perhaps you want to remove Gtop from Linux Mint after using it, you just have to run this command to do so:

$ npm remove gtop -g

Output:

remove gtop linux mint 21

And with that, Gtop should be completely removed from your system.

Final Thoughts

This guide shows you how to install and use Gtop on Linux Mint 21. We’ve shown you multiple installation methods and then covered how to use this tool to monitor your system. 

And that’s about it for this tutorial. If you have any questions or are facing any issues while installing Gtop, let us know in the comments below.

If this guide helped you, please share it.

Related Posts