Centos 7 최소 설치시 ifconfig 명령어 사용 불가
#ip addr 로 ip 확인 가능
[root@localhost ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:91:7d:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.233.129/24 brd 192.168.233.255 scope global dynamic eno16777736
valid_lft 1468sec preferred_lft 1468sec
inet6 fe80::20c:29ff:fe91:7dd4/64 scope link
valid_lft forever preferred_lft forever
ifconfig 명령어를 사용하려면
yum -y install net-tools
[root@localhost ~]# yum -y install net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.oasis.onnetcorp.com
* extras: mirror.oasis.onnetcorp.com
* updates: mirror.oasis.onnetcorp.com
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
net-tools x86_64 2.0-0.17.20131004git.el7 base 304 k
Transaction Summary
=============================================================================================================================================================
Install 1 Package
Total download size: 304 k
Installed size: 917 k
Downloading packages:
net-tools-2.0-0.17.20131004git.el7.x86_64.rpm | 304 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1
Verifying : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1
Installed:
net-tools.x86_64 0:2.0-0.17.20131004git.el7
Complete!
[root@localhost ~]# ifconfig -a
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.233.129 netmask 255.255.255.0 broadcast 192.168.233.255
inet6 fe80::20c:29ff:fe91:7dd4 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:91:7d:d4 txqueuelen 1000 (Ethernet)
RX packets 16295 bytes 21446168 (20.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4741 bytes 859738 (839.5 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 0 (Local Loopback)
RX packets 4 bytes 352 (352.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 352 (352.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
** 요약 **
1. 최소 설치시 #ip addr 로 ip 확인
2. ifconfig 명령어를 사용하려면 net-tools 패키지 설치
yum -y install net-tools