Skip to content

Command Line Crash Course

jfraboni edited this page Jun 30, 2014 · 6 revisions

The the command-line is a powerful tool for interacting with computers, and until the advent of GUI based operating systems, like Windows or Mac OS, the command-line was the primary tool for controlling computers.

People often use the terms terminal, shell, and sometimes even prompt to mean, the command-line. They are synonyms, if you hear or read, go to the terminal, or, open a shell, that is to say, go to your terminal.

As you become proficient as a developer, you will find yourself using the command-line more and more to assist in your work, so it's best to get use to it at the outset. In no time, you'll be controlling your computer like a pro.

Opening a terminal

On a Mac OS X, open spotlight with the keystrokes, Command-Space, then start typing "Terminal". The Terminal program will show up in the dialogue box and you can simply select it and hit return - this will launch the terminal.

We highly suggest installing iTerm2 - it's a great terminal program with more advanced features than the stock terminal that comes with OS X.

On Windows, press the Windows button, then type cmd into the prompt dialogue, then hit return, this will launch the terminal on Windows. The commands on Windows are often different from Unix-like systems, so keep that in mind. If commands we discuss are not found on Windows, you can Google for solutions to installing GNU equivalent for Windows.

Learning the command-line

Learning to use the command-line effectively can seem daunting when you're new at it. All these phrases you type into this black window, some take input, how does anyone get good at this? I find the best way to learn is to have a reason to learn, and you'll certainly have that reason as you progress in learning to write apps.

One of the most powerful features of the Internet is that others have shared their knowledge, so instead of re-inventing the wheel on this one, I'd like to shout out to Zed A. Shaw, who took the time to write and share an excellent primer on, among other topics, learning the command-line, and so I highly recommend going through these lessons:

Command-line Lessons

© John Fraboni 2014

Clone this wiki locally