brain initiation
This commit is contained in:
27
20231011105104-command_line.org
Normal file
27
20231011105104-command_line.org
Normal file
@@ -0,0 +1,27 @@
|
||||
:PROPERTIES:
|
||||
:ID: d71414fc-349c-4763-a703-9f7092fc90d6
|
||||
:END:
|
||||
#+title: command-line
|
||||
|
||||
A command-line interface (CLI) is a means of interacting with a computer program by inputting lines of text called command-lines. Command-line interfaces emerged in the mid-1960s, on computer terminals, as a user-friendly alternative to punched cards.
|
||||
|
||||
Today, most users rely on graphical user interfaces ("[[id:a08570b0-8fe8-45a8-8f60-e45ea6b31a34][GUI]]") instead of CLIs. However, many programs and [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][operating system]] utilities lack GUIs, and are intended to be used through CLIs.
|
||||
|
||||
Knowledge of CLIs is also useful for writing scripts. Programs that have CLIs are generally easy to automate via scripting, since command-lines, being mere lines of text, are easy to specify in code.
|
||||
|
||||
CLIs are made possible by command-line interpreters or command-line processors, which are programs that read command-lines and carry out the commands.
|
||||
|
||||
A CLI is used whenever a large vocabulary of commands or queries, coupled with a wide (or arbitrary) range of options, can be entered more rapidly as text than with a pure GUI. This is typically the case with operating system command shells. CLIs are also used by systems with insufficient resources to support a graphical user interface. Some computer language systems (such as Python, Forth, LISP, Rexx, and many dialects of BASIC) provide an interactive command-line mode to allow for rapid evaluation of code.
|
||||
|
||||
CLIs are often used by programmers and system administrators, in engineering and scientific environments, and by technically advanced personal computer users. CLIs are also popular among people with visual disabilities since the commands and responses can be displayed using refreshable Braille displays.
|
||||
|
||||
* Command prompt
|
||||
For the Windows component named Command Prompt, see cmd.exe.
|
||||
A command prompt (or just prompt) is a sequence of (one or more) characters used in a command-line interface to indicate readiness to accept commands. It literally prompts the user to take action. A prompt usually ends with one of the characters $, %, #, :, > or - and often includes other information, such as the path of the current working directory and the hostname.
|
||||
|
||||
On many Unix and derivative systems, the prompt commonly ends in $ or % if the user is a normal user, but in # if the user is a superuser ("[[id:673d1cb1-536b-42f1-a046-40a8937c4283][root]]" in Unix terminology).
|
||||
|
||||
End-users can often modify prompts. Depending on the environment, they may include colors, special characters, and other elements (like variables and functions for the current time, user, shell number or working directory) in order, for instance, to make the prompt more informative or visually pleasing, to distinguish sessions on various machines, or to indicate the current level of nesting of commands. On some systems, special tokens in the definition of the prompt can be used to cause external programs to be called by the command-line interpreter while displaying the prompt.
|
||||
|
||||
In DOS' COMMAND.COM and in Windows NT's cmd.exe users can modify the prompt by issuing a PROMPT command or by directly changing the value of the corresponding %PROMPT% environment variable. The default of most modern systems, the C:\> style is obtained, for instance, with PROMPT $P$G. The default of older DOS systems, C> is obtained by just PROMPT, although on some systems this produces the newer C:\> style, unless used on floppy drives A: or B:; on those systems PROMPT $N$G can be used to override the automatic default and explicitly switch to the older style.
|
||||
|
||||
Reference in New Issue
Block a user