How to make system wide alias for "ls -l"? [closed]
I would like to have
alias ll="ls -l"
to be system wide.
How is that done on Ubuntu?
Add it in to /etc/bashrc
. This will (or should) get called on login by every user who uses bash.
# echo "alias ll='ls -l'" >> /etc/bash.bashrc
and make sure that this file is executed whenever an user enters a shell by adding the following in ~/.bashrc
:
# Source global definitions
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
If your user's $HOME/.bashrc contains the usual
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
Then put it in /etc/bashrc. If it doesn't then put it in /etc/profile from where it will at least be read for login shells.