<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.srevilak.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Intro_to_the_Command_Line%3A_Part_I</id>
	<title>Intro to the Command Line: Part I - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.srevilak.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Intro_to_the_Command_Line%3A_Part_I"/>
	<link rel="alternate" type="text/html" href="https://www.srevilak.net/wiki/index.php?title=Intro_to_the_Command_Line:_Part_I&amp;action=history"/>
	<updated>2026-04-06T18:13:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.srevilak.net/wiki/index.php?title=Intro_to_the_Command_Line:_Part_I&amp;diff=89&amp;oldid=prev</id>
		<title>SteveR: /* Intro to the Command Line: Part I */</title>
		<link rel="alternate" type="text/html" href="https://www.srevilak.net/wiki/index.php?title=Intro_to_the_Command_Line:_Part_I&amp;diff=89&amp;oldid=prev"/>
		<updated>2014-04-01T00:47:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Intro to the Command Line: Part I&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:47, 31 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l25&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In command lines, most shells recognize &amp;quot;~&amp;quot; as a shortcut meaning &amp;quot;my&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In command lines, most shells recognize &amp;quot;~&amp;quot; as a shortcut meaning &amp;quot;my&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;home directory&quot;.  So, &amp;lt;tt&amp;gt;ls ~&amp;lt;/tt&amp;gt; lists the files in your home&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;home directory&quot;.  So, &amp;lt;tt&amp;gt;ls ~ &amp;lt;/tt&amp;gt; lists the files in your home&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;directory.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>SteveR</name></author>
	</entry>
	<entry>
		<id>https://www.srevilak.net/wiki/index.php?title=Intro_to_the_Command_Line:_Part_I&amp;diff=88&amp;oldid=prev</id>
		<title>SteveR: Created page with &quot;= Intro to the Command Line: Part I =   We tried out a few different commands this evening:  * &#039;&#039;&#039;ls&#039;&#039;&#039; to list files. * &#039;&#039;&#039;cd&#039;&#039;&#039; to change directories * &#039;&#039;&#039;pwd&#039;&#039;&#039; to see what...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.srevilak.net/wiki/index.php?title=Intro_to_the_Command_Line:_Part_I&amp;diff=88&amp;oldid=prev"/>
		<updated>2014-04-01T00:45:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Intro to the Command Line: Part I =   We tried out a few different commands this evening:  * &amp;#039;&amp;#039;&amp;#039;ls&amp;#039;&amp;#039;&amp;#039; to list files. * &amp;#039;&amp;#039;&amp;#039;cd&amp;#039;&amp;#039;&amp;#039; to change directories * &amp;#039;&amp;#039;&amp;#039;pwd&amp;#039;&amp;#039;&amp;#039; to see what...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Intro to the Command Line: Part I = &lt;br /&gt;
&lt;br /&gt;
We tried out a few different commands this evening:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ls&amp;#039;&amp;#039;&amp;#039; to list files.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;cd&amp;#039;&amp;#039;&amp;#039; to change directories&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;pwd&amp;#039;&amp;#039;&amp;#039; to see what directory you&amp;#039;re currently in&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;less&amp;#039;&amp;#039;&amp;#039; to examine the contents of files&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;id&amp;#039;&amp;#039;&amp;#039; to see what your username is, and to find out which groups you&amp;#039;re in&lt;br /&gt;
&lt;br /&gt;
The general form for a command is&lt;br /&gt;
&lt;br /&gt;
  COMMAND-NAME  OPTIONS  ARGUMENTS&lt;br /&gt;
