Ubuntu, One of the image systems we commonly use on the server side and the local computer side. We usually need to check the IP address of the current network when we use a server or a local computer. How to check it?
In Ubuntu, you can use the following commands to view the IP address:
Use ifconfig command:
ifconfig
This displays details of all network interfaces in your system, including IP addresses, subnet masks, and gateways.
Use the ip command:
ip addr show
This displays details of all network interfaces, including IP addresses, subnet masks, and gateways.
Use the hostname command:
hostname -I
This command will only display the IP address of the host.
Use the nmcli command (only for systems using NetworkManager):
Nmcli device show<interface name>| grep IP4
Replace<Interface name>with the name of the network interface (such as eth0 Wlan0, etc.), which will display the IP address information of the specified interface. Please note that in some cases, you may need to run the above command as an administrator (using sudo).
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge