|This article is need of a clean-up. You can help out Linux Wiki by re-organizing parts of the article, checking grammar and spelling, and doing other helpful things to correct the article. Use the edit button on the page.
A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) passes commands in the form of a line of text (a command line).
The command-line interface evolved from a form of dialog once conducted by humans over teleprinter machines, in which human operators remotely exchanged information, usually one line of text at a time. Early computer systems often used teleprinter machines as the means of interaction with a human operator. The computer became one end of the human-to-human teleprinter model. So instead of a human communicating with another human over a teleprinter, a human communicated with a computer.
In time, the actual mechanical teleprinter was replaced by a glass tty (keyboard and screen, but emulating the teleprinter), and then by a terminal (where the computer software could address all of the screen, rather than only print successive lines). Due to its text-based nature, a command-line interface is sometimes confused with the text-based user interface, a kind of user interface which uses only text, but not necessarily presented in successive lines. Text may be formatted and appear in fixed locations on a computer terminal display, as opposed to only appearing in successive lines.
The CLI was the primary means of human interaction with most early operating systems, including MS-DOS, CP/M, Unix, and Apple DOS. The interface is usually implemented with a command line shell, which is a program that accepts commands as text input and converts commands to appropriate operating system functions. Alternatives to the command line include, but are not limited to menus and various desktop metaphors centered on the pointer (usually controlled with a mouse). Today, command-line interfaces to a computer operating system are less widely used by casual computer users, who favor graphical user interfaces. Command-line interfaces are still often preferred by more advanced computer users, as they often provide a more concise and powerful means to control a program or operating system. Programs with command-line interfaces are often much easier to automate via scripting.