首先,su – 到新建立的用戶shell
拷貝默認的.bashrc過來bash
1
|
cp /etc/skel/.bashrc ~/
|
而後建立.profile文件app
1
|
vi ~/.profile
|
粘貼下面的內容spa
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
|
想當即生效,執行下面命令code
1
|
source ~/.profile
|