|
发表于 2006-6-8 19:19:23
|
显示全部楼层
[quote:b97bd5f4e1="jiangtao9999"]root 登陆后是 bash# [/quote][code:1]When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.[/code:1][quote:b97bd5f4e1="jiangtao9999"]但如果 su 一下 root 。
就恢复正常了,不过我还没看 export 里的东西都对不对。[/quote][code:1]When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.[/code:1][code:1]# /etc/skel/.bash_profile:
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/dot-bash_profile,v 1.1 2005/04/30 00:08:01 vapier Exp $
# This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages.
[[ -f ~/.bashrc ]] && . ~/.bashrc[/code:1] |
|