Create Permanent Aliases in Linux

To create and keep aliases between sessions, you must save them in your shell configuration profile file. For bash, the path is ~/.bashrc.

The syntax is as follows:

$ alias shortName="really long name"

Here is an actual example:

$ alias ll="ls -alF"

So open your configuration file and add:

# You can comment with # btw 
alias ll="ls -alF" # for example
alias ela="extLauncher" # another example

Save the file. The file will be automatically loaded in your next session. If you want to use the newly defined alias in the current session, use source:

$ source ~/.bashrc

source:



Tags: linux, bash

← Back home