52ky 发表于 2022-5-2 10:33:36

LINUX下SHELL显示-BASH-4.1$不显示路径的解决方法

linux shell中不显示路径,使用起来很不方便。
如何更改外壳以显示路径?

进行如下操作:

vi ~/.bash_profile

(不管.bash_profile文件有多少,也可以自己新建一个)

在末尾添加:

导出 PS1='[\u@\h \W]\$'

然后执行

源?/ .bash_profile

这样shell可以显示路径

(The path is not displayed in the Linux shell, which is very inconvenient to use.
How do I change the shell to show the path?
Do the following:
vi ~/. bash_ profile
(no matter how many. Bash_profile files there are, you can also create one by yourself)
Add at the end:
Export PS1 = '[\ u @ \ h \ w] \ $'
Then execute
Source? / bash_ profile
This allows the shell to display the path
)



页: [1]
查看完整版本: LINUX下SHELL显示-BASH-4.1$不显示路径的解决方法