Command-line interfaces

A command-line interface allows the user to interact with the computer by typing in commands. The computer displays a prompt, the user keys in the command and presses enter or return.

Person using command line on a laptop beside a person using a typical user interface

In the early days of personal computers, all PCs used command-line interfaces.

Features of a command-line interface

  • Commands must be typed correctly and in the right order or the command will not work.
  • Experienced users who know the commands can work very quickly without having to find their way around menus.
  • An advantage of command driven programs is that they do not need the memory and processing power of the latest computer and will often run on lower spec machines.
  • Command driven programs do not need to run in Windows.
  • A command-line interface can run many programs, for example a batch file could launch half a dozen programs to do its task.
  • An inexperienced user can sometimes find a command driven program difficult to use because of the number of commands that have to be learnt.

An example of a common command driven interface is MS-DOS. The MS-DOS command to display all files on c:\ would be: dir c:\