Phenomenon
After entering the password in the login screen, the desktop appears after the black screen terminal and quickly back to the login screen, press CTRL+ALT+F1 to enter the TTY can only execute CD, pwd command, other commands (such as Ls,sudo) can not be executed, the message is not found command (and I installed the Chinese system, In the TTY message or a bunch of garbled, the problem resolved after the decisive change to English).
Problem Locator
Can not enter the table can not execute the command, the system is basically a waste, if the re-installed system, the previous hard to build the development environment again, it is too troublesome. Think carefully about what was done before the restart, there is a key operation is I changed the system environment variables, but the current situation of the system is unable to see what changed, where the wrong change. One way to think of it is to insert the Ubuntu System CD (which I made with a U-disk) and start the Ubuntu system directly. This way into the system, the original system to view the/etc/profile file, found added the following two sentences:
export ANDROID_HOME=/home/ichangmao/software/android/android-sdk-linuxexport PATH=$PATHANDROID_HOME/platform-tools
This is the environment variable I added to facilitate the trial of ADB, but I accidentally added the error, and all paths are invalid, of course, none of the commands can be executed.
Solution Solutions
is a low-level error ah, write down may be useful to some students. The workaround is to enter the system (similar to Windows PE) with the Ubuntu System CD or USB stick, and correct the path and restart it.
export ANDROID_HOME=/home/ichangmao/software/android/android-sdk-linuxexport PATH=$PATH:$ANDROID_HOME/platform-tools
This means that when you modify path, you need to add a new path with the original path, and do not overwrite the path variable directly (where the colon is similar to the semicolon when you add environment variables under windows)
Other questions
Online Search data can not enter the desktop problem is because/home/user/. The permissions of the Xauthority file are modified (the owner is changed to another user), if this is the reason, you can press CTRL+ALT+F1 into the TTY at the login interface, and then execute the following command to point this file to yourself:
sudo chown user /home/user/.Xauthority
Note Replace user with your own user name.
Issues that cannot be reached on the desktop after Ubuntu restarts and all commands cannot be performed