CentOS 7 ifconfig 명령어 없음

CentOS 7 ifconfig 명령어 없음
ifconfig: command not found

1 문제상황[ | ]

  • CentOS 7을 최소설치했더니 ifconfig가 없다.[1]
[root@zetawiki ~]# ifconfig
-bash: ifconfig: command not found
[root@zetawiki ~]# /sbin/ifconfig
-bash: /sbin/ifconfig: No such file or directory

2 해결방법 1: ip 명령어 사용[ | ]

  • ifconfig 명령어 대신 ip 명령어를 사용하자.
[root@zetawiki ~]# 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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:cb:a9:a7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.245.130/24 brd 192.168.245.255 scope global dynamic ens33
       valid_lft 1786sec preferred_lft 1786sec
    inet6 fe80::20c:29ff:fecb:a9a7/64 scope link 
       valid_lft forever preferred_lft forever

3 해결방법 2: net-tools 설치[ | ]

  • ifconfig 명령어를 가지고 있는 net-tools 패키지를 설치하자.
[root@zetawiki ~]# yum install net-tools
... (생략)
===========================================================================================
 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
Is this ok [y/d/N]: y
... (생략)
Installed:
  net-tools.x86_64 0:2.0-0.17.20131004git.el7                                              

Complete!
[root@zetawiki ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.245.130  netmask 255.255.255.0  broadcast 192.168.245.255
        inet6 fe80::20c:29ff:fecb:a9a7  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:cb:a9:a7  txqueuelen 1000  (Ethernet)
        RX packets 12519  bytes 18371158 (17.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5956  bytes 375847 (367.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 0  (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

4 같이 보기[ | ]

5 주석[ | ]

  1. CentOS 6 최소 설치에는 있었는데;;;

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}