このセクションでは、ifconfigコマンドを使えるようにすることに紹介します。
最小構成(mini)でAlmaLinuxをインストールした場合、インストール直後はifconfigが使えない状態になっています。
[root@pub-web ~]# ifconfig
-bash: ifconfig: command not found
[root@pub-web ~]#
net-toolsをインストールします。
[root@pub-web ~]# yum install net-tools
Last metadata expiration check: 2:57:03 ago on Mon Jul 31 01:20:24 2023.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
net-tools x86_64 2.0-0.62.20160912git.el9 baseos 292 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 292 k
Installed size: 912 k
Is this ok [y/N]: y
ーー(省略)ーー
[root@pub-web ~]#
ifconfigコマンドが使えることを確認します。
[root@pub-web ~]# ifconfig -a
ens2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2400:4151:442:8d00:5054:ff:fe4b:70 prefixlen 64 scopeid 0x0<global>
inet6 fe80::5054:ff:fe4b:70 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:4b:00:70 txqueuelen 1000 (Ethernet)
RX packets 1036 bytes 150486 (146.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 83 bytes 5908 (5.7 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
[root@pub-web ~]#