首先,su – 到新创建的用户

拷贝默认的.bashrc过来

 
1
cp /etc/skel/.bashrc ~/

然后创建.profile文件

 
1
vi ~/.profile

粘贴下面的内容

 
1
2
3
4
5
6
7
8
9
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi
mesg n

想立即生效,执行下面命令

 
1
source ~/.profile