Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a .bash_profile, and its giving me an error "Unexpected end of file" I have no clue whats wrong, here it is,

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs
export PS1="\u@\h\\$"

export PATH
share|improve this question
That's nice. Where's .bashrc? – Ignacio Vazquez-Abrams Dec 24 '12 at 5:35
@IgnacioVazquez-Abrams Eh, as in does it exist? Or as in where is it located? I don't get what you mean, its located in the same directory as the bash_profile, and contains the following, # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi – ncms1 Dec 24 '12 at 5:48
@IgnacioVazquez-Abrams may be wondering, as I am, also, if the unexpected EOF is in that ~/.bashrc file, not in your .bash_profile. – Nicole Hamilton Dec 24 '12 at 6:20
what is the output of the following: source ~/.bashrc – jim mcnamara Dec 24 '12 at 22:25

Your Answer


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

Browse other questions tagged or ask your own question.