세라공원

[Linux][CentOS7] ifconfig 오류 : -bash: ifconfig: command not found 본문

Error

[Linux][CentOS7] ifconfig 오류 : -bash: ifconfig: command not found

세라박 2022. 10. 25. 14:00

situation : .bash_profile에서 export PATH 경로 수정 이후 ifconfig command가 사용되지 않음.

[root@oracle /]# ifconfig
bash: ifconfig: command not found

 

 

solution 

 

1) yum install net-tools → 이미 설치되어 있는 상황

[root@oracle /]# yum install net-tools
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                     | 3.6 kB     00:00
extras                                                   | 2.9 kB     00:00
updates                                                  | 2.9 kB     00:00
Package net-tools-2.0-0.25.20131004git.el7.x86_64 already installed and latest version
Nothing to do

 

2) sudo abt-get update → command 사용되지 않음

[root@oracle /]# sudo abt-get update
sudo: abt-get: command not found

 

3) ip addr → command 사용되지 않음

[oracle@oracle /]$ ip addr
-bash: ip: command not found

 

4) ip link → command 사용되지 않음

[oracle@oracle /]$ ip link
-bash: ip: command not found

 

5) ip -s link → command 사용되지 않음

[oracle@oracle /]$ ip -s link
-bash: ip: command not found

 

6) sudo ifconfig → 성공

[oracle@oracle /]$ sudo ifconfig
[sudo] password for oracle:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 00.00.00.00  netmask 000.000.000  broadcast 00.00.00.000
        inet6 xx00::x00:x0x0:xx00:0000  prefixlen 00  scopeid 0x00<link>
        ether 00:00:00:00:x0:x0  txqueuelen 1000  (Ethernet)
        RX packets 25614  bytes 2318952 (2.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1656  bytes 175813 (171.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 000.000.000.000  netmask 000.000.000.00
        inet6 ::1  prefixlen 000  scopeid 0x00<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2039  bytes 144350 (140.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2039  bytes 144350 (140.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

참고 : https://takudaddy.tistory.com/190

 

tip) 칼리 리눅스 ifconfig 사용 불가 해결법

이전 버전인 6.0까지만 해도 초반 로그인에 필요한 기본 아이디 및 비번 값이 root / toor로 고정이었고 이는 슈퍼유저/관리자 권한으로 로그인을 하는 것이기 때문에 시스템 내 모든 도구들을 제약

takudaddy.tistory.com

 

https://jy-tblog.tistory.com/11

 

[ CentOS ] ifconfig : command not found 오류

문제상황 1. CentOS 7 최소 설치 후 ifconfig 명령어가 없는 오류 발생 2. 네트워크는 정상 작동 해결 > yum install -y net-tools 확인

jy-tblog.tistory.com

 

Comments