5 Different ways to display IP addresses in Centos 7
Introduction Being knowledgeable about the commands associated with the manipulation of the network stack of the Linux operating system is important for Linux system administrators. Most of the commands that allow users to modify the networking of the system also allow us to obtain information about the servers’ network setup. This information includes mainly IP addresses and routing tables. In this article, we will look at five different ways by which we can display the IP address information about our server. For the purpose of this demonstration, we will be working on a Centos 7 system. Method 1: Using ifconfig command The ifconfig command is the most commonly used command for displaying and modifying IP addresses on the system. The name ifconfig is short for interface configuration. When used without any options or when used with the -a option it displays information about the interfaces available on the system and the IP address set on those interfaces. [root@linuxnix ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.23.131 netmask 255.255.255.0 broadcast 192.168.23.255 inet6 fe80::830:c411:78b:6bb9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7e:5f:4f txqueuelen 1000 (Ethernet) RX packets 810 bytes 80806 (78.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 394 bytes 54734 (53.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host>...
Read More