Find Your Local IP Address
3 October 2023 2023-10-14 20:44Find Your Local IP Address
The Ifconfig Command
The ifconfig command is widely used but you may need to install the program first. It’s part of net-tools. To install, open a terminal and use the following command:
sudo apt install net-tools
To run ifconfig, simply execute this:
sudo ifconfig
The output will show the network interfaces with their associated IP addresses.
If you want to check a specific interface, use the command like this:
sudo ifconfig <interface>
The Ip Addr Command
Simply run the following command in the terminal. You don’t need superuser privileges to run this one.
ip addr
This will also output the network interfaces and their IP addresses.
The Hostname Command
This is another one that you can use as a regular user. Simply run this:
hostname -I
This will output the IP address of the interface in use.
Do note that these methods will output your private IP address.