/etc/profile 과 /home/계정/.profile 은 사용자가 로그인할 때 적용되는 스크립트를 정의하는 파일이다.


일반적으로 ‘/etc/profile’에는 시스템 전반적인 환경 설정 값을 설정하고, ‘사용자 계정의 profile’에서는 해당 계정 사용자가 자신의 환경에 맞는 설정을 하게 된다.


로그인 시 ‘/etc/profile’ 스크립트 내용이 먼저 실행되고 이후에 각 ‘사용자 계정의 .profile’ 스크립트 내용이 실행된다.


root의 경우 ‘/root/.profile’ 또는 ‘/root/.bash_profile’ 이고 일반 사용자의 경우 ‘/home/계정/.profile’ 또는 ‘/home/계정/.bash_profile’이 실행된다.

 

‘/etc/profile’은 모든 사용자에게 적용이 되며 ‘사용자 계정의 .profile'은 로그인 한 해당 계정에만 적용된다.


따라서 root의 profile을 수정한다고 해서 다른 계정에 적용되지는 않는다.


' > linux' 카테고리의 다른 글

[Ubuntu] Set static address  (0) 2017.05.28
[Ubuntu] SSH  (0) 2017.05.28
[Common] Change password  (0) 2017.05.28
[Ubuntu] 저장소를 다음카카오로 변경  (0) 2017.05.28
[Ubuntu] '*** is not in the sudoers file' 오류 발생 시 처리  (0) 2014.02.18
Posted by 후니아부지
: