본문 바로가기

Linux

.bash_profile

1. 경로 이동[root@server ~]# cd

접속하는 계정의 홈경로로 이동합니다

 

 

2. .bash_profile 수정하기

[root@server ~]# vi .bash_profile (.bash_profile을 vi편집기로 실행) PATH=$PATH:HOME/bin:/usr/app/mysql/bin:/usr/local/apache/bin (위와 같이 PATH로 된 부분에서 실행하고자 하는 파일이 있는 경로를 콜론으로 붙여서 추가한다) BASH_ENV=$HOME/.bashrc USERNAME="root" :wq (편집 중인 vi편집기를 저장하고 종료한다)

 

3. 수정한 .bash_profile 적용하기

# source .bash_profile (.bash_profile이 적용되도록 한다)

 

적용을 완료하게 되면 기존의 /usr/app/mysql/bin 경로를 지정하여 실행하였던것을 모든 경로에서 사용할 수 있게 됩니다.

 

 

 

 

참조:https://server-talk.tistory.com/8

'Linux' 카테고리의 다른 글

[Jenkins] credentials 삭제하는 방법  (0) 2020.07.17
[Jenkins] Jenkins plugin 위치  (0) 2020.07.13
[리눅스] vi명령어  (0) 2020.03.21