Skip to main content
How to Install Glances & Set Auto Start on Boot in Linux

How to Install Glances & Set Auto Start on Boot in Linux

·394 words·2 mins
Zarvelion Zynji
Author
Zarvelion Zynji
Tech enthusiasts (self-proclaimed). Gaming addict (diagnosed). Anime simp (no regrets). I turn my hyperfixations into contentβ€”welcome to the chaos.
Table of Contents

πŸ” What Is Glances?
#

Glances is a terminal-based monitoring tool that lets you monitor CPU, RAM, Disk, Network, and Processes in real time. Ideal for server administration and system performance debugging.

Key Features of Glances: βœ” Real-time interactive display βœ” Supports remote monitoring via web βœ” Lightweight and fast βœ” Compatible with Linux, macOS, and Windows (WSL)


πŸ“₯ Step 1: Install Glances on Linux
#

Glances can be installed using pip (Python Package Manager) or your Linux distro’s package manager.

Method 1: Install via Pip (Recommended) #

sudo apt update && sudo apt upgrade -y  # For Debian/Ubuntu
sudo dnf update -y  # For Fedora/CentOS
sudo pacman -Syu  # For Arch Linux

# Install pip (if not installed)
sudo apt install python3-pip -y  # Debian/Ubuntu
sudo dnf install python3-pip -y  # Fedora/CentOS

# Install Glances
pip3 install glances

Method 2: Install via Package Manager
#

# Debian/Ubuntu
sudo apt install glances -y

# Fedora/CentOS
sudo dnf install glances -y

# Arch Linux
sudo pacman -S glances

Verify Installation:

glances --version

βš™οΈ Step 2: Run Glances
#

You can run Glances with the following command:

glances

To run in web server mode (access via browser):

glances -w

Open your browser and go to:

http://YOUR-IP:61208

πŸš€ Step 3: Set Auto Start on Boot
#

To make Glances run automatically at boot, use systemd.

1. Create Glances Service File
#

Create the systemd config file:

sudo nano /etc/systemd/system/glances.service

Add the following configuration:

[Unit]
Description=Glances Monitoring Tool
After=network.target

[Service]
ExecStart=/usr/local/bin/glances -w
User=root
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

(Note: Adjust the ExecStart path if Glances is installed elsewhere. Check with which glances)

2. Enable & Start the Service
#

sudo systemctl daemon-reload
sudo systemctl start glances
sudo systemctl enable glances

3. Check Service Status
#

sudo systemctl status glances

If the status shows active (running), Glances is successfully running on boot.


πŸ”§ Troubleshooting
#

  • Port 61208 Blocked? Make sure your firewall allows access:

    sudo ufw allow 61208/tcp  # For Ubuntu/Debian
    sudo firewall-cmd --add-port=61208/tcp --permanent && sudo firewall-cmd --reload  # Fedora/CentOS
    
  • Error “Glances not found”? Check Python PATH or reinstall Glances.


🎯 Summary
#

With Glances, you can monitor your Linux system performance in real time. With auto start enabled, Glances will always run after reboot.

πŸ”₯ Extra Tips:

  • Use glances -2 for 2-second refresh mode.
  • Remote monitoring is accessible via smartphone browser.

Now your system is well monitored! πŸš€

Related


Load Comments