Gold University of Minnesota M. Skip to main content.University of Minnesota. Home page.
 
 
 

What's inside.

Assignment Calendar

Office Hours

Syllabus

Unix Commands

CSci1121 Forum

Check Your Grades

Online Submission

 

CSCI1121 Home

 
 

Printer-friendly version

 

This page shows some basic UNIX commands. All students should familiarize themselves with them. In general, any parameter between < > is required, while any parameter between [ ] is optional.

File/directory commands

Command and usage Meaning
ls List all the files and directories in the current directory
cat <file-name> Show the contents of the file file-name on the prompt
cp <file-name1> <file-name2> Copy file-name1 to file-name2
mv <file-name1> <file-name2> Move or rename file-name1 to file-name2. Works only if file-name2 does not exist
rm <file-name> Be careful! Permanently delete file-name
pwd Prints your working (current) directory
cd <dir-name> Enter the directory dir-name from the current directory
mkdir <dir-name> Create a new directory dir-name in the current directory
rmdir <dir-name> Be careful! Remove permanently the directory dir-name from the current directory

Commonly used programs

Command and usage Meaning
gedit [file-name] Opens the text editor gedit. If file name is specified, gedit starts and opens the file automatically. If the file does not exist, a new blank file is created.
emacs [file-name] Opens the text editor emacs. If file name is specified, gedit starts and opens the file automatically. If the file does not exist, a new blank file is created.

Remote file commands

Command and usage Meaning
ssh <username>@<machine-name> Remotely connect to the machine with the username. For example, if user shesh003 wants to connect to the machine chicken.itlabs.umn.edu then the command would be ssh ashesh@chicken.itlabs.umn.edu.
logout Log out (disconnect) from a connection set by the ssh command
 
The University of Minnesota is an equal opportunity educator and employer.
Introduction to the Internet