View Linux IP Configuration: Quick Commands

One option is to use the following command to view IP configuration in Linux system:

  1. show the network interfaces
ifconfig
  1. Display IP address information.
ip addr show
  1. display the routing table
ip route show
  1. Display the contents of the resolv.conf file.
cat /etc/resolv.conf
  1. “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.

bannerAds