In ubuntu, the/etc/environment file is modified to cause the login failure. To solve this problem, set PATH = "/usr/local // sbin:/usr/local/bin in the/etc/environment file: /usr/bin:/sbin:/bin:/usr/games "is deleted. Result: I was unable to log on to ubuntu. after entering the login information correctly, the screen was black and I went back to the login box. Cause: When the UBUNTU system is started, run/etc/profile first and search for the required items according to the path in/etc/environment. Therefore, once the path is deleted, then ubuntu cannot find the file and cannot log on normally. Solution: Enter the logon interface: CTRL + ALT + F1 solve the problem by setting temporary variables export PATH = "/usr/local/sbin:/usr/local/bin: /usr/bin:/sbin:/bin:/usr/games "note that this is critical, in this way, you can use tools such as vi and vi/etc/environment to convert PATH = "/usr/local/sbin:/usr/local/bin:/usr/bin: /sbin:/bin:/usr/games "to add it, restart and OK