老沙昨天还登录这个linux服务器,并且命令行好好的,今天突然在linux shell中不显示路径了,显示为-bash-4.1#。

以下是老沙的解决方案

vim ~/.bash_profile 如果没有会自动新建。

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

然后执行
source ~/.bash_profile

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

相关文章:

  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2022-01-08
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-31
  • 2021-07-09
  • 2021-12-11
相关资源
相似解决方案