标签归档:bash4.1

Linux OS用户登录后_bash4.1处理

Linux os用户进入后,显示_bash4.1,在用户根目录下通过ls -a查看隐藏的文件,与正常用户对比发现无.bashrc和.bash_profile,补充即可。

缺少的文件主要为.bashrc和.bash.profile,内容分别如下。

vi .bashrc

#bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions

vi .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