
$PATH
일부 소프트웨어를 설치하는 동안 실제로 변수를 망쳤습니다 ~/.bash_profile
. 사용하는 대신
export PATH=$PATH:/some/other/path
내가 멍청하게 이런 짓을 했어
export PATH=~/some/other/path
따라서 어떤 명령도 사용할 수 없습니다. 시도하면 ls
이것을 얻습니다.
$ ls
bash: ls: command not found...
Similar command is: 'lz'
~/.bash_profile
이 혼란을 해결하려면 어떻게 편집해야 합니까 ? vim이나 emacs를 사용할 수 없습니다.
답변1
/bin/nano ~/.bashrc
또는
/usr/bin/emacs ~/.bashrc
또는
/usr/bin/vim ~/.bashrc
답변2
그냥 emacs나 vim의 전체 경로를 사용하세요. 즉.
/bin/vim .bash_profile
답변3
답변4
를 사용하고 싶지 않다면 vim
즐겨 사용하는 편집기를 사용하여 홈 디렉토리에 있는 를 편집하세요.emacs
nano
bash_profile
atom ~/.bash_profile
또는
subl ~/.bash_profile
그리고 맨 아래에서 원하는 대로 편집하면 됩니다.