본문 바로가기

Programing/Linux

[Solved] /etc/bash.bashrc 수정 후, 터미널 에러

최근 공용 bash파일(/etc/bash.bashrc)에 환경변수를 추가한 후 

재로딩($ source ~/bash.bashrc)을 했을때 터미널에서 불길한 에러를 띄웠다.

현상.

### 터미널 에러 내용 ###

command 'lesspipe' is available in the following places 
* /bin/lesspipe
* /usr/bin/lesspipe
The command could not be located beacuse '/usr/bin:/bin' is not included in the PATH environment variable.
lesspipe : command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found 

 

불길한 마음에 최근 바꿨던 bash파일을 재수정 하려 명령어를 쳤는데 

$ sudo nano /etc/bash.bashrc
Command 'sudo' is available in '/usr/bin/sudo'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
sudo : command not found 

 

솔루션.

# 해당터미널 export 실행(추가)후 bash파일 재수정

$ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
$ sudo nano /etc/bash.bashrc

Done.