root用户:
export PS1=[`hostname`-`ifconfig en1|grep inet|awk '{print $2}'`-'$USER@$PWD]'
其他用户:
export PS1=`hostname`-`ifconfig en1|grep inet|awk '{print $2}'`-'$USER@$PWD$'
en1为网卡名称,需要自行修改
root用户:
export PS1=[`hostname`-`ifconfig en1|grep inet|awk '{print $2}'`-'$USER@$PWD]'
其他用户:
export PS1=`hostname`-`ifconfig en1|grep inet|awk '{print $2}'`-'$USER@$PWD$'
en1为网卡名称,需要自行修改