In our daily computer work, we need to know the IP address of our machine from time to time. This tutorial lists three ways you can use to find the IP address of your local network card in Debian 11 with the help of the terminal.
Using ifconfig command
A widely used command to find a network configuration is the ifconfig command. If it is not installed on your machine (which was the case on my system), you can install it by following the procedure.
Open the terminal with root privileges and execute the following command to install net-tools packages.
apt-get install net-tools
Wait for the command to finish.
When you have successfully installed the ifconfig command on your machine, execute it on the terminal.
You will see which IP address is bound to which network interface. If you want to check the network configuration for a particular interface, the command should look like the following.
Replace <interface> with the interface that you like to look up. In my example, the network interface is ens33.
Using ip addr command
The second command you can use to find an IP address is the ip addr command. Execute “ip addr” on the terminal.
You will see which IP is bound to which interface in the command output.
Using hostname command
The last command you can use to find an IP address is by executing the hostname command as follows.
You will have the following result on your terminal.
These are all the methods you can use to find the network configuration of your machine. Enjoy!!