Gaming industry under DDoS attack. Get DDoS protection now. Start onboarding
  1. Home
  2. Developers
  3. How to Install Nethogs on Ubuntu

How to Install Nethogs on Ubuntu

  • By Gcore
  • December 12, 2023
  • 2 min read
How to Install Nethogs on Ubuntu

In this guide, you’ll learn how to install Nethogs on Ubuntu, a powerful network monitoring tool that allows you to track network bandwidth usage on a per-process basis. Whether you’re a system administrator, a network enthusiast, or simply curious about your network activity, Nethogs can provide valuable insights into your network’s data consumption. We’ll walk you through the installation process step by step, so you can start using Nethogs to monitor and manage your network more effectively.

What Is Nethogs and Its Key Features

Nethogs is a network monitoring tool for Linux that allows you to track bandwidth usage on a per-process basis. Its key features include:

  1. Real-Time Monitoring. Nethogs provides real-time data on network usage, helping you identify bandwidth-hungry processes.
  2. Process-Specific Data. You can see which processes are using the most network resources, making troubleshooting and optimization easier.
  3. Easy Installation. Nethogs is straightforward to install and use, making it accessible to both beginners and experienced users.
  4. Clear Interface. Its simple and intuitive interface displays network usage in a readable format.
  5. Resource Efficiency. Nethogs itself consumes minimal system resources, ensuring it doesn’t impact your network performance.

Procedure for Installing NetHogs

To install NetHogs on Ubuntu, follow these steps. This process assumes you have sudo privileges on your Ubuntu system. Open a terminal and execute these commands step by step:

1. Update Package Lists. Update your package list to ensure you get the latest version of NetHogs available in the repositories.

sudo apt-get update

The command will list various URLs from which it’s fetching package information. Once completed, it returns to the command prompt.

2. Install NetHogs. Install NetHogs using the apt-get command.

sudo apt-get install nethogs

Sample Output:

You will see a progress bar indicating the installation process. You might be prompted to confirm the disk space usage; press Y to continue.

3. Verify Installation. After installation, you can verify it by checking the version of NetHogs installed.

nethogs -V

This will display the version of NetHogs installed on your system.

4. Running NetHogs. To start NetHogs, use the following command. You might need to run it with sudo since NetHogs requires root privileges to monitor network traffic.

sudo nethogs

NetHogs will open in the terminal, displaying real-time network usage per process. Remember, NetHogs shows real-time network traffic and updates dynamically. To exit NetHogs, press q.

Congratulations, now you’re able to install NetHogs on Ubuntu, empowering you with the ability to monitor your network traffic effectively. By following the simple steps outlined, you have added a vital tool to your system’s utility belt, giving you real-time insights into bandwidth usage by each process.

Conclusion

Looking to deploy Linux in the cloud? With Gcore Cloud, you can choose from Basic VM, Virtual Instances, or VPS/VDS suitable for Linux:

Choose an instance

Related articles

What's the difference between multi-cloud and hybrid cloud?

Multi-cloud and hybrid cloud represent two distinct approaches to distributed computing architecture that build upon the foundation of cloud computing to help organizations improve their IT infrastructure.Multi-cloud environments involve us

What is multi-cloud? Strategy, benefits, and best practices

Multi-cloud is a cloud usage model where an organization utilizes public cloud services from two or more cloud service providers, often combining public, private, and hybrid clouds, as well as different service models, such as Infrastructur

What is cloud migration? Benefits, strategy, and best practices

Cloud migration is the process of transferring digital assets, such as data, applications, and IT resources, from on-premises data centers to cloud platforms, including public, private, hybrid, or multi-cloud environments. Organizations can

What is a private cloud? Benefits, use cases, and implementation

A private cloud is a cloud computing environment dedicated exclusively to a single organization, providing a single-tenant infrastructure that improves security, control, and customization compared to public clouds.Private cloud environment

What is a cloud GPU? Definition, types, and benefits

A cloud GPU is a remotely rented graphics processing unit hosted in a cloud provider's data center, accessible over the internet via APIs or virtual machines. These virtualized resources allow users to access powerful computing capabilities

What is cloud networking: benefits, components, and implementation strategies

Cloud networking is the use and management of network resources, including hardware and software, hosted on public or private cloud infrastructures rather than on-premises equipment. Over 90% of enterprises are expected to adopt cloud netwo

Subscribe to our newsletter

Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.