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