Scenario / Questions

I would like to have

alias ll="ls -l"

to be system wide.

How is that done on Ubuntu?

Find below all possible solutions or suggestions for the above questions..

Suggestion: 1

Add it in to /etc/bashrc. This will (or should) get called on login by every user who uses bash.

Suggestion: 2
# 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

Suggestion: 3

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.