-bash-4.2修改用户名@主机 问题:Linux下shell显示-bash-4.2$,不显示用户名@主机 解决方法: vi ~/.bashrc 在最后加一句,其中\u当前登录用户名 \h当前计算机名称 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 例如: PS1='${debian_chroot:+($debian_chroot)}ICer@Centos:\w\$ ' 效果: