Linux · System Tools
nethogs
Nethogs is a lightweight command‑line tool that shows per‑process network traffic in real time.
- License
- GPL-2.0
- Latest version
- 0.9.0
What is nethogs?
Nethogs was written in 2004 by Andreas Böhme and first released for Linux. It has been included in major distributions for over a decade, making it a mature and reliable choice for monitoring network usage. The tool is aimed at sysadmins, developers, and power users who need a quick, terminal‑based view of bandwidth per process. It works on any Linux kernel that supports the /proc filesystem. Compared with Windows tools like GlassWire, Nethogs offers a raw, text‑only interface. It lacks the graphical dashboards and alerts of GlassWire, but it provides instant, scriptable output that can be piped into other tools or logged for later analysis.
Best for: Monitoring per‑process network traffic on servers or desktops without the need for a graphical interface.
Key features of nethogs
- Shows bandwidth per process
- Real‑time updates
- Supports IPv4 and IPv6
- Can aggregate by interface
- Runs as root or with set‑uid
- Works on headless servers
- No external dependencies
- Can be integrated with cron or systemd
Pros
- No GUI, low resource usage
- Cross‑distribution availability
- Scriptable output
- Clear per‑process breakdown
- Free and open source
Cons
- Requires root or set‑uid for full visibility
- No historical graphs or alerts
- Limited to terminal output
- No built‑in filtering options
Windows programs nethogs replaces
How to install nethogs on Linux
sudo apt install nethogssudo apt install nethogssudo dnf install nethogssudo pacman -S nethogssudo zypper install nethogsTips for Windows users
If you’re moving from GlassWire, remember that Nethogs only displays live traffic; it does not keep logs or provide alerts. There are no file formats to migrate. Use the same keyboard shortcuts you’re used to in a terminal: press Ctrl+C to stop, Ctrl+Z to pause. For a more visual experience, pipe Nethogs output into tools like vnstat or bmon to generate graphs.
nethogs: frequently asked questions
Does Nethogs work on macOS?
No, Nethogs is a Linux‑specific tool and relies on the /proc filesystem, which macOS does not provide.
Can I run Nethogs without root?
You can run it as a regular user, but you will only see traffic for processes you own; full visibility requires root or set‑uid.
Is there a way to filter by application name?
Nethogs does not support filtering natively; you can pipe its output to tools like grep or awk to isolate specific processes.
How often does Nethogs update?
It updates every second by default, but you can change the interval with the -t option.
Updated