Skip to content

Instantly share code, notes, and snippets.

@da8
Last active January 24, 2022 17:06
Show Gist options
  • Select an option

  • Save da8/33154bbf2ec6c3eb65143c7278e765ac to your computer and use it in GitHub Desktop.

Select an option

Save da8/33154bbf2ec6c3eb65143c7278e765ac to your computer and use it in GitHub Desktop.
create permanent bash alias on Kubuntu 20.04.3
You need to put bash shell aliases in the ~/.bashrc file file executed by bash for non-login shells. On most modern Linux distros, you may want to put all your bash alias definitions into a separate file like ~/.bash_aliases, instead of adding them in the ~/.bashrc file directly.
Please note that ~/.bash_aliases file only works if the following line presents in the ~/.bashrc file:
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Edit ~/.bash_aliases or ~/.bashrc with the editor of your choice
Append your bash alias with for example with: alias ll='ls -la'
Save and close the file.
Activate alias by typing: source ~/.bash_aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment