Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Upon opening a new terminal window, I'm getting a blank prompt with a flashing cursor.

New terminal window / blank promp (image)

This just started happening the last couple days and I can't seem to find a solution. Prior to this, I modified .bashrc to shorten the working directory. I also included some RVM scripts for configuring a Rails environment.

#   01/15/14 
#   Hide working directory on prompt
    export PS1="\W: "

#   RVM Scripts
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm

I can get a working prompt by entering ctrl+c, however, this then ignores the .bashrc snippet for shortening the working directory.

Working prompt (image)

Rebooting does not solve this.

share|improve this question
I was able to get everything working by simply removing the '.profile' line in .bashrc and restarting the terminal. Thank you @falconer for the explanation. – Kyle.Belanger Jan 20 '14 at 16:56
up vote 0 down vote accepted


[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"

will source your .profile file in your .bashrc

On my Ubuntu install and I think on all Ubuntu/Debian install .profile contains this:

if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"

That means your .profilealso sources your .bashrc. So you get into a nice infinite loop.

Don't source .profile from .bashrc, it is unnecessary. Remove that line.

(What I don't understand how can you login at all?)

share|improve this answer

Are you shure, that you have sh/bash access? Can you please post

# cat /etc/passwd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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