MacOS echo $PATH 초기화

이로률·2022년 9월 27일
0

MacOS

목록 보기
4/4


자바 버전 삭제 안하고 변경하면 경로가 아주 지저분해진다

초기화 하는 방법은 터미널에서

  1. defaults write com.apple.finder AppleShowAllFiles YES 입력

  2. vi ~/.bash_profile 입력 후 i를 눌러 편집 상태로 변환

  3. 밑에 코드로 파일 수정

PATH=/usr/bin:/bin:/usr/sbin:/sbin   
export PATH  
PATH=/usr/local/bin:/usr/local/sbin:"$PATH"  
PATH=/opt/local/bin:/opt/local/sbin:"$PATH"
  1. esc 누른 후 :wq 입력하고 return 키를 눌러 저장한 다음,
    터미널 종료 후 다시 실행

  2. defaults write com.apple.finder AppleShowAllFiles NO 입력

  3. 다시 echo $PATH를 입력하여 초기화 됐는지 확인


출처 : https://apple.stackexchange.com/questions/216125/how-can-i-reset-path-in-osx
profile
💻🧐💗💝💘💖

0개의 댓글