To create aliases, create and edit the
.bashrc file in the
/root directory.
# .bashrc
# User specific aliases and functions
alias rm="rm -i"
alias cp="cp -i"
alias mv="mv -i"
alias h="history 25"
alias j="jobs -l"
alias la="ls -a"
alias lf="ls -FA"
alias ll="ls -lA"
alias updatedb="/usr/libexec/locate.updatedb && echo '>>> Locate database updated successfully'"
alias apache.start="/usr/local/sbin/apachectl -k start && echo 'Apache started'"
alias apache.stop="/usr/local/sbin/apachectl -k stop && echo 'Apache stoped'"
alias apache.restart="/usr/local/sbin/apachectl -k stop && sleep 3 && /usr/local/sbin/apachectl -k start && echo 'Apache restarted'"
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi