今天,安裝配置完mysql后,重新連接的shell的時候顯示的不是root@localhost # 了,而是顯示的-bash-4.2#
提示信息:
Last login: Tue Apr 5 00:38:57 2016 from 119.255.38.138
-bash: /root/.bash_profile: line 15: syntax error: unexpected end of file
-bash-4.2# /root/.bash_profile: line 15: syntax error: unexpected end of file
-bash: /root/.bash_profile:: No such file or directory
肯定是配置mysql的環境變量的時候出現了什么錯誤
網絡上的額解決方法是:在終端里輸入:
PS1="[root@localhost ~]"
但是輸入后,每次編輯都是顯示root@localhost~,例如:進入/usr文件夾后,原來應該顯示的是root@localhost usr:#但是現在人就顯示的是root@localhost~。可見這個解決方法不是很正確。