CentOSの--CentOS 8 IPエラーの表示:bash:ifconfig:command not found


CentOS 8でifconfigを実行すると、次のように現在のサーバのIPアドレスの時報エラーが表示されます.
[root@binghe ~]# ifconfig
-bash: ifconfig: command not found

この場合、以下に示すようにnet-toolsツールをインストールするコマンドを実行する必要があります.
yum -y install net-tools

インストールに成功したら、ifconfigコマンドを再度入力すると、次のように現在のサーバのIPアドレスが表示されます.
[root@binghe ~]# ifconfig
ens33: flags=4163  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
        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  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        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