Using the mouse to cut and pasteGetting started with UnixOpening a terminal windowSome basic Unix commands

Some basic Unix commands

Here are a few basic Unix commands that you can execute at the command prompt in a terminal window. For more information, read the manual page via "man command-name".

cd [directory]

This changes the working directory to the one specified. If no argument is specified, it changes the working directory to the home directory. (The square brackets indicate optional arguments. Do not type actual brackets at the command line.)

chmod

This command changes the access permissions for a file. For example, chmod a+r filename gives all users permission to read the file.

cp source-file destination-file

This copies source-file to destination-file.

lpr filename

Sends the specified file to the default printer. On some systems, lp is used instead.

ls

This lists the names of the files in the current directory.

mkdir directory-name

This creates a directory.

more filename

This allows you to browse a text file one screenful at a time. Some systems have an improved version of this command whimsically named less (because "less is more").

mv source-file destination-file

This renames a file.

pwd

This tells you the name of the current working directory. (Useful when you are lost in the directory hierarchy.)

rm filename

This deletes the specified file. Use with caution: Unix has no undelete feature!

who

This displays who is currently logged in to the system.


logo The Math 696 course pages were last modified April 5, 2005.
These pages are copyright © 1995-2005 by Harold P. Boas. All rights reserved.
 
Using the mouse to cut and pasteGetting started with UnixOpening a terminal windowSome basic Unix commands