In this post I am going to talk about how can we remain productive by creating bash aliases and save our time by creating easy to use shortcuts for repetitive commands.
What is Bash Alias
Bash Alias is more like a shortcut and it can be declared using the following command
alias alias_name = "command". Lets create a simple alias for listing hidden directories and files.
alias lm="ls -la"
note:there aren’t any spaces between the command and the name
Now we will be creating some useful bash aliases that we might use on daily basis
- git init (initializing git)
alias gi="git init"
- git push master (pushing files to GitHub)
alias gpm="git push your_repo_name master"
- listing files vertically
alias l="ls | more"
- Creating directories with a shortcut
- Removing Directory
alias r="rm -rf"
- Removing an Alias
So these are my so far favorite aliases if you think I missed something feel free to fork this repo and add your favorite aliases too. Anyways this repo is under MIT license and everyone is welcomed to use any of posts or even make edits to them.