Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
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
echo "alias ll-'ls -l'" >> ~/.bash_aliases
If your user's $HOME/.bashrc contains the usual
if [ -f /etc/bashrc ]; then
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.