After entering my username and password when trying to log in, I am not getting the command prompt.

This is what my screen looks like:

pal login: root
Last login: Wed Oct 14 15:42:19 on tty1

I have searched this problem and doing a CTRL+Z fixes this for other people - Mine does nothing.

Another thing I have tried is CTRL+C. But doing this just prompts me to log in again.

Last time I was logged in, I did add a couple of lines to .bash_profile so is this likely to be the issue?

And does anyone have a fix for this please?



The changes to .bash_profile:

I had added four lines - each were aliases which performed a cd command to a directory which doesn't exist, but I then removed them after spotting this mistake. So I don't think it will be anything to do with this.

I also changed the path variable from this (I think):


to this:


I also added this line underneath the path variable line:

source .bash_profile

I was following some instructions with the above which weren't very clear. Maybe the source .bash_profile line wasn't meant to go there and was meant to entered as a command afterwards?


A snipped from the instructions I followed which I think has caused the problem:

Then update your PATH in your .bash_profile

cd ~
vim .bash_profile
source .bash_profile

  • Can you add to your question the lines you placed in the .bash_profile config? And also the config file for it if at all possible. – ryekayo Oct 15 '14 at 14:51
  • Okay, this is done. I've just read what source .bash_profile does! I guess its trying to reread it constantly! Is there any fix for this at all? – Chris Oct 15 '14 at 15:00
  • 2
    This indicates a PS1 problem. – Valentin Bajrami Oct 15 '14 at 15:05
  • 1
    source reloads the .bash_profile file. So the file is trying to reload itself constantly when it gets to that line, I guess, and its stuck in a loop. Can this be fixed? – Chris Oct 15 '14 at 15:12
  • 1
    What distro are you using? – ryekayo Oct 15 '14 at 15:14

Wait, you have .bash_profile source itself? First, that doesn't really make a lot of sense (the instructions you read probably did mean for you to run that as a command after having edited the file).

Second, I bet that's exactly what the issue is. If you have a file source itself without any guard (a condition for when it should stop), it will fall into an infinite loop. I imagine removing that line will solve your problem.

Since this problem is appearing at login, the simple solution is to login as the root user (assuming you have root privileges) and remove the offending line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.