1.问题原因:大部分是由于才在/etc/profile里配置了新的环境变量(PATH),而配置错误造成的。比如,新安装了java jdk并配置后。
2.解决方法:
ctrl + alt + F1 进入文字界面
登录
进入root: /usr/bin/sudo su
查看profile:cat /etc/profile
检查profile里哪些是新改动的,有没有可能有错误
编辑改正profile:vi /etc/profile
若实在不知道profile里新加入的PATH哪里错了,则先将新加入的内容删掉,以后再重新加入
保存并退出profile: :x
ctrl + alt + F7回到图形界面,再次尝试登录。
2.解决方法:
ctrl + alt + F1 进入文字界面
登录
进入root: /usr/bin/sudo su
查看profile:cat /etc/profile
检查profile里哪些是新改动的,有没有可能有错误
编辑改正profile:vi /etc/profile
若实在不知道profile里新加入的PATH哪里错了,则先将新加入的内容删掉,以后再重新加入
保存并退出profile: :x
ctrl + alt + F7回到图形界面,再次尝试登录。