Last active
January 28, 2020 17:49
-
-
Save dasbairagya/89a65683873579935b7794c85af41a2a to your computer and use it in GitHub Desktop.
Steps to create a permanent Bash alias:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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