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

# User specific aliases and functions

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

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

# User specific environment and startup programs

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

closed as off-topic by tripleee, Anthony Geoghegan, Jeff Schaller, DarkHeart, Archemar Apr 26 '17 at 14:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – tripleee, Anthony Geoghegan, Jeff Schaller, DarkHeart, Archemar
If this question can be reworded to fit the rules in the help center, please edit the 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 '15 at 12:36
  • 3
    it's source not Source. – chaos Mar 13 '15 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 '15 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 '15 at 16:42

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
  • Thanks!!! Should have seen that, I was messing around with the file on vi the other day. Anyway, thanks a bunch. – GMahan Mar 13 '15 at 12:59

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