, ,

Linux – Aliases for root user

the start bash script is among others: /etc/bash.bashrc
The aliases file can be linked from inisde the file.
Example

# add global aliases
if [ "`grep '/etc/bash.bash_aliases' /etc/bash.bashrc`" == "" ] ; then
   sudo sh -c ' printf "\nif [ -f /etc/bash.bash_aliases ]; then\n    . /etc/bash.bash_aliases\nfi\n" >> /etc/bash.bashrc';
fi;
sudo ln -s $HOME/.bash_aliases /etc/bash.bash_aliases


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *