PS1的IP地址设置 ps1
程序员文章站
2022-07-12 23:51:03
...
vim .bashrc
PS1="\[\e[0m\][\u@\[\e[32;1m\]`/sbin/ifconfig eth0 | grep "inet addr" | sed -e "s/^.*inet addr:\(.*\) Bcast.*$/\1/"`\[\e[0m\] \W]# " export PS1