Make an alias command in MacOS
1. Edit file
1
nano ~/.bash_profile
or
1
nano ~/.zshrc
2. Add this line to make an alias
1
alias <alias>='<actual command>'
For example
1
alias k='kubectl'
3. Refresh the shell environment
1
source ~/.bash_profile
or
1
source ~/.zshrc