Sunday, February 20, 2011

how to make your bash aliases available as a root in ubuntu

Create a ~/.bash_aliases file and put all your cute little aliases in there to use these as your own user, add the following into your local ~/.bashrc file:

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
to use these as root, add the following into your /root/.bashrc file:
if [ -f ~/.bash_aliases ]; then  
. ~/.bash_aliases

Read more: Ruby Newbie