Skip to content

Instantly share code, notes, and snippets.

@dasbairagya
Last active January 28, 2020 17:49
Show Gist options
  • Save dasbairagya/89a65683873579935b7794c85af41a2a to your computer and use it in GitHub Desktop.
Save dasbairagya/89a65683873579935b7794c85af41a2a to your computer and use it in GitHub Desktop.
Steps to create a permanent Bash alias:
Open the Terminal app
1.Edit ~/.bash_aliases or ~/.bashrc file using: sudo nano ~/.bash_aliases
2.Append your bash alias
For example append: alias update='sudo yum update'
3.Save and close the file.
4.Activate alias by typing: source ~/.bash_aliases
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment