Command prompt

From Free net encyclopedia

Revision as of 12:33, 9 April 2006; view current revision
←Older revision | Newer revision→
Image:Merge-arrows.gif It has been suggested that this article or section be merged with Computer terminal. (Discuss)
Image:Merge-arrows.gif It has been suggested that this article or section be merged with Command line interface. (Discuss)
Image:Windows Command Prompt.png

A command prompt (or just prompt) is a character or a sequence of characters used in a command line interface to indicate that the computer is ready to accept typed input. Command prompts usually end with characters such as $, #, : or > and often include other information, such as the path of the current working directory.

It is common to allow prompts to be modifiable by the user. In the proper environment, they may include colors, special characters, and other things like the current time, in order, for instance, to make the prompt more informative or visually pleasing, or to easily distinguish sessions on to different machines.

In MS-DOS and in the Windows command line interpreter the prompt is modifiable by issuing a prompt command or by changing the value of the %PROMPT% environment variable. The default C:\> style is obtained, for instance, with "prompt $P$G".

On Unix systems, the $PS1 variable can be used, although other variables also may have an impact on what appears on the screen (depending on what shell is being used). In the bash shell, a prompt of the form

[time] user@host: work_dir $

could be set by issuing the command

export PS1='[\t] \u@\H: $(pwd) $'de:Eingabeaufforderung

fr:Invite de commande hu:Prompt ja:コマンドプロンプト pt:Prompt