Command history
Command history is a feature in many operating system shells, computer algebra programs, and other software that allows the user to recall, edit and rerun previous commands.[src] Command line history was added to Unix in Bill Joy's C shell of 1978; Joy took inspiration from an earlier implementation in Interlisp.[src] It quickly became popular because it made the C shell fast and easy to use.[src] History has since become a standard feature in other shells, including ksh, Bash and Microsoft's cmd.exe.[src] History addressed two important scenarios: # Executing the same command or a short sequence of commands over and over.[src] An example might be a developer frequently compiling and running a program.[src] # Correcting mistakes or rerunning a command with only a small modification.[src] In Joy's original C shell, the user could refer to a previous command by typing an exclamation, ![src] , followed by additional characters to specify a particular command, only certain words, or to edit it in some way before pasting it back into the command line.[src] For example: : !![src] meant the entire previous command.[src] : !$ meant just the last word of the previous command.[src] : !abc meant the command that started with abc.[src] The usual implementation today is to combine history with command-line editing.…[src]
Command history is a feature in many operating system shells, computer algebra programs, and other software that allows the user to recall, edit and rerun previous commands.[src] Command line history was added to Unix in Bill Joy's C shell of 1978; Joy took inspiration from an earlier implementation in Interlisp.[src] It quickly became popular because it made the C shell fast and easy to use.[src] History has since become a standard feature in other shells, including ksh, Bash and Microsoft's cmd.exe.[src] History addressed two important scenarios: Executing the same command or a short sequence of commands over and over.[src] An example might be a developer frequently compiling and running a program.[src] Correcting mistakes or rerunning a command with only a small modification.[src] In Joy's original C shell, the user could refer to a previous command by typing an exclamation, ![src] , followed by additional characters to specify a particular command, only certain words, or to edit it in some way before pasting it back into the command line.[src] For example: !![src] meant the entire previous command.[src] !$ meant just the last word of the previous command.[src] !abc meant the command that started with abc.[src] The usual implementation today is to combine history with command-line editing.[src] The cursor keys are used to navigate up and down through the history list and left or right to anyplace on the line, where the user can simply type a desired change.[src] But some implementations are menu-based: The user presses a certain function key which displays a menu of recent commands, which the user can select one by typing a number.[src] Some implementation such as Bash support recording command history to a file ( history command).[src] ==See also== Command-line completion Autocomplete IntelliSense HISTORY (CONFIG.SYS directive) DOSKEY Comparison of command shells ==References==[src]
32 sentences · 32 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Command history." encyclopegia.org, 2025, https://encyclopegia.org/wiki/command-history. Accessed 25 November 2026.
Chicago
"Command history." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/command-history.
APA
encyclopegia.org. (2025). Command history. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/command-history
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON