------- CS -------/OS
[Linux][Solution] 터미널에서 명령어 못찾을 때 (command not found except cd)
enent
2021. 7. 10. 12:36
반응형
Enviornment : CentOS 7.8
Problem)
환경변수 설정을 잘못 입력한 후 source 명령어를 통해 적용시키면 터미널에서 명령어를 못찾는 문제가 발생한다
Solution)
아래 명령어처럼 실행관련 경로를 임시로 PATH로 설정해줌으로서 다시 접근할 수 있다.
export PATH=%PATH:/bin:/usr/local/bin:/usr/bin
이후 다시 환경변수를 설정해주면 정상작동한다
CentOS의 경우 /etc/profile 을 다시 수정하고, source /etc/profile을 통해 올바르게 재 적용 시켜준다.
https://unix.stackexchange.com/questions/302743/centos-7-all-command-not-found-except-cd
반응형