Alier

有点无聊的! 

需要在bashrc文件中修改ps1变量

gedit ~/.bashrc

 

 

修改

if [ "$color_prompt" = yes ]; then
    PS1=\'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ \'

将\u@\h中的\u(表示用户名)改为预设置的用户名比如user

if [ "$color_prompt" = yes ]; then
    PS1=\'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]user@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ \'

修改后如图

也可以修改主机名,也就是@后面的名称

 

分类:

技术点:

相关文章:

  • 2021-07-07
  • 2021-12-18
  • 2022-01-02
  • 2021-08-12
  • 2021-11-13
  • 2021-11-29
  • 2021-05-27
  • 2021-11-26
猜你喜欢
  • 2021-07-30
  • 2021-09-13
  • 2021-12-15
  • 2021-12-14
  • 2021-05-26
  • 2021-05-07
  • 2021-08-14
相关资源
相似解决方案