This tutorial will discuss some of the best and most popular beginner-friendly Terminal tricks and tips to be found on the Internet.

Disclaimer

Usually it takes destructive behaviour or terrible luck to ruin your Mac’s OS X installation beyond repair, but using the Terminal could potentially bypass such safety and enable a user to cause themselves serious headaches, or even (in extreme cases) a completely ruined operating system. This is very unlikely and as long as you steer clear from “sudo” commands which require you to enter your password, you should be perfectly safe. However, I strongly advise you to back up your Mac fully and proceed at your own risk! Some tips may only work for a particular OS, though I’ve taken care to only select Terminal commands which should mostly work on Leopard, Snow Leopard and Lion.

Show Hidden Files

Though OS X doesn’t really place much emphasis on hidden files and folders, some files and folders are hidden by default. This is usually for good reason and deleting the wrong thing can cause issues, but if you wish to show the hidden files, then enter the following code: To undo this command, replace true with false.

Enable 2D Dock

If you’ve ever moved your Dock to the left or right of screen (depending on which OS X version you’re running), you may have seen the 2D Dock shown above. If you’d like to enable the 2D Dock in all positions, enter the following into Terminal: Now restart your Dock to make the changes take effect by entering To put your Dock back to normal, replace the “YES”‘ in the above code to “NO” and restart the Dock once again by entering the above killall command.

Disable Dashboard

I’ve never been a big fan of the Dashboard as it’s something of a RAM hog and I like it to be completely disabled in case I accidentally launch it. If you would like to do so too, enter this into Terminal and hit return: Once again restart Dock to make the changes take effect. To undo this command and bring back Dashboard, just change “YES” to “NO” and restart your Dock by entering the killall command once again (note: the killall command can actually be inserted into the same line of code to save time, I’m making it separate here to give you a sense of what exactly is happening).

Show The Library Folder In OS X Lion

OS X Lion comes with the Library folder hidden by default but this can make troubleshooting any issues with your Mac, deleting the cache or just plain “tinkering” very difficult. In order to bring back the Library folder permanently, enter this command into Terminal:

Hide Desktop Icons

A nice clean Desktop looks great but sometimes it’s not practical to keep all your files organised. If you’d like to hide all the icons on your Desktop through a Terminal command, enter the following: Then our friend the killall command once again When you wish to bring your Desktop clutter back, copy and paste the following: Then enter the killall command.

Launch An Application

In order to launch applications from the Terminal, just follow this template, replacing Twitter with the name of whichever program you’d like to launch:

Kill A Process

If you need to quickly kill a process or application, type the following into Terminal, replacing Twitter with whichever process you’d like to kill.

Open A Finder Window In Current Directory

To quickly open a Finder window in whichever directory you’re currently in, enter the following into Terminal

Change Grab’s Default Image Format

OS X’s built-in screenshot utility Grab is very useful but if you’d like it to save files as JPG, enter the following into Terminal: (note: You can also change jpg to png if preferred).

Conclusion

I hope that you’ve found some usefulness from these Terminal commands and that it encourages you to learn more about the power which can be unlocked from within the command-line. You can usually find an application which takes care of each of the commands posted above, but that’s a lot less informative and a lot less fun! For the command-line veterans amongst our readers; if you’ve got any Terminal commands or tips which I’ve missed (and I’m sure there are several), please let us know about them in the comments below.