linux shell不显示路径问题

来源:互联网 发布:php构造方法怎么写 编辑:程序博客网 时间:2024/05/29 03:37
突然在linux shell中不显示路径了,用起来很不方便.

如何改为显示路径的shell

步骤如下:

vi ~/.bash_profile

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

然后执行
source ~/.bash_profile

这样shell就可以显示路径了

更改之前:

bash-4.1# echo $SHELL
/bin/bash

更改之后:

bash-4.1# vi ~/.bash_profile
bash-4.1# source ~/.bash_profile
[root@localhost jhj]#

0 0
原创粉丝点击