码迷,mamicode.com
首页 > 系统相关 > 详细

linux下shell显示-bash-4.1#不显示路径解决方法

时间:2017-11-17 22:35:32      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:mil   key   export   自己   方法   keyword   tle   title   -bash-4.1   

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

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

步骤如下:

vim ~/.bash_profile

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

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

然后执行
source ~/.bash_profile

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

linux下shell显示-bash-4.1#不显示路径解决方法

标签:mil   key   export   自己   方法   keyword   tle   title   -bash-4.1   

原文地址:http://www.cnblogs.com/apexchu/p/7853666.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!