There are many commands that we use in Terminal often that may have many parameters (optional parameters) or are hard to remember and may take a while to type, alias command can help you to create shortcuts or name such commands with aliases that can help you speed up.
As Zsh is the default shell for macOS Big Sur (was made default since Catalina I suppose), I was trying to set my own aliases on my new MacBook, here is some examples of them that I have been using lately which you may find useful or get ideas from to create your own.
Note: If you are looking for how to set aliases follow this article:
desktop: Most often I save files on my desktop, so whatever directory I am and I want to go to desktop this alias takes me there,
alias desktop='cd /Users/code2care/Desktop'
temp:In order to know the temperature of my place, I run a curl command that displays weather details.
alias temp='curl wttr.in/chicago'
stop/start tomcat: Wherever I am, tying start my tomcat or stop my tomcat service. As a developer you might be using some other programming languages such as PHP, NodeJs and their application servers - you can make aliases for them as well.
stackoveflow: This one is my favourite, when I am stuck and need help, I type this alias command and Safari opens stackoveflow.com in a new tab.
alias stackoverflow='open https://stackoveflow.com'
sublime: Opens Sublime Text Editor.
alias sublime='open -a /Applications/Sublime\ Text.app;'
- wget Command on macOS Terminal
- bash: command not found error [macOS Terminal Linux, Unix or Windows]
- Spotlight Search Mac Keyboard Shortcut
- Show CPU and Memory Usage on macOS Menu Bar
- The default interactive shell is now zsh. [macOS]
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- ls: .: Operation not permitted - Mac Big Sur Terminal Zsh Error
- [macOS] Change homepage Macbook Safari Browser
- Youtube spacebar not working in search on macOS Safari
- 30+ Zoom video communications application shortcuts for macOS
- How to load zsh profile on opening shell terminal
- How to Use Command Prompt on a Mac?
- Setting JAVA_HOME in macOS Big Sur
- Set Python 3.8 as a default python version on macOS
- say command macOS terminal examples
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- Opening mac Terminal
- How to uninstall GarageBand from Mac
- How to identify installed Java (JDK) Version on macOS
- 10 Beginners Commands for macOS Terminal Usage
- How to Close Safari in Mac using Keyboard shortcut
- Zsh Shell: Custom alias that you may find useful
- How to make macOS Terminal window Transparent (or Opaque)
- How to install homebrew (brew) on M1 Mac
- Where is .zshrc file located in macOS
- Android Constant and Resource Type Mismatches Lint - Android
- Display Seconds in Digital Clock on Mac Menu Bar [macOS] - MacOS
- Bootstrap Nav Menu Dropdown on hover - Bootstrap
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj] - Java