Ubuntu去掉命令行前用户名和主机名方法$ vi ~/.bashrc按a或i进入编辑模式PS1='${debian_chroot:+(debian_chroot)}w$ '默认为PS1='${debian_chroot:+(debian_chroot)}u@h:w$ ' 注:u为username,h为hostname按Esc键退出编辑模式:wq (保存并退出)$ source ~/.bashrc