I have set up a few aliases in my .bashrc file, like the following:

alias ras='rails server'
alias res='redis-server'
alias rc='rails console'
alias be='bundle exec'

# git alias's are as follows
alias gs='git status'
alias gc='git commit'
alias go='git checkout'
alias ga='git add -p'

But when I try them out, gs opens up ghostscript, and go master returns

:~/Work/boogle[master]$ go master
The program 'go' is currently not installed.  You can install it by typing:
sudo apt-get install golang-go

I am using Ubuntu 12.04 LTS. How can I make my aliases work?

  • 8
    Did you reload the file (. ~/.bashrc) after editing it? Apr 23, 2013 at 9:44
  • 1
    If you do lots of changes to the rc file, as I suspect you will, you could be helped by an alias like this: alias bup="hash -r; unalias -a; source ~/.bashrc". The third part is the most important one. Faster to type than the source (or .) command with the filepath. Or even better, put it in a script (i.e., another file) so it will still work even though you break the rc file (e.g., by a typo). Or, you could put that line first in .bashrc, that would be sort of the same. Apr 23, 2013 at 15:43


Browse other questions tagged or ask your own question.