An IP address is a unique label that is assigned to every system connected to a network or the Internet for identification and communication. This is very important information you need to know to configure network applications, troubleshoot network problems, and allow other users to access your system to share resources.
When it comes to a network device, there are usually two main types of IP addresses, i.e. external IP address and internal IP the address. An external IP address is the address that you get when you connect to the Internet and is assigned to your router by your ISP. Whereas an internal IP address is an address that is assigned to you by your router or internet device that helps you connect to the internet.
In this article, we will explain how to find the internal IP address in a Debian based OS. There are basically two methods to find it through the GUI and the command line. We will describe both methods, including various commands. The commands described in this article will work for Ubuntu and Linux Mint also.
We will use Debian 10 for a description of the procedure mentioned in this article.
Find the internal IP address through the GUI
On Debian based OS, we can use the graphical method to find the internal IP address assigned to our system. To do this, click the network icon in the upper right corner of your desktop. When the menu appears, click on Wired connected option. See screenshot below for clear understanding.
Then click on Wired settings option.
The network settings window will open. To view the settings for a wired or wireless connection, click the gear icon in front of the connected interface.
It will display detailed settings for your network interface, including internal IP address, MAC address, default route, and DNS information.
Find the internal IP address via command line
Finding the internal IP address via the command line is much easier than using the graphical method as you don’t have to navigate multiple windows. just open Terminal and enter a one line command to find your internal IP address. We will see various commands with which you can determine your internal IP address.
First, we need to launch the Terminal application. To do this go to Activities a tab located in the upper left corner of the desktop. Then in the search bar enter Terminal… When the terminal icon appears, click it to launch it.
After opening Terminal, try using the commands below one by one to find the internal IP address.
Method # 1: Using the IP Address Command
In this method, you can use the IP command in different ways to find the internal IP address of your system. In Terminal, enter either ip a, ip address, or ip address:
$ ip a
The result will look something like this:
From the above output, you can see the IP address in the highlighted rectangle along with other information.
Method # 2 using the ifconfig command
ifconfig is the most commonly used command in various Linux distributions, but it is now deprecated and therefore missing from the latest version of the Debian OS. However, we can still use it. And for that we have to install it using apt-get command. Open Terminal and run the following command in it:
$ apt install net-tools
After installation, enter the following command to find out the IP address.
This command displays the IP addresses of all active network interfaces, including other information.
To view the IP address of a specific interface, use the following command syntax. Be sure to replace interface_name with your interface name like ens33, eth0, etc.
$ /sbin/ifconfig interface_name
In the output below, you can see the IP address in the highlighted red rectangle.
Method # 3 Using the IP Route Command
IP route or ip r The command is actually used to display the routing table in Linux. However, we can also use it to find the internal IP address. To do this, open Terminal and enter the following command in it:
$ ip r
In the output below, you can see the IP address of the system.
Method # 4 Using the hostname command
IN hostname The command is actually used to display the hostname of the system. However, we can also use it to display the IP address of our system. To do this, open Terminal and enter hostname followed by -I symbol as below:
$ hostname –I
5. Using the nmcli command
Nmcli it is a command line tool that is used to manage NetworkManager. You can use it to display the IP address of a network device along with its status. To use this command, open Terminal and enter the following command:
$ nmcli –p device show
From the output below, you can see the IP address of the network interface along with other details.
Now we have learned how to find the internal IP address in a Debian based OS. You can use the GUI or the various command line methods described above. Besides Debian, these methods can be applied to other Linux distributions as well.
6 ways to find your internal IP address in Debian