2013年8月19日 星期一

linux-login-scrip


.profile
ntpdate -s stdtime.gov.hk




To test this, add something like the following each file: .bashrc, .bash_profile and .bash_login.

echo "DEBUG: I am .bashrc"

echo "DEBUG: I am .bash_profile"

Then log out and log in again.
When you log in, I bet you will only see the phrase "DEBUG: I am .bashrc" but not "I am .bash_profile".

If so, it means you are a "interactive non-login shell", which simply means that Bash will call .bashrc but not .bash_profile.

 For information why these dotfiles are the way they are, see @Andrejs Cainikovs's post below and http://mywiki.wooledge.org/DotFiles

沒有留言:

張貼留言