Useful Unix Commands

Command   Description
man <command>   On-line manual pages for <command> (e.g., man g++)
apropos <keyword>   Find on-line manual pages containing <keyword> (e.g., apropos compiler)
ls   Lists the current directory
pwd   Prints the present working directory
mkdir <directory>   Creates a the directory named <directory> (e.g., mkdir cosc071)
cd <directory>   Changes to the directory named <directory> (e.g., cd p1)
cd ..   Changes to the directory one level up in the hierarchy
rmdir <directory>   Removes the empty directory named <directory> (e.g., rmdir cosc071)
more <file>   Prints the contents of <file> to the console (e.g., more proj1.cc)
rm <file>   Removes the file named <file> (e.g., rm a.out)
mv <source> <target>   Moves or renames the file named <source> to the file named <target> (e.g., mv a.out proj1.exe)
cp <source> <target>   Copies the file named <source> to the file named <target> (e.g., cp proj1.cc cosc071/proj1.bak)
vi <file>   Edits the <file> using the vi editor (e.g., vi proj1.cc)
nano <file>   Edits the <file> using the nano editor (e.g., nano proj1.cc)
g++ <file>   Compiles the C++ source file named <file> and writes the executable code to the file named a.out (e.g., g++ proj1.cc)
ssh <host>   Secure shell program: Starts a secure session with (e.g., ssh seva.georgetown.edu)
sftp <host>   Secure file transfer program: Starts a secure ftp session with (e.g., sftp seva.georgetown.edu)
logout   Terminates the UNIX session