&lt;br /&gt;
COMMAND-NAME is the name of a command, like &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt; or&lt;br /&gt;
&amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
ARGUMENTS indicate what the command should operate on.  For&lt;br /&gt;
examine, &amp;lt;tt&amp;gt;ls /etc&amp;lt;/tt&amp;gt; has an ARGUMENT of &amp;quot;/etc&amp;quot;, meaning that ls&lt;br /&gt;
should show files in the /etc directory.&lt;br /&gt;
&lt;br /&gt;
OPTIONS affect the command&amp;#039;s behavior.  For example, in &amp;lt;tt&amp;gt;ls -l&lt;br /&gt;
/etc&amp;lt;/tt&amp;gt;, the &amp;quot;-l&amp;quot; is an option that tells ls to produce a &amp;quot;long&amp;quot;&lt;br /&gt;
listing.&lt;br /&gt;
&lt;br /&gt;
In command lines, most shells recognize &amp;quot;~&amp;quot; as a shortcut meaning &amp;quot;my&lt;br /&gt;
home directory&amp;quot;.  So, &amp;lt;tt&amp;gt;ls ~&amp;lt;/tt&amp;gt; lists the files in your home&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
If you want to think in terms of grammar, COMMAND is a verb, OPTIONS&lt;br /&gt;
are adverbs, and ARGUMENTS are direct objects.&lt;br /&gt;
&lt;br /&gt;
For many commands, ARGUMENTS are optional.  For example &amp;lt;tt&amp;gt;cd&amp;lt;/tt&amp;gt;&lt;br /&gt;
(without any arguments) is equivalent to &amp;lt;tt&amp;gt;cd ~&amp;lt;/tt&amp;gt;.  &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt;&lt;br /&gt;
(without any arguments) is equivalent to &amp;lt;tt&amp;gt;ls .&amp;lt;/tt&amp;gt; (&amp;quot;.&amp;quot; means &amp;quot;the&lt;br /&gt;
current directory&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
How can you tell which options a command accepts?  The manual pages&lt;br /&gt;
are a good way to find out.  For example:&lt;br /&gt;
&lt;br /&gt;
  man ls&lt;br /&gt;
&lt;br /&gt;
Shows the manual page for the &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Of course, &amp;lt;tt&amp;gt;man&amp;lt;/tt&amp;gt; is just a command; it&amp;#039;s got a manual page,&lt;br /&gt;
which you can see with &amp;lt;tt&amp;gt;man man&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Many commands accept &amp;lt;tt&amp;gt;--help&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;-h&amp;lt;/tt&amp;gt; as an option, and&lt;br /&gt;
will respond with a brief summary of their command line syntax.&lt;br /&gt;
&lt;br /&gt;
Man pages are written to be reference material; they&amp;#039;re generally not&lt;br /&gt;
tutorials (though some of them are written as tutorials).&lt;br /&gt;
&lt;br /&gt;
Other sources of documentation include [http://tldp.org/ TDLP], the&lt;br /&gt;
linux documentation project, and your distribution&amp;#039;s web site.  And of&lt;br /&gt;
course, searching the fine web is another way to find documentation.&lt;br /&gt;
&lt;br /&gt;
Finally, we talked a little about environment variables, and the&lt;br /&gt;
&amp;lt;tt&amp;gt;$PAGER&amp;lt;/tt&amp;gt; environment variable in particular.  A &amp;quot;pager&amp;quot; is a&lt;br /&gt;
program for viewing files one page at a time (&amp;lt;tt&amp;gt;more&amp;lt;/tt&amp;gt; and&lt;br /&gt;
&amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt; are two popular pagers).  As an illustration, compare&lt;br /&gt;
this&lt;br /&gt;
&lt;br /&gt;
  export PAGER=more&lt;br /&gt;
  man ls&lt;br /&gt;
&lt;br /&gt;
with this&lt;br /&gt;
&lt;br /&gt;
  export PAGER=less&lt;br /&gt;
  man ls&lt;br /&gt;
&lt;br /&gt;
If you define a &amp;lt;tt&amp;gt;$PAGER&amp;lt;/tt&amp;gt; program, man will use it to display&lt;br /&gt;
manual pages one screen at a time.  The former shows the &amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt;&lt;br /&gt;
manpage, paged through &amp;lt;tt&amp;gt;more&amp;lt;/tt&amp;gt;.  The latter shows the&lt;br /&gt;
&amp;lt;tt&amp;gt;ls&amp;lt;/tt&amp;gt; manpage, paged through &amp;lt;tt&amp;gt;less&amp;lt;/tt&amp;gt;.  You can also do&lt;br /&gt;
silly things like&lt;br /&gt;
&lt;br /&gt;
  export PAGER=tac&lt;br /&gt;
  man ls&lt;br /&gt;
&lt;br /&gt;
to see the ls manpage displayed with the lines reversed.&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux Class]]&lt;/div&gt;</summary>
		<author><name>SteveR</name></author>
	</entry>
</feed>