Network management with the Linux Shell

Here are some useful commands for Linux network management:
  • ping [-n] machine : Sends a ping to a machine (-n: no DNS))
  • traceroute [-n] machine : Makes a traceroute to a machine (-n: no DNS)
  • netstat [-n] : Shows network usage by processes
  • netstat [-n] -a : Same, with the display of server processes
  • fuser, fstart, lsof : Detailed list of the use of files and network
  • ifconfig -a : Displays the configuration of network interfaces
  • ifconfig interface IP mask : Configure a network interface
  • route [-n] show : Displays the routing table (-n: no DNS)
  • route [-n] add route [gw] gateway : Add a routing entry [gw only]
  • route add default [gw] gateway : Adds a default route [gw only]
  • route delete default : Delete the default route
  • hostname : Displays and sets the machine name
  • /etc/resolv.conf : Configuration file for DNS resolution
  • whois domain name (whois par exemple) : Displays information about the domain name

Related FAQ:
Published by jak58. Latest update on December 15, 2010 at 10:15 AM by jak58.
This document, titled "Network management with the Linux Shell," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
Export command in shell script?
Compression and decompression with the Linux Shell