Adrian Chen

Beginner's Mac OS X Terminal Tips

CLI, Terminal, bash, commands

Just started using the terminal, want to know the basics? Here are some tips I wish someone had told me at the start. This guide is mainly aimed at Mac OS users, ( you’ve probably know that from the title. )

The terminal app you get from Mac OS is pretty basic. It comes with some preset themes, you have your Grass, Homebrew, Ocean, Red Sand, etc…


The standard Mac Terminal app is okay to begin with, I recommend taking a look at iTerm2, it has a lot more features and customisation, plus it’s free. I’ve also got a post on tips and tricks for iTerm2.

Open prompt / terminal’s location with Finder

Use the command open . will bring up Finder with the currently location of the prompt. No more opening up finder from the dock and re-navigating folders, great time saver!

How to Show Hidden Files and Folders on Mac Finder

Show hidden files and folders:

defaults write AppleShowAllFiles YES && killall Finder

Hide hidden files and folders:

defaults write AppleShowAllFiles NO && killall Finder

Disable Mac’s Dashboard

I personally never found Dashboard useful, and i only ever opened it by accident, heres how you can disable it:

defaults write mcx-disabled YES && killall Dock

To re-enable the Dashboard:

defaults write mcx-disabled NO && killall Dock

Previous Commands You’ve Used

I use to do something like this to get a previous command I’ve entered:

history | grep ssh

This would come back with a list of commands you have used containing ssh. You can replace that with whatever you’re looking for.

There’s a faster way to search history, simply press Ctrl + R key combo, and keep typing till you find what you’re looking for.

You have any tips you would like to share? leave a comment below :)