Shell显示-bash-4.1#的解决方法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Shell显示-bash-4.1#的解决方法相关的知识,希望对你有一定的参考价值。

在SecureCRT上进行操作时,不小心进行如下操作:

?????????????????? [[email protected] ~]# echo “alias rm=’echo this command does not allow to use.’” > .bash_profile

?????????????????? [[email protected] ~]#source .bash_profile

?????????????? 结果再次打开时就出现如下状况:

??????????????????? 技术分享图片

??????????????? 不小心进行此操作,导致shell出现上述问题,为了解决此问题,只有手动编写.bash_profile.

????????????????????????? 技术分享图片

?????????????????? 针对shell,最重要的是语句export PS1=’[\[email protected]\H \W]\$’

???????????????????? 当编写完之后,记得保存#source .bash_profile,就可以生效了。

以上是关于Shell显示-bash-4.1#的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

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

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

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

CentOS下shell显示-bash-4.1$不显示用户名路径

ssh远程登陆linux显示-bash-4.1$解决方法

linux 命令行不显示路径了,而显示为-bash-4.1#的两种解决办法