View Linux IP Configuration: Quick Commands
One option is to use the following command to view IP configuration in Linux system:
- show the network interfaces
ifconfig
- Display IP address information.
ip addr show
- display the routing table
ip route show
- Display the contents of the resolv.conf file.
cat /etc/resolv.conf
- “The command hostname -I provides the IP address of the host.”
hostname -I
Please note that the above commands may need to be run with root or administrator privileges.