Command Line Interface

A command line interface (or CLI) is a text-based interface used for entering commands. In the early days of computing, before the mouse, it was the standard way to interact with a computer. While the graphic user interface (GUI) has largely replaced CLIs, they are still included with several major operating systems, such as Windows and OS X.

There are many different types of command line interfaces, but the two most popular ones are DOS (for Windows) and the bash shell (for Linux and OS X). Each CLI uses its own command syntax, but they all function in a similar way. For example, every CLI has a command prompt, which is displayed when the interface is ready to accept a command. When you type a command, it shows up next to the command prompt, and when you press Enter, the command is executed.

Below are some examples of command prompts for different command line interfaces, with the root folder as the current directory.

  • Windows (DOS): C:\>
  • OS X (bash shell): My-iMac:/ me$
  • Linux (bash shell): [root@myserver /]#

The standard way to change directories in most CLIs is to use the command cd, followed by the directory path. If you are using Windows, you can type cd C:\Users to access the Users folder. If you're using OS X, you can type cd /Volumes/SSD/Users (assuming the drive name is "SSD"). A few other commands are identical between DOS and the bash shell, but each CLI supports many different commands as well. For example, to list the contents of the current directory, you would type dir in DOS and ls in the bash shell.

Most people prefer a standard graphical user interface to a command line one. However, some operations can actually be completed faster using a keyboard instead of a mouse. Therefore, CLIs are often used by network administrators and webmasters for common tasks like transferring files and checking server status.

NOTE: A command line interface is sometimes referred to as a console or terminal window. OS X includes a utility called "Terminal" that functions as the CLI for OS X.

Updated August 26, 2014 by Per C.

quizTest Your Knowledge

Apache server software hosts what type of service?

A
Email
0%
B
Website
0%
C
Database
0%
D
File Sharing
0%
Correct! Incorrect!     View the Apache definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Command Line Interface on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.