0

Ubuntu 14.04 get stuck when trying to login my desktop. The screen goes black and soon after that the login screen bounce back.

Actually i added a line in /.profile file in last boot-up export PATH= .:$PATH and during next boot, it started to enter in loop.

login into tty1 showing

-bash: export: '.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/bin:/home/mohammad/android-sdk-linux/platform-tools:/home/mohammad/android-sdk-linux/tools' : not a valid identifier

entering any command in tty1 showing

-bash:<command name> : NO such file or directory

1 Answers1

1

I'm guessing you wanted to be able to run commands in your current working directory without typing the prepending ./? Oh well, this is still fixable.

You've only messed up your own user profile, so we can use the root account to repair this damage. First off, you're going to want to boot into recovery mode on your system. From there, select the option that says root, which will drop you into a usable terminal.

From there, you want to cd to your user's home folder (/home/<your username>, the ~ shortcut will not work here). From there, edit your .profile file with something like nano or vi. Delete the line containing:

export PATH= .:$PATH

Be sure to also check .bashrc, .bash_profile and similar files just to be sure. Remove the same line there (if they exist).


If you do want to try this again, be careful to not include spaces in the profile, and be sure to add the . to the end, like so:

export PATH="$PATH":.
Kaz Wolfe
  • 34,680