<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Command_%28computing%29</id>
	<title>Command (computing) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Command_%28computing%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Command_(computing)&amp;action=history"/>
	<updated>2026-06-23T19:59:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Command_(computing)&amp;diff=149185&amp;oldid=prev</id>
		<title>imported&gt;QuantumNinus: Undid revision 1314506900 by JuUunIOr (talk)</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Command_(computing)&amp;diff=149185&amp;oldid=prev"/>
		<updated>2025-10-01T20:16:27Z</updated>

		<summary type="html">&lt;p&gt;Undid revision &lt;a href=&quot;/index.php/Special:Diff/1314506900&quot; title=&quot;Special:Diff/1314506900&quot;&gt;1314506900&lt;/a&gt; by &lt;a href=&quot;/index.php/Special:Contributions/JuUunIOr&quot; title=&quot;Special:Contributions/JuUunIOr&quot;&gt;JuUunIOr&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:JuUunIOr&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:JuUunIOr (page does not exist)&quot;&gt;talk&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|External instruction to a computer program}}&lt;br /&gt;
{{redirect distinguish|System command|system call}}&lt;br /&gt;
{{other uses|Command (disambiguation)#Computing{{!}}Command § Computing}}&lt;br /&gt;
In [[computing]], a &amp;#039;&amp;#039;&amp;#039;command&amp;#039;&amp;#039;&amp;#039; is a [[ High-level programming language | high-level ]] instruction received via an external [[Interface (computing)|interface]] that directs the behavior of a [[computer program]]. Commonly, commands are sent to a program via a [[command-line interface]], a [[scripting language|script]], a [[network protocol]], or as an event triggered in a [[graphical user interface]].&amp;lt;ref&amp;gt;{{cite book |author1=Kernighan, Brian W. |author2=Pike, Rob |title=The UNIX Programming Environment |year=1984 |publisher=Prentice Hall |isbn=978-0-13-937681-8}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many commands support arguments to specify input and to modify default behavior. Terminology and syntax varies but there are notable common approaches. Typically, an &amp;#039;&amp;#039;&amp;#039;option&amp;#039;&amp;#039;&amp;#039; or a &amp;#039;&amp;#039;&amp;#039;flag&amp;#039;&amp;#039;&amp;#039; is a name (without [[Whitespace character|whitespace]]) with a prefix such as [[dash]] or [[Slash (punctuation)|slash]] that modifies default behavior. An option might have a required value that follows it. Typically, flag refers to an option that does not have a following value. A &amp;#039;&amp;#039;&amp;#039;parameter&amp;#039;&amp;#039;&amp;#039; is an argument that specifies input to the command and its meaning is based on its position in the command line relative to other parameters; generally ignoring options. A parameter can specify anything, but often it specifies a [[file (computing)|file]] by [[filename|name]] or [[file path|path]].&amp;lt;ref&amp;gt;{{cite book |author=Sobell, Mark G. |title=A Practical Guide to Linux Commands, Editors, and Shell Programming |year=2014 |edition=3rd |publisher=Prentice Hall |isbn=978-0-13-308504-4}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The term &amp;#039;&amp;#039;command&amp;#039;&amp;#039; is sometimes also used for internal program instructions, but often other terms are more appropriate such as [[statement (programming)|statement]], [[Expression (computer science)|expression]], [[Function (computer programming)|function]], or [[Conditional (computer programming)|conditional]].&amp;lt;ref&amp;gt;Maurizio Gabbrielli, Simone Martini (2010). Programming Languages - Principles and Paradigms. Springer London, &amp;#039;&amp;#039;6.3.2 Conditional Commands&amp;#039;&amp;#039;, p. 140&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite book |author=Lutz, Mark |title=Learning Python |year=2013 |edition=5th |publisher=O’Reilly Media |isbn=978-1-449-35573-9}}&amp;lt;/ref&amp;gt; For example, printing a message in Bash is via the &amp;#039;&amp;#039;command&amp;#039;&amp;#039; [[Printf (Unix)|printf]], while in Python it is via the &amp;#039;&amp;#039;function&amp;#039;&amp;#039; print().&amp;lt;ref&amp;gt;{{cite web | url =  https://docs.python.org/3/library/functions.html#print | access-date = 23 October 2023 | title = Built-in Functions - print | publisher = python.org }}&amp;lt;/ref&amp;gt; Further, some aspects of adjacent technology are conflated with commands. For example, conditional logic in Bash and Python is called an &amp;#039;&amp;#039;expression&amp;#039;&amp;#039;&amp;lt;ref&amp;gt;{{cite web | url =  https://docs.python.org/3/reference/expressions.html | access-date = 23 October 2023 | title = Conditional expressions | publisher = python.org }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web | url =  https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html | access-date = 23 October 2023 | title = Bash Conditional expressions | publisher = gnu.org }}&amp;lt;/ref&amp;gt; and &amp;#039;&amp;#039;statements&amp;#039;&amp;#039; in Java.&amp;lt;ref&amp;gt;{{cite web | url =  https://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html | access-date = 23 October 2023 | title = The if-then and if-then-else Statements | publisher = oracle.com }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite book |author1=Horstmann, Cay S. |author2=Cornell, Gary |title=Core Java: Volume I – Fundamentals |year=2018 |edition=11th |publisher=Prentice Hall |isbn=978-0-13-516630-7}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
A notable context in which commands are prevalent is the [[operating system]] [[shell (computing)|shell]]. Commonly, the shell dispatches a command to a program that has a file name matching the first parameter. In a [[Unix shell]] (such as [[Bash (Unix shell)|bash]] and many related variants), the match must be exact including case.&amp;lt;ref&amp;gt;{{cite web |publisher=Free Software Foundation |title=Bash Reference Manual |url=https://www.gnu.org/software/bash/manual/bash.html |year=2023}}&amp;lt;/ref&amp;gt; The following bash command changes the [[working directory]] to &amp;#039;&amp;#039;/home/pete&amp;#039;&amp;#039; by invoking the program &amp;#039;&amp;#039;[[Cd (command)|cd]]&amp;#039;&amp;#039;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /home/pete&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following bash command writes &amp;quot;Hello World&amp;quot; via program [[Echo (command)|echo]] to [[standard output]] {{endash}} typically the [[computer terminal|terminal]]. Quotes around the two words indicate that the phrase is treated as a single parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;quot;Hello World&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following demonstrates how the default behavior of a command is modified with a switch. The switch {{code|-e}} causes the command to treat characters prefixed with a backslash as the associated control character. In this case {{code|\t}} results in a tab character.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
echo -e &amp;quot;Hello\tWorld&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In shells such as [[Cmd.exe|command prompt]], [[DOS]], and [[OS/2]] some commands are built-in; are not implemented as a separate program.&amp;lt;ref&amp;gt;{{cite web |publisher=Microsoft |title=Windows Command Line Reference |url=https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands |year=2023}}&amp;lt;/ref&amp;gt; But, if a command is not built-in, then the shell dispatches to a program that has an executable extension (such as &amp;#039;&amp;#039;.exe&amp;#039;&amp;#039;) and base name matching the first parameter ignoring case. The following command prompt command displays the content of file &amp;#039;&amp;#039;readme.txt&amp;#039;&amp;#039; via the built-in command &amp;#039;&amp;#039;[[TYPE (DOS command)|type]]&amp;#039;&amp;#039;.&amp;lt;ref&amp;gt;{{cite web | url = https://ss64.com/nt/type.html | access-date = 14 March 2019 | title = Type - Display a text file - Windows CMD | publisher = SS64.com }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;batch&amp;quot;&amp;gt;&lt;br /&gt;
type readme.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command prompt command lists the contents of the current directory via built-in command &amp;#039;&amp;#039;[[Dir (command)|dir]]&amp;#039;&amp;#039;. The switch &amp;#039;&amp;#039;/Q&amp;#039;&amp;#039; modifies default behavior to include owner information.&amp;lt;ref&amp;gt;{{cite web | url = https://ss64.com/nt/dir.html | access-date = 14 March 2019 | title = DIR - list files and folders - Windows CMD | publisher = SS64.com }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;batch&amp;quot;&amp;gt;&lt;br /&gt;
dir /Q&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Formal grammar]]&lt;br /&gt;
* [[Gesture recognition]]&lt;br /&gt;
* [[List of POSIX commands]]&lt;br /&gt;
* [[List of DOS commands]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
{{Wikibooks|Guide to Windows commands}}&lt;br /&gt;
*[http://foldoc.org/command command] from [[FOLDOC]]&lt;br /&gt;
*[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands Windows Commands | Microsoft Docs]&lt;br /&gt;
&lt;br /&gt;
{{Unix commands}}&lt;br /&gt;
{{Windows commands}}&lt;br /&gt;
&lt;br /&gt;
[[Category:User interfaces]]&lt;br /&gt;
[[Category:Computing terminology]]&lt;br /&gt;
[[Category:Computing commands| ]]&lt;/div&gt;</summary>
		<author><name>imported&gt;QuantumNinus</name></author>
	</entry>
</feed>