Linux Networking Commands
1. iconfig
- Display nework inerface informaon.
Ifconfig
2. ip
- Show/manipulae roung, devices, policy roung,
and unnels.
ip address show
3. route
- Display or manipulae he IP roung able.
route -n
4. ping
- Send ICMP ECHO_REQUEST o nework hoss.
ping google.com
5. traceroute
- Prin he roue packes race o nework hos.
traceroute google.com
6. netstat
- Prin nework connecons, roung ables, inerface
sascs, masquerade connecons, and mulcas
memberships.
netstat -an
7. ss
- Display socke sascs.
ss -tulpn
8. hostname
- Show or se he sysem's hos name.
Hostname
9. dig
- DNS lookup uliy.
dig google.com
10. nslookup
- Query Inerne name servers ineracvely.
nslookup google.com
11. route
- Manipulae roung ables.
route add default gw 192.168.1.1
12. iptables
- Adminisraon ool for IPv4 packe filering and
NAT.
iptables -L
13. tcpdump
- Dump raffic on a nework.
tcpdump -i eth0
14. sshd
- OpenSSH daemon.
service sshd restart
15. telnet
- User inerface o he TELNET proocol.
telnet google.com 80
16. scp
- Secure copy (remoe file copy program).
scp file.txt user@remote:/path/to/destination
17. wget
- Non-ineracve nework downloader.
wget http://example.com/file.zip
18. curl
- Command line ool for ransferring daa wih URL
synax.
curl http://example.com/api
19. iptra
- Ineracve color IP LAN monior.
Iptraf
20. ifop
- Display bandwidh usage on an inerface.
Iftop
21. nmap
- Nework exploraon ool and securiy scanner.
nmap -sP 192.168.1.0/24
22. lso
- Lis open files.
lsof -i :80
23. ethtool
- Display or change eherne card setngs.
ethtool eth0
24. arp
- Display or modify he ARP cache.
arp -a
25. route
- Display or modify he IP roung able.
Route
26. ss
- Display socke sascs.
ss -s
27. hostnamectl
- Conrol he sysem hosname and relaed setngs.
hostnamectl status
28. resolvcon
- Manage DNS informaon.
resolvconf -u
29. mtr
- Nework diagnosc ool.
mtr google.com
30. iwconfig
- Configure a wireless nework inerface.
Iwconfig
31. nc
- Arbirary TCP and UDP connecons and lisens.
nc -l 8080
32. scp
- Copy files beween hoss on a nework.
scp file.txt user@host:/path/to/destination
33. ssh-keygen
- Generae, manage, and conver auhencaon keys
for ssh.
ssh-keygen -t rsa
34. ss
- Show socke sascs.
ss -t -a
35. tcpdump
- Capure and display packes on a nework.
tcpdump -i eth0 tcp port 80
36. route
- Add a new roue.
route add -net 192.168.2.0 netmask
255.255.255.0 gw 192.168.1.1
37. nmcli
- Command-line clien for NeworkManager.
nmcli connection show
38. dig
- Perform DNS lookups.
dig +short A google.com
39. nload
- Visual represenaon of incoming and ougoing
raffic.
Nload
40. iper
- Tool for measuring TCP and UDP bandwidh
performance.
iperf -c server_ip
41. ping
- Quickly ping mulple hoss.
fping -a -g 192.168.1.1 192.168.1.254
42. ifop
- Real-me console-based nework bandwidh
monioring ool.
iftop -n
43. route
- Delee a roue.
route del -net 192.168.2.0 netmask
255.255.255.0
44. tcpdump
- Capure and display packes in ASCII.
tcpdump -A -i eth0
45. netcat
- Uliy for reading from and wring o nework
connecons.
nc -zv 192.168.1.1 22
46. nmtui
- Tex User Inerface for conrolling NeworkManager.
Nmtui
47. ethtool
- Change he speed/duplex setngs of an Eherne
device.
ethtool -s eth0 speed 100 duplex full
48. ss
- Show lisening sockes.
ss -l
49. host
- DNS lookup uliy.
host google.com
50. nmcli
- Lis available Wi-Fi neworks.
nmcli device wifi list
These commands cover a wide range of neworking
asks and can be useful for roubleshoong,
monioring, and managing nework configuraons in a
DevOps environmen.