Mac OS X,  Mac OS X Server,  Network Infrastructure,  Ubuntu,  Unix

Simple Networking Commands

Troubleshooting the network is faster and more thorough when it is done using the command line. Here are some simple command-line utilities that can perform a variety of tasks that can help when administering many services and multiuser environments:

  • Whoami lists the user you are currently logged in as from the command line.
  • Who lists the users logged onto your system.
  • Id shows a list of all defined users and groups whether they are actually logged in.
  • Groups <userid> shows a list of all the groups a user is in.
  • Whois lists ownership information for domains.
  • Hostname lists the name of the computer you are currently working on. You can also use hostname to set the name of the computer.
  • Ifconfig is used to show you information about your network adapter.
  • Dig is a utility for interrogating DNS servers. It is used to ask a DNS server for a type of record and provide the information for the DNS server.
  • Netstat is a highly configurable tool that can show you the status of your network interfaces. This can help administrators break down which IP addresses are connecting to servers, the name of the system using the IP address, and the ports users are accessing the server over.
  • Ping sends a request to a system. If the system supports the ability to respond, then the system will do so. Ping can be used to check the availability of a system and make sure data can reliably make it to the system being pinged.
  • Traceroute is a utility for tracing where data goes through the Internet to get to a specified destination. The traceroute command is useful when troubleshooting connectivity issues between two locations.