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

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

                   [root@wang ~]# echo “alias rm=’echo this command does not allow to use.’” > .bash_profile

                   [root@wang ~]#source .bash_profile

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

                    image

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

                          image

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

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

猜你喜欢

转载自blog.51cto.com/17532/2122370