This is the case: JDK and tomcat were installed on the Ubuntu Virtual Machine some time ago, and the environment variables were set in/etc/profile (for example, the figure has been changed, which is generally the case)
After logging on again several times, I found that even if I entered the correct user name and password, I jumped to the logon interface and could not enter the system.
Solution:
It was found online that it may be caused by environment variables. Therefore, you can only enter the command line through CTRL + ALT + F1, enter the user name and password with super permissions, and enter the command line mode, then, use VI to view the file where I previously set the environment variable,/etc/profile, and find that the command line is garbled due to an error in the system environment:
If garbled characters are found, you can add the complete path:/usr/bin/sudo/usr/bin/VI/etc/profile, and press dd to delete the wrong line, then press shift and enter ":", and then enter "WQ" and press Enter. restart again to solve the problem.