University of Rhode Island HomeUniversity DirectoriesUniversity Fast Linkse-CampusDepartment HelpDepartment Webmail Server
Department Home

The following is a list of the most common UNIX commands. You can use these either in an Xterm window, or through telnet.

wildcard expansion

Instead of specifing filenames, you can also specify lists of files that have certain characters in common using wildcards. ? represents one character and * represents zero or more characters. For example, report? refers to filnames like reports, report1, report2, etc. and h* refers to all files beginning with h.

tab completion

When you are typing filenames at the UNIX prompt, if you type the first few letters and hit the tab key, an attempt will be made to fill in the entire filename for you. If there are multiple matches then only the characters that both matches have in common will be filled in.

ls

The ls command displays a list of files. The most common usage is ls -la, which specifies that detailed information about each file should be given, and that all files, including hidden files, should be listed. If the list scrolls by too fast, then you can type ls -la | more to view the output one page at a time.

cd

The cd command lets you change the current working directory. You can either specify the full path or a directory relative to the current directory. For exmaple if the current directory is dir1 and you want to change to /dir1/sub1, you can either use cd sub1 or cd /dir1/sub1. cd .. changes to the parent directory and cd ~ changes to your home directory.

mkdir

The mkdir command is used to make new directories. Similar to cd, the name of the directory can use relative or absolute paths.

rmdir

The rmdir command is used to delete directories.

cp

The cp command is used to copy files. You must specify the source file to be copied and its destination. The destination of the file can either be specified by filename or by the directory that the file should be copied to. For example, you would type cp temp.txt .. if you wanted to copy a file called temp.txt to the parent directory.

mv

The mv is used to move files. As with the cp command, both the source and destination must be specified.

rm

The rm command is used to remove files. The only thing that must be specified is the filename to be removed.

chmod

The chmod command is used to change permissions of a specified file. You must specify the new permissions before the filename.

passwd

The passwd command is used to change your password. You will first be promted for your current password and then twice for the new password, to make sure that you did not mistype it. For security reasons the password will not be displayed on the screen as you type it.

man

Arguably the most important command is the man command. This command will display an instruction manual about any unix command. All the details are covered in a concise format. For example, if you wanted to learn exactly what all the options the ls command has, you can type man ls. Use the space bar to advance page by page or use q to quit.

University Home
©2006 Disclaimer

Write us at: 4 East Alumni Ave, Kingston, RI 02881-0805, USA.
Phone: 401-874-2505, Fax: 401-782-6422.
Contact the department. Javascript menu by Milonic.

Page last updated: Monday, April 24, 2000