How to restore linux environment variables ubuntu root users cannot use commands
Source: Internet
Author: User
How to restore the linux environment variable ubuntu root users can not use the command problem analysis and solution: This is mainly a PATH problem, first check the $ PATH variable settings. The format of echo $ PATH is xxx: xxx, which should not contain the PATH/usr/bin. Run the following command to restore the linux environment variable ubuntu. the root user cannot use the command to analyze and solve the problem: this is mainly a PATH problem. First, check the setting of the $ PATH variable. The format of echo $ PATH is xxx: xxx, which should not contain the PATH/usr/bin. Run the following command to include this PATH: export PATH =/usr/bin/: $ PATH. if you want to log on to the system, this PATH is automatically included, you can add this command to/root /. bash_profile or/root /. after the bashrc file. Use Ubuntu12.04. To set the adb command to an environment variable ~ /. The following command is added to the bashrc file: export PATH =/home/develop/android-sdks/platform-tools. do not input common commands such as ls, cd, and. Not even vi. All errors are reported. The command cocould not be located because '/usr/bin' is not supported Ded in the PATH environment variable. clear: command not found. the system tool command cannot be found because the PATH of the system PATH is forgotten for a long time. But how can I change the configuration file? after a long time, I found it very simple. Directly use the full path of the system tool to edit the configuration file. I am using sudo vi/usr/bin/vi ~ /. Bashrc. then add the command export PATH =/home/develop/android-sdks/platform-tools/: $ PATH. Restart the terminal. Two points learned: 1. when the system command cannot be found, the path is usually incorrect. you can directly use the full path on the command line. 2. when setting environment variables, especially in linux systems, you can add your own environment variables and attach the previous variables. Add $ PATH at the end.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.