Ubuntu modify the PATH environment variable, the account can not log in how to do?

  

In the Ubuntu system operation, the account can not be logged in after setting the PATH environment variable. It is very simple to encounter this problem. Just change it back. The following small series asks everyone how to solve the problem after Ubuntu changes the PATH environment variable. Unable to log in.

is used to set the environment variable vi /etc /profile

and rearmost in the open file added export PATH = $ PATH: /home /alex /opt /EmbedSky/4.3.3/bin

Save, exit to return to the line, and then reboot

You will not be able to log in to the account.

Solution:

Restart, because it is a dual system, select interface (recovery mode) at this time will display "Recovery Menu (filesystem state: read-only) < Br>

In this state, you can't modify the file. In this case, you should first make  Recovery Menu (filesystem state: read-write)“

Method: Select root in recovery mode, then Enter mount -o remount,rw /

reboot and then enter recovery mode, then select the grub entry, and then run back to find that the first line becomes " Recovery Menu (filesystem state: read-write)“< Br>

(In this state you can delete the code that was added to the original.)

Then select root

vi /etc/profile

Then put yourself Add the code to go to delete, save, and exit.

Then restart, enter Ubuntu OK

The above is the solution to Ubuntu modify the PATH environment variable can not log in the account, the problem should be restarted first, then delete the added code to save can.

Copyright © Windows knowledge All Rights Reserved