How do I find the IP address in Ubuntu?
You can check your IP address on Ubuntu using the following methods:
- To use the ifconfig command: open the terminal and type the following command:
ifconfig
In the output, you can find the IP address of the current network interface (such as eth0, wlan0, etc.).
- Use the ip command: Open the terminal and enter the following command:
ip addr
Detailed information about the current network interface, such as the IP address, can be found in the output results.
- Use the hostname command: open the terminal and type the following command:
hostname -I
This command will directly display the current host’s IP address.
- Utilize the network management graphical interface: In the Ubuntu desktop environment, you can view your IP address through the network management graphical interface. The specific method may vary depending on the desktop environment, so please refer to the appropriate documentation or user guide.
Note: In certain cases, root permission may be required to execute the above command. You can use the sudo command to obtain root permission, for example:
sudo ifconfig