Skip to content

Instantly share code, notes, and snippets.

@irfanfadilah
Last active January 14, 2018 08:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irfanfadilah/a66fae48a04b8eed3708 to your computer and use it in GitHub Desktop.
Save irfanfadilah/a66fae48a04b8eed3708 to your computer and use it in GitHub Desktop.
Create Alias Command in Ubuntu
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