How to find the local IP address of my Linux server

This quick and easy guide is meant to teach you to find your own local IP address on Linux. It barely takes a minute to read and follow along, and it equips you with all the necessary information. You will find a short video demonstrating the steps in motion, a cheat sheet and a detailed, written guide with edited screenshots.

What is a local IP address?

It's a private address, different from the public IP that identifies your whole network on the internet. Assigned by your router, this unique number lets your devices recognize and talk to each other. Local IPs keep things organized within your network, but they do not reveal your location on the wider internet.

Finding your local IP address on Linux (video tutorial)

This compact video guide aims to help you find your local IP address on your Linux server. In less than half a minute, you will be taken through this simple, short but very important process, whether you are a Linux veteran or it is your first time with this operating system.

Finding your local IP address on Linux (brief rundown)

  1. Open Terminal
  2. Enter ifconfig
  3. Look for inet

Finding your local IP address on Linux (detailed steps)

First, open your Terminal, as shown in Figure 1.

Open terminal
Figure 1 - Open terminal

Enter ifconfig and hit Enter. Look for inet (in our case, the second line, highlighted in Figure 2). Next to it, you will find your local IP address.

Look for your local IP address
Figure 2 - Look for your local IP address

Is this my IPv4 or IPv6 address?

This is your IPv4 address. They are commonly displayed as four sets of numbers separated by dots. IPv6 addresses on the other hand use a more complex alphanumeric format, meaning you will find letters and semicolumns in there.

Example IPv4 address: 192.168.1.100

Example IPv6 address: fe80::200:5efe:feff:feee

Can I change my local IP address?

Yes, your local IP address can change depending on the router's settings of the network you are connected to. If your router assigns static IP addresses, then it is more or less permanent, otherwise it is common for routers to assign new IP addresses to the connected devices after a certain period of time. Also, depending on your settings, your router restarting may automatically give you a new IP address, regardless of how much time has passed since the last renewal.

More information