Entering shortcut commands in the terminal can improve productivity while keeping a few commands in mind
How to do:
First edit in the ~/directory. Bash_profile This hidden file, if you want to directly double-click this file to open the editor, please enter it in the terminal
Mac Show hidden files command defaults write Com.apple.finder appleshowallfiles-bool true
At this point you find the. bash_profile file in the ~/directory and open this file
After opening make sure that your source is set up, if not. BASHRC, add one under the ~/.bash_profile file, You can edit a file named. BASHRC through the terminal or with a text editor (this file will load the source from the file into bash when Bash is launched)
Then add the following command in the ~/.BASHRC
Of course, if you don't want to edit this every time. BASHRC hidden files, you can again specify a source path in your. bashrc file to refer to the external visible file as in. BASHRC Add the following red box content
Then you can use alias to add an alias command to your. BASHRC or external source file, and then restart the terminal for the aliases command in the terminal.
command example:
Then when the terminal enters Open_safari, it will
Automatically opens Safari.
Use the Mac terminal to set shortcut commands with Alias