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;'
- [macOS] How to search or view previous terminal command history
- [Eclipse] Locate Preferences in macOS
- macOS Big Sur compatible Macs List
- How to connect Airpods to Macbook Air or Pro?
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- [macOS] Change homepage Macbook Safari Browser
- [Vi/Vim] How to move cursor to the start of a line
- bash: command not found error [macOS Terminal Linux, Unix or Windows]
- Set Python 3.8 as a default python version on macOS
- 30+ Zoom video communications application shortcuts for macOS
- say command macOS terminal examples
- Mac (macos) startup keyboard boot sequence combinations
- Cut, Copy and Paste keyboard commands on mac
- How to display Toast in a thread : Android - Android
- Change CKEditor Table Properties default width - CKEditor
- Mac OS X Stuck During Booting Gray Screen Logo and Spinner - Mac-OS-X
- Find Difference of two numbers - C-Program
- Share Multiple Images in WhatsApp using Android Intent - WhatsApp
- Instant Run requires Tools | Android | Enable ADB integration to be enabled - Android-Studio
- Setting up Cloud feature with Notepad++ - NotepadPlusPlus
- W3 : character data is not allowed here html validation error - Html
- List of 60 useful FTP Client Commands to access server - FTP
- Android Installation error: INSTALL_FAILED_OLDER_SDK on Device - Android
- Programmatically Send an Email from Android App using Intent - Android
- jQuery : Move to top of the page - jQuery
- PHP Code for sending Emails - PHP
- Error:The SDK Build Tools revision (XX.X.X) is too low for project. Minimum required is XX.X.X - Android