Lexington High School Mathematics Math Dept. Front Page  | Student Links  | Family Links 
C++ courses Intro. Prog. I  | Intro. Prog. II  | AP Comp. Sci.  | C++ Info Page 

UNIX Commands Quick Reference

This page lists some frequently used UNIX commands. The symbols DName and FName stand for arbitrary directory and file names, respectively.

Desired Action UNIX Command
Get information about a UNIX commandman Command
Create a directorymkdir DName
Change (to a different) directorycd DName
List contents of current directoryls
List contents of a different directory ls DName
List contents of a directory in detaills -l DName
Remove an empty directoryrmdir DName
Remove a filerm FName
Rename a file or directorymv OldName NewName
Move a file into a different directorymv Fname Dname
Copy a filecp OriginalFname CopyFname
Copy a directory and all its subdirectoriescp -r OriginalDName CopyDName
Clear the screen/windowclear
Record what appears on the screen/windowscript ScriptName
End recording of scriptCtrl-d
Edit a fileemacs FName
Compile a single C++ programmake SourceName
Compile and link several C++ programsg++ FName1.cpp ... FNamen.cpp -o ExecFName
Change your passwordpasswd
Exit the systemlogout