CentOS--CentOS 8 View IP error: bash: ifconfig: command not found

When executing ifconfig in CentOS8 to check the IP address of the current server, an error is reported, as shown below.

[root@binghe ~]# ifconfig
-bash: ifconfig: command not found

At this time, you need to execute the following command to install the net-tools tool, as shown below.

yum -y install net-tools

After the installation is successful, enter the ifconfig command again to view the IP address of the current server, as shown below.

[root@binghe ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.175.101  netmask 255.255.255.0  broadcast 192.168.175.255
        inet6 fe80::5fb5:feaa:ee7e:f874  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:73:f0:90  txqueuelen 1000  (Ethernet)
        RX packets 10922  bytes 13205518 (12.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4431  bytes 306191 (299.0 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>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

1353 original articles have been published · 2379 praises · 5.43 million views

Guess you like

Origin blog.csdn.net/l1028386804/article/details/105479827