Operating System Information --> Unix (WAM and Glue) --> Unix Utilities --> Unix Navigation Commands -->

Unix Navigation Commands

These commands will work with most (if not all) distributions of Linux as well as most implementations of Unix. They're the commands that everybody knows. To be able to navigate in Linux, you should become familiar with these.

Navigation

Navigating around the files and directories of your hard drive could be a dreaded task for you, but it is necessary knowledge. If you were a user of command prompt interfaces such as MS-DOS, you'll have little trouble adjusting. You'll only need to learn a few new commands.

cd

The cd command stands for changes directories. To change directories just type:

rac z:~: cd ..

ls

The ls letters stand for list. It basically works the same way as the dir command in DOS.

Typing ls will give you a listing of all the files in the current directory. If you're new to Linux, chances are that the directories you are commonly in will be empty, and after the ls command is run, you aren't given any information and will just be returned to the command prompt (the shell).

To view the "hidden" files in Linux use the -a flag with the ls command, i.e. ls -a.

To view more information about the files in a directory, use the -l flag with ls. It will show the file permissions as well as the file size, which are probably what are the most useful things to know about files.

You can put flags together, so to view all the files in a directory, show their permissions/size, and view all the files that way through the subdirectories, you could type ls -laR.

To show folders and colors, type in ls --color -lF . This will show the folders in dark blue, symbolic links in light blue, and executable files in bold face.

pwd

This command simply shows what directory you're in at the moment. It stands for "Print Working Directory".

Copyright © 1997-1999 Joshua Go (jtg@computers.iwz.com). All rights reserved. Permission to use, distribute, and copy this document is hereby granted. You may modify this document as long as credit to me is given.

How do I:
How are we doing? Comments on this page?
Office of Information Technology
Office of Information Technology Help Desk Web Site University of Maryland Web Site Office of Information Technology Web Site