- Terminal Command To Mountain Lion On Mac
- Terminal Command To Mountain Lion On Safari
- Terminal Command To Mountain Lion On Windows
- Terminal Command To Mountain Lion
Keystrokes are valuable especially if you live in the command line, and thankfully Bash (Terminal’s default command-line interpreter) allows you to create shortcuts using aliases.
How to reset Mac OS X Lion/Mountain Lion to Factory Default. Always make a fresh backup before you will get under the hood of your MAC! BE VERY CAREFUL WHEN USING THE “rm” command as you may delete your whole drive! DO THIS AT YOUR OWN RISK. I TAKE NO RESPONSIBILITY FOR ACCIDENTAL LOST OF DATA. For most users, encrypting volumes in the Finder is simplest option, but power users may enjoy the feedback and control they get with the command line. Either way, Mountain Lion’s new encryption.
Terminal Command To Mountain Lion On Mac
Creating Aliases
Aliases are nothing more than keyboard shortcuts or abbreviations, and although they’re a bit limited, they’re great for simple commands.
Let’s create a temporary alias in the command line for ls -al
(list all files in long listing format in the current directory). Open Terminal and run the following command:
Note: There should be no spaces before or after the equal sign. Spaces will break the command.
Now if you type ll
in the command line, you should see something like the following:
To remove the alias, use the unalias
command:
To see a list of all your aliases, use the alias
command:
Permanent Aliases
The problem with setting an alias in the command line is that it’s not permanent—if you open a new window or restart Terminal, the alias is gone.
To make aliases permanent, we have to set them in a file that’s read when you open Terminal. Some common ones are ~/.bashrc
and ~/.bash_profile
. For this example, let’s use ~/.bash_profile
.
From the command line, open to edit the file by running the following:
Terminal Command To Mountain Lion On Safari
(You can also open and edit it with your code editor, i.e. subl ~/.bash_profile
)
Terminal Command To Mountain Lion On Windows
Add the following lines either at the bottom of the file or wherever you’d like:
Save and close the file. Now if you restart Terminal, the alias ll
will be available to you. You can also tell Terminal to reload the ~/.bash_profile
file using the source
command:
Useful Aliases
Here are a handful of aliases that you may find useful.
Terminal Command To Mountain Lion
If you use Git in the command-line, I also wrote a post on Git Command-Line Shortcuts, which includes my personal set of Git Bash aliases and functions.