myzhijie

 在linux shell中不显示路径了,显示为-bash-4.1#用起来很不方便。

如何改为显示路径的shell呢?

步骤如下:

vim ~/.bash_profile

(不用管.bash_profile这个文件有几个,自己新建一个也是可以的)

在最后加上
export PS1=\'[\u@\h \W]\$\'

然后执行
source ~/.bash_profile

这样shell就可以显示路径了。

分类:

技术点:

相关文章:

  • 2021-11-16
  • 2021-11-05
  • 2021-12-22
  • 2021-12-07
  • 2021-09-17
  • 2021-06-29
  • 2021-11-20
  • 2021-11-03
猜你喜欢
  • 2022-01-08
  • 2021-12-05
  • 2021-12-09
  • 2021-11-06
  • 2021-05-14
  • 2021-09-27
  • 2021-05-11
相关资源
相似解决方案