Linux cannot access the system due to errors in modifying Environment Variables

Source: Internet
Author: User

Errors in modifying environment variables in linux cannot lead to system problems 1, because you are not careful about etc/environment (the specific situation is different. I changed it to '/etc/profile', the same below) cannot log on due to environment variables. Do not set export PATH in etc/environment. As a result, the system cannot log on after restart. In the logon interface, alt + ctrl + f2 enter the command mode, if the root user is not the root user, enter [the root user cannot be so arrogant, gedit editing will not display]/usr/bin/sudo/usr/bin/vi/etc/environment see this in others' blogs, I don't know whether the problem is my computer or not. It should be the author's mistake. I changed/usr/bin/sudo vi/etc/environment. Due to environment variable changes, sudo that can be directly recognized cannot be directly identified, the addition of/usr/bin is to identify sudo followed by basically the same basic commands. Personally, I don't know if it is correct, but I have changed it like this. It can solve the problem of failure to log on to the system due to environment variable settings or screen display. Move the cursor to the export PATH ** line and press d twice consecutively to delete the row. Press: wq save and exit. Type/sbin/reboot to restart the system. My error is: in the/etc/profile file, export PATH =/home/linux /... the correct method should be: PATH = "$ PATH =/home/linux /... "export PATH: Use the # source/etc/profile command to make it take effect immediately.
 

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.