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;'
- How to display directory tree in Mac Terminal
- This operation couldnt be completed. Unable to locate a Java Runtime. [macOS]
- How to display Battery percentage on Big Sur Menu Bar
- Change color of macOS terminal prompt
- How to check zsh installed version using terminal
- How to connect Airpods to Macbook Air or Pro?
- 30+ Zoom video communications application shortcuts for macOS
- How to open new tabs macOS Terminal
- How to refresh Safari on Mac (macOS) using keyboard shortcut
- wget Command on macOS Terminal
- How to do calculations in Mac Terminal
- How to change default macOS Terminal Window size
- Change Terminal Cursor Type in Mac (MacOS Shell)
- [Eclipse] Locate Preferences in macOS
- How to remove app from Dock when closed [macOS Big Sur]
- Shutdown Mac Terminal Command
- How to clear Mac Terminal screen
- Google Search Hot Trends Screensaver for Mac OS X
- How to change macOS Safari default language
- Opening mac Terminal
- Spotlight Search Mac Keyboard Shortcut
- Show CPU and Memory Usage on macOS Menu Bar
- WARNING: Python 2.7 is not recommended [macOS Big Sur]
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to create alias in macOS
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console - Java
- Android : Connection with adb was interrupted 0 attempts have been made to reconnect - Android
- Java XML-RPC java.net.BindException: Address already in use - Java
- New-SPLogFile PowerShell - create new SharePoint log file - SharePoint
- Error : Facebook SDK AndroidRuntime?FATAL EXCEPTION: main - Android