This is a quick tutorial on how to use the Terminal application and get around a computer using the command line. The tutorial also applies to terminals (or xterms) in the X-windows environment on Unix/Linux/MacOS or Cygwin (X-window emulator on Windows).

Open up the Terminal application, which is a text-based method of using your computer.

A terminal is simply a text-based interface to the computer. In a terminal, you can type commands, manipulate files, execute programs, and open documents. When working in a terminal, the current directory is called your working directory. A terminal will usually start in the top-level directory of your account.

Directories are separated by a backslash /. The topmost directory is indicated by a single backslash. The total directory tree is all relative to the top level directory.

On MacOS, there is a Volumes directory at the top that lists all mounted drives (networked or local). So if you have mounted your network directory, the path to it will look like the following if you substitute your username for mine.


In a terminal, you generally type a command and any modifiers or arguments the command requires, then hit return and the command is executed. For example, to set your current (working) directory to your home directory, type cd and the prompt and hit return. Below is an example of a terminal and some commands.

Note that pretty much all of these things you can do using the Finder on a mac or the desktop on Windows. Once you learn the command set, however, you may find that certain actions are much faster using a terminal (opening or deleting all files in the current directory that end with .png, for example). As you begin to use the commands, relate then to actions you already know how to do.

Some common useful terminal commands include the following.

Useful Text Editors