1.首先:
su 用户名
2.拷贝默认的.bashrc文件到该用户下
cp /etc/skel/.bashrc ~/
3.然后创建.profile文件,或者copy默认的.profile文件过来(copy的这种方法本人未验证,想来是一样的效果)
vi ~/.profile
创建后粘贴以下内容:
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n
4.生效命令:
source ~/.profile