Windows

Local

Most installations of Windows include 2 different command-line programs: Command Prompt and PowerShell; we’ll focus primarily on the former, though the latter provides a number of advanced features for task scripting and OS control. To run Command Prompt, simply open the Windows Start menu and begin typing the name “Command Prompt” or “cmd” (case is not important, in this case); after a few letters, Command Prompt should appear at the top of the menu, where it can be selected with the mouse or the keyboard.

Sometimes, we need to tell Windows that we want to execute a program not just as a regular user, but as an administrator (this assumes that the current user account is a member of the Administrators group). We can do this by right-clicking on the program we want to run and selecting Run as Administrator from the context menu. When we do this with the Command Prompt program, we call the resulting instance of Command Prompt an “elevated command prompt”.

Local and remote

If we’ve installed Git on Windows, we have an additional command-line program we can use: Git Bash. This program not only provides tight integration with the Git command-line tools, but also—as a Bash shell (a specific type of command-line interpreter)—uses a command-line syntax very similar to that used in the OS X and Linux Terminal programs, along with an SSH (secure shell) client for accessing remote Linux (and other Unix-based) systems.

Like Command Prompt, Git Bash can be invoked from the Windows Start menu.

Remote

PuTTY is a widely used tool for accessing remote systems via SSH; we’ll be using it in this bootcamp. When accessing a remote Linux (or other Unix-based) system, the command-line syntax for the shell configured on the remote system (usually Bash) applies.

PuTTY can be launched from the Windows Start menu.

OS X

In OS X, the Terminal application provides a Bash shell for command-line access to the local system, as well as SSH access to remote systems.

To launch Terminal, open the Applications folder, then the Utilities folder within that, and double-click the Terminal application. (We recommend dragging the Terminal icon to the OS X dock, for easier access.)

Linux Ubuntu

Ubuntu includes the Terminal program which (by default) runs the Bash shell. This provides command-line access to the local system, as well as to remote systems via SSH.

To launch Terminal, open the Dash by clicking on the Ubuntu icon in the upper-left, then typing “terminal”, and clicking the Terminal icon that appears. (We recommend dragging the icon into the Ubuntu launcher, for easier access.) Alternatively, you can launch Terminal by using the Ctrl-Alt-T keyboard combination.

Tasks

  1. Open the standard command-line program for your operating system (Command Prompt for Windows, Terminal for OS X and Linux Ubuntu).

  2. Type exit (note the lower-case), and then the Enter key, to close the command-line program.