首先,su – 到新創建的用戶
拷貝默認的.bashrc過來
cp /etc/skel/.bashrc ~/
然后創建.profile文件
vi ~/.profile
粘貼下面的內容
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n
想立即生效,執行下面命令
source ~/.profile