Find The IP Address From The Command Line In Ubuntu 14.04

Finding the IP address of your Ubuntu computer takes a few clicks of the mouse when you do it in the graphical interface. However, it’s actually quite a bit easier to find your computer’s IP address from the Terminal, Ubuntu’s command-line interface. To find the IP address from the Terminal, first launch the Terminal by going to the Dash, searching for “Terminal”, and then clicking on the icon for Terminal when it appear. You can also launch the Terminal by hitting the CTRL+ALT+T keys simultaneously.

Once the Termina launches, type this command and then hit the ENTER key:

ifconfig

The ifconfig command will generate an output with a great deal of information.

Fortunately, most of it is useful. The “eth0″ refers to the first Ethernet connection on your system. The “indet addr” displays your system’s IP address, while “Mask” shows the subnet mask. “HWaddr” shows your Ethernet adapter’s MAC (Media Access Control) address, which is (theoretically) unique to each adapter. (Some wireless networks require you to supply your MAC address before allowing your system to connect.)

You can pipe the output from the ifconfig command to grep to quickly find the specific item you want. Let’s say you just want to find the IP address:

ifconfig | grep inet

This time, the output will limit itself to just the IP address.

-JM