在Terminal下用export PS1=XXX   修改完后,本次生效,但是重新启动Teminal后又恢复到默认格式。
如何才能永久保存自定义的提示符格式呢?

1,~下面本来没有 .bash_profile,要用touch .bash_profile手动创建。

2,open -e .bash_profile 打开文件加入export PS1=XXX 这行,保存并关闭文件。

3, source .bash_profile 使更新生效。

相关文章:

  • 2022-01-17
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-02-22
  • 2021-05-20
猜你喜欢
  • 2021-10-15
  • 2021-11-09
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案