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;'
- Opening mac Terminal
- Youtube spacebar not working in search on macOS Safari
- How to remove app from Dock when closed [macOS Big Sur]
- How to start/boot macOS in safe mode - Big Sur 11.0, Catalina 10.15, or Mojave 10.14
- How to open Terminal in Mac to run commands
- Spotlight Search Mac Keyboard Shortcut
- macOS Big Sur compatible Macs List
- How to change macOS Safari default language
- zsh: command not found: cls macOS Big Sur
- [Solution] macOS Big Sur Installation: There is not enough free space, Additional Space Required
- Android : Error in http connection java.net.SocketException: Permission denied - Android
- How to create Toast messages in Android - Android
- How to Search Something (string) in Android Studio Project like Eclipse - Android-Studio
- Free Unlimited Calls from MTNL & BSNL Landlines from 1st May 2015 - HowTos
- Adding internet permission to Android Project - Android
- How to turn off Facebook autoplay videos on timeline - Facebook
- Android : How to make TextView Scrollable - Android
- Sharepoint Server 2016 installation Prerequisites with download links - SharePoint
- Android Toast position top - Android
- How to submit website to dmoz directory - HowTos
- SharePoint Server 2016 setup error - A system restart from a previous installation or update is pending. Restart your computer and run setup to continue. - SharePoint
- Java XML-RPC 3.1.x based web service example - Java
- Plug-in com.android.ide.eclipse.adt was unable to lead class Error - Android