Using the Command-Line Interface

The three operating systems we use in this book all have graphical user interfaces; you can start programs by clicking on icons, you can select tasks from menus, and you can drag and drop files and folders. However, once you start to use more powerful aspects of the operating system and applications, you’ll quickly find that some tasks are more easily done by typing in commands. For example, you can tell the operating system to list certain files in a folder or run a given program in a particular way.

Linux, Windows, and Mac OS X all have a command-line interface that allows you to do this. In Linux and Mac OS X, you use a Terminal program to show you the command-line interface, which is called the shell. In Windows, you use the Command Prompt Window program to show you the Command Prompt, sometimes called the DOS prompt.

In this section, we’ll describe how each command-line interface works; you can skip the descriptions for the operating systems you don’t use.

The Linux and Mac OS X Shell

To access the shell under Linux, open a terminal program, such as konsole, rxvt, or xterm; these are often listed in the main menu under the System or System Tools group, and may be simply labeled Terminal. To access the shell under Mac OS X, open a terminal window by double-clicking on the Terminal icon in the Utilities folder under the Applications group.

Under Linux, you’ll see a prompt similar to this one:

[adam@eden ~]$

while under Mac OS X, you’ll see something ...

Get Learning MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.