Member-only story

The file .bash_profile
might really be where all the magic happens for creating shortcut commands in the Terminal! If you’re sort of familiar with the general Unix command line commands that allow you to navigate through your machine via the Terminal, then creating aliases
will help optimize your navigation process! It’s pretty easy, too. Here’s how to do it:
1. Make sure you’re going to create these customized commands in the right file.
Navigate to your Terminal. You can simply command
+SPACE
to bring up the search bar. Type in Terminal and launch it.
Once your in the Terminal, type ls -a
to be given a list of files and folders that are both hidden and not hidden. We are looking for the hidden file .bash_profile
, for instance, to open and write into in order to create customized shortcut commands for your daily usage.
Type nano ~/.bash_profile
if you prefer using the nano GNU in order to make critical changes to the file. You could also just open that file with the command open ~/.bash_profile
.
Once you’re in the file, you may find some aliases that have already been established. There’s also a possibility that there may not be any. Regardless, let’s get to making our own!
At the bottom, copy this into the file:
# Aliases
# Establishing custom commands belowalias edit="open ~/.bash_profile"
Below the commenting is where you find the standard syntax for creating an alias (shortcut command) for your machine to recognize.
The alias edit
means that when you type the command in that word and press Enter in the Terminal, it will follow the command that it equates to, which would be open ~/.bash_profile
. This command opens the file, regardless of where you may be in any of your directory levels. The ~
(tilde , pronounced ‘TIL-dah’) sign is handy…