Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I keep getting the following error when I open my terminal. I am running Fedora 19.

bash: Source: command not found

The above error also caused my screen to go blank when I tried to login. I then renamed by .bashrc and .bash_profile files, and the system came up fine. So it seems the problem may be with one of these files, but I am unable tell what it is.

Here are my bashrc and bash_profile files:

[gmahan@localhost ~]$ cat .bashrc
# .bashrc

[ -z "$PS1" ] && return

Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# User specific aliases and functions

[gmahan@localhost ~]$ cat .bash_profile
# .bash_profile

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

# User specific environment and startup programs

Can anyone tell me what the problem might be. Thanks.

share|improve this question
    
Thanks, but could you elaborate. I'm not sure how to go about fixing it. I did reinstall the bash package, but I had no luck. –  GMahan Mar 13 at 12:36
2  
it's source not Source. –  chaos Mar 13 at 12:42
    
I have printed it exactly as it's displayed on the terminal. I thought about that too, It says "Source:" –  GMahan Mar 13 at 12:44
1  
While this error is unrelated to the message indicated, you need to separate the [ command with spaces: [ -f ~/.bashrc ]. See unix.stackexchange.com/q/134472 . –  Emil Jeřábek Mar 13 at 16:42

1 Answer 1

up vote 10 down vote accepted

The error is caused by the following line:

Source global definitions

It's probably not a command, but a comment. Prepend a # to the line and the error should be gone.

# Source global definitions
share|improve this answer
    
Thanks!!! Should have seen that, I was messing around with the file on vi the other day. Anyway, thanks a bunch. –  GMahan Mar 13 at 12:59

Your Answer

 
discard

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.