Windows terminal navigation: Difference between revisions

→‎Practice navigating from the terminal: Changed dir to ls, clarified the structure of the filesystem, and added notes about using PowerShell instead of cmd.exe.
imported>Mako
 
imported>Ben zen
(→‎Practice navigating from the terminal: Changed dir to ls, clarified the structure of the filesystem, and added notes about using PowerShell instead of cmd.exe.)
Line 3:
== Practice navigating from the terminal ==
 
The filesystem on your computer is like a tree made up of folders (also called "directories") and files. The filesystem is divided between drives, each named with a letter; the main drive has a root directory called <tt>/C:\</tt>, and everything on yourthis computerdrive lives in subdirectories of this root directory.
 
We often navigate the filesystem graphically by clicking on graphical folders. We can do the exact same navigation from the terminal.
 
There are two commands that we'll be using in a terminal to navigate the filesystem on your computer:
* <code>ls</code> in PowerShell; <code>dir</code> in <code>cmd.exe</code>
* <code>cd</code>
 
<code>ls</code> (<code>dir</code>) lists the contents of a directory.<br />
<code>cd</code> moves you into a new directory (it stands for "change directory").
 
Line 18:
===Open a terminal===
 
* On Windows Vista or Windows /7/8/8.1: click on the Start menu (the Windows logo in the lower left of the screen), type <code>cmdPowerShell</code> into the Search field directly above the Start menu button, and click on "cmdPowerShell" in the search results above the Search field.
* On Windows XP: click on the Start menu (the Windows logo in the lower left of the screen), click on "Run...", type <code>cmd</code> into the text box, and hit enter.
 
===Practice using <code>dirls</code> and <code>cd</code>===
 
Type each of these commands and hit enter:
 
<pre>dirls</pre>
This lists all the files in your current directory.
 
Line 35:
<br />
 
<pre>dirls</pre>
This lists the contents of the <code>C:\</code> directory.
 
Line 45:
<br />
 
<pre>dirls</pre>
You should see the names of all the files and directories in <code>C:\Users</code>.
 
Line 55:
<br />
 
<pre>dirls</pre>
This lists the contents of the root directory, confirming where you are.
 
Line 77:
===Success!===
 
You've practiced using <code>dirls</code> and <code>cd</code> to navigate your computer's filesystem from the terminal prompt.
 
[[File:Champagne.png|100px]][[File:Party.png|125px]]
Anonymous user