~/.bash_profile

每个用户都可使用 ~/.bash_profile 文件输入专用于自己使用的 shell 信息,~ 表示用户的家目录,如 root 用户就是 /root/.bash_profile
当用户登录 shell 时就执行该文件,该文件仅仅执行一次,默认情况下,该文件设置一些环境变量,执行用户的 .bashrc 文件,默认配置如下:

[root@localhost ~]$ cat /root/.bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

 

 

 

 

 

 

 

     

posted @ 2019-02-01 10:06  孔雀东南飞  阅读(933)  评论(0编辑  收藏  举报