[lug] Newbie Column #4 - Some Simple Commands

Wayde Allen wallen at boulder.nist.gov
Wed Jan 26 11:36:57 MST 2000


Once you've successfully logged onto the machine, all you will probably
see is a line marker and cursor.  At this level, things don't look much
different than the old DOS command line that some of you may be familiar
with.  In fact, CPM and DOS were both modeled after many of the concepts
originally developed in the UNIX environment.  If you learned any of the
DOS commands you will soon discover that many of the UNIX commands are
very similar.  Often if you know a DOS command simply dropping all the
vowels will give you a nearly equivalent UNIX command, but not always.

If you are thinking that this sounds like a step backwards from the
"modern" windows environment hang in there.  UNIX actually has many
different graphical environments that you can use, but maintains the
ability for you to make use of the command line environment.  Sometimes
the command line is simply the most convenient and effective approach to
problem solving.  Also, bear in mind that windows is still being upgraded
to add many of the features already present in the UNIX environment. 
Enough of that though, let's talk about some fundamental commands.

Once you are logged on, you will find yourself in what is called your
"home directory".  This is a directory on the disk that belongs to you,
and is where you primarily do your work.  I'm assuming you already know
about files and directories.  If not, please let me know.  We'll be
exploring the file system layout next time so this is important. 

For now, let's just introduce a small set of necessary commands. These
are: 

ls      - LiSt contents of the directory (The DOS equivalent would be DIR) 

cd      - Change Directory 

pwd     - Print Working Directory, this shows you the directory you are
          currently in. 

mkdir   - MaKe DIRectory 

rmdir   - ReMove DIRectory 

man     - Look something up in the on-line manual.  This is similar to the
          DOS HELP command. Typing: 

             man ls 

          will display the manual page for the ls command. Typing: 

             man man 

          displays instructions on how to use the man command itself. 

I suggest you log on and experiment with these commands to see how they
work.  In particular, check out the man page for the man command, and try
creating few directories, cd'ing into and out of them, listing their
contents with ls, and deleting them.  If you get lost simply type cd on a
line by itself.  This will take you back to your home directory. If you
have any questions please ask.

Next time, I plan to give you a tour of the overall file system.  For
this, you will particularly need to know how to use the cd, and ls
commands. 

- Wayde
  (wallen at boulder.nist.gov)





More information about the LUG mailing list