Ubuntu cannot log on to the endless loop. solve this problem. I installed Windows 7 + ubuntu on my computer some time ago. Then I set up a java Development Environment on ubuntu, installed jdk, tomcat, eclipse, mysql, and other environment variables, after all these steps are completed, ubuntu restarts inexplicably. Then, on the login page, enter the user name and password, and the login will not go in. The system prompts that the information will flash through, so it will continue to log on in an endless loop, I don't know why, so I Googled it and finally found the cause, which is due to a problem with JDK environment variable configuration. The following is a solution: On the login screen, press alt + ctrl + f2 to enter tty2. Because no environment variable is set, the command must be in the full path. For example, if ls is to be input, to edit the/etc/environment file, you must have the root permission. If yes, run the following command on my computer: /usr/bin/sudo/usr/bin/vi/etc/environment edit the/etc/environment file and put the cursor Move the row to be deleted. Press dd (twice) and the row will be deleted. Enter ": wq" (not including double quotation marks) to save and exit vi, and then exit and exit tty2. Log On again. OK!