LINUX NETWORKS COMMANDS YOU MUST KNOW

Cloudyer
3 min readJun 15, 2024

netstat: Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.

ss: Utility to investigate sockets

ethtool: Display or change Ethernet device settings.

route: Show/manipulate the IP routing table.

After adding a default gateway for learning purpose, don’t forget to delete it with this command: sudo route del default gw <gateway ip>. If you forget to delete, it maybe cause a connectivity problem.

dig: DNS lookup utility.

nslookup: Query Internet name servers interactively.

mtr: Network diagnostic tool that combines ping and traceroute.

ping: Send ICMP ECHO_REQUEST to network hosts.

glances: Real-time monitoring tool that provides a comprehensive overview of system resources, including network usage.

Installation of glances tool

After installing the tool, enter this command and hit enter.

It will open a new windows like this screenshot.

nethogs: Monitors network traffic bandwidth used by each process.

If you don’t have the tool installed, you can install it with this command: sudo apt-get install nethogs -y

Installation of nethogs tool

After installing enter this command ( see the screenshot) and hit enter.

Then a new windows will open.

I open a firefox, so you can see that on the screenshot.

Congrats!! You have learned some of the most important network command in Linux based operating system.

--

--

Cloudyer

I am certified GCP ACE , AZ -104 , AZ-305 and AI-102 . I like to learn about new technologies specially cloud computing and AI.