-1

I need your help. I'm stuck with the Ubuntu Login Loop and I guess, it happened because I tried to add the PATH for Laravel to .bashrc. This went wrong and now I tried a lot to put into .bashrc, .profile or the other files. Nothing of that helped on the long run.

So, im able to change from the Login UI to the terminal and logged in. If I try ls, I get: This command could not be found because /bin:/usr/bin is not part of the environment PATH. Thats when I run export PATH=/usr/bin:/bin. That works for executing ls or nano.

Then I added PATH=/usr/bin:/bin to .bashrc and executed source .bashrc. However, as soon as I log out and try to log in to the gui or in the terminal, it does not work. I need to again run the export command in terminal, since it seems to skip the .bashrc entirely. I tried different statements from other threads such as Ubuntu login loop due to path variable or Can't execute terminal commands: "the command 'sudo' is available in '/usr/bin/sudo'". For example, I added PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" to .bashrc. Nothing helped.

Is there no way to simply set back bash to the standard configuration? Or do you have another idea what to do, when it seems like .bashrc is completely ignored and bash does not find any commands and in the end stops you from logging in?

Greetings,

RastaTux

4
  • 2
    You can copy original .bashrc and .profile files from the /etc/skel directory - see for example Screwed up terminal after modifying bashrc. Did you also modify the /etc/environment file? Commented Jun 17 at 19:19
  • Thanks, copied the .bashrc over and executed source .bashrc, but still I got the same problems. So basically, I'm not even sure if the .bashrc is the problem? I did not knowingly modify /etc/environment, this is it's content: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
    – Rastatux
    Commented Jun 17 at 20:03
  • 1
    If you modified .profile, you should probably replace that with a copy from /etc/skel as well Commented Jun 17 at 20:28
  • @steeldriver Ugh, THAT was it.. Now it worked... Thanks a lot!!!
    – Rastatux
    Commented Jun 17 at 20:54

0

You must log in to answer this question.

Browse other questions tagged .