Last active
January 14, 2018 08:32
-
-
Save irfanfadilah/a66fae48a04b8eed3708 to your computer and use it in GitHub Desktop.
Create Alias Command in Ubuntu
This file contains 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
1. Create a file called .bash_aliases using your favorite text editor. | |
gedit .bash_aliases | |
2. Write the alias you want to create, e.g: | |
alias update='sudo apt-get update' | |
3. Save the file and reconfigure your bashrc. | |
. ~/.bashrc | |
4. Check if your alias is added correctly. | |
alias | |
5. Now you can start to use your alias command. Yay! | |
update #alias for 'sudo apt-get update' | |
*note: You cannot use space for alias name for separator, use dash (-) instead. | |
wrong alias name : alias open document='cd; cd Documents' | |
correct alias name : alias open-documents='cd; cd Documents' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment