Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to learn how to use the command-line (terminal) on Mac OS X. Where is the best place to start?

share|improve this question

closed as off-topic by Ben N, fixer1234, DavidPostill, mdpc, Wes Sayeed Mar 30 at 1:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Ben N, fixer1234, DavidPostill, mdpc, Wes Sayeed
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 9 down vote accepted

I would suggest that "learning the Mac OS X command-line" is actually synonymous with learning Unix.

Thinking back to how I learnt Unix there was basically two things that helped: Necessity and a good book.

I HAD to learn Unix, because it was what was used at the university for my computing science degree. You will find that to effectively learn Unix you might need something to motivate you. To that end I would suggest that you should try and perform as many tasks as possible in the terminal if you really want to learn how to use it, such everytime you need to copy, move or delete a file, use the terminal.

The other thing that I needed (this was before the world wide web existed) was a good reference book, for those "how do I..." moments. I would recommend that a copy of Learning the Unix Operating System would probably be a good idea.

book image

Other books like Take Control of the Mac Command Line with Terminal would be good as well.

book image

There are some good tutorials as well such as Unix tutorial for beginners.

share|improve this answer
I love the general idea, but the O'Reilly Learning the Unix Operating System book is very out of date. It's last printing date was 2001, and even at that, much of the information in it sounds more appropriate for the 1990s (at best) than now. There are good new books that cover the command line (The Linux Phrasebook is one; another is Beginning the Linux Command Line). – Telemachus Jul 28 '09 at 12:17
I was using bash in the 1990 and it hasn't changed much since :-) – Bruce McLeod Jul 28 '09 at 12:31
Forget for a minute whether or not Bash has had any interesting updates since 1990 (it has). Just focus on Learning the Unix OS. The entire chapter on X window systems is besides the point for an OS X user. The chapter on "Using the internet" introduces you to pine, usenet and lynx. Have you spent much time using those lately? The book as a whole assumes that you are using a *nix account on a true multi-user machine. This sort of use is completely unlike a desktop OS X user's life. I think that there are better, more up-to-date books for *nix in general or OS X in particular. – Telemachus Aug 1 '09 at 17:16

The default Mac OS X "command-line" is the Bash shell. There is a reference manual available from the GNU project.

share|improve this answer
This is also a good option! – Axxmasterr Jul 27 '09 at 21:39
If he is brand new to *nix, this is a lot of detail with very little context. – Telemachus Jul 27 '09 at 23:36
Let's not forget the whole slew of admin programs. While this is officially for Server, a lot will transfer to Client.… – Scott Pack Jul 28 '09 at 2:48

This is a set of good resources specific to Mac OS X (yes, it's not that different to any Bash shell, but directory locations and stuff like that varies)

General tutorials with plenty of information

And a list of some useful commands

share|improve this answer

In addition to the Bash tutorial provided, I'd like to recommend you to have a look at zsh which is also installed by default and provides some features in addition to the standard Bash.

What makes this a really interesting choice though is the user-friendly guide to zsh which is how I learned Unix shell back in the day when I was still a heavy Windows user.

share|improve this answer

Since Mac OS X is a nice variant of Unix you can start digging into the Manual (MAN) pages to come up to speed on how to use the shell.

Running the command below in a shell will show you how to query the MAN Pages for info.

man man  

This should get you going.

share|improve this answer
man man: how meta! – TM. Jul 27 '09 at 22:28
"MAN MAN" needs to lower-case: "man man". (Déjà vu :)…) – Jonik Aug 6 '09 at 7:55
y u no man women – kylehotchkiss Dec 2 '12 at 4:27

I've recommended "Learning UNIX for Mac OS X" before, the current edition is a little behind the times but I still think it's a valuable introduction.

share|improve this answer

I think that the step-by-step guide available on is perfect for beginners, because first it demonstrates how useful the command line can be, and then gradually introduces the user to mastering it.

Of course manual pages are the next logical step, once you've grasped the basics: man(1) will always be your best friend :)

share|improve this answer

This is a good list of commands available and what they do. Mac OS X uses a Bash shell by default. Hope this helps.

share|improve this answer

When you say "learn the command-line" do you mean learn the intimate details of the particular shell (Bash) that Mac OS X uses by default? Or do you mean, "What can I do on the command line and how?"

If it's what can I do and how, then I think starting with a general book on Linux/Unix is a good idea. My favorite starter is The Linux Phrasebook by Scott Granneman. (Skip Chapter 13 if your only interest is Mac OS X's command line, since it covers package management in RPM-based or [deb][4]-based distributions. Bottom line: that chapter doesn't apply to Mac OS X.) The book isn't too expensive, and it does an excellent job of covering a lot of ground clearly and in a reasonable amount of detail. (Enough detail to get some real meat, but not so much right away that you lose the big picture.)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.