Basic Networking Commands in Ubuntu

By | October 29, 2014
Don't be shellfish...Share on Google+Share on FacebookTweet about this on TwitterPin on PinterestShare on StumbleUponEmail this to someone

featured

Networking is an integral part of computer system nowadays. With the advent of high speed and cheap internet, one cannot stay disconnected for much long. If you have been using Windows, you might have noticed that most of the networking part is done automatically by the system itself. Linux, however is a totally different story. Considering the fact that the Linux system is pretty complex, various commands are available at it’s disposal, to make use of the various secure features provided by the system. Here’s some of the basic commands that can be used for various tasks ranging from troubleshooting to establishing a secure connection.

ping

This is the most basic networking command available. It basically sends and ICMP request packet to the host or destination computer, and if the host is functioning properly you will get the response ICMP packet back.

ping [address]

This [address] can be replaced by:

  • IP address of the host.
  • DNS name of the host.
  • IP address of default gateway.
  • Loopback address , i.e. 127.0.0.1
  • IP address of DNS server.

ping success

traceroute

As the name suggests, it is basically a network diagnostic tool which provides information about the various hosts that packet travels while moving from the source to the destination computer. Each node/host will be displayed along with the various information of the host like, response time, etc. It also uses ICMP packets like ping command.

traceroute [address]

traceroute command

host

This command can be used to map names to an IP address. IT provides the IP address of the domain name given as parameter.

host [domain name]

host command

 

nslookup

It can be thought of as the reverse of host command. Thus, it will basically look up the OP addresses associated with a domain name and provide other related information about it.

nslookup [IP address]

nslookup

Advertisement

whois 

This command allows to look for information in the internet database for proper hostnames. Useful for tracing IP address to a host name and vice-versa.

whois [ IP address ]

In case the command is not installed in Ubuntu, use the following command.

sudo apt-get install whois

whois

netstat 

This command offers you a simple way to retrieve information of your network connections, like incoming and outgoing connections, which programs are making connections, amount of data being transmitted etc.

netstat

netstat

dig

Domain Information Groper, is the program is to find DNS information like reverse lookups, query  NS records, bulk DNS query, etc .

dig [domain name]

dig

ifconfig

This command allows you to check and configure your network cards for assigning IP address, DNS address and Gateway addresses.

Using the plain ifconfig command provides information like details of all existing configured network cards and interfaces.

ifconfig

[Image Source : http://www.apestandoarockandroll.com/]

Leave a Reply

Your email address will not be published. Required fields are marked *