Basic Unix Commands

Directory Movement

pwd Prints the path of the current directory
cd directory-path Change to a directory
cd Change to home directory

File/Directory Viewing

ls Lists the contents of the current directory
ls -al Lists the contents of the current directory in detail
pwd Prints the path of the current directory
cat filename Display entire file
more filename Page through a file: space to advance, q to quit

File/Directory Control

mkdir new-directory Create a new directory
cp old-file new-file Copy a file from old-file to new-file
mv old-file new-file Rename a file from old-file to new-file
rm file Remove a file
rmdir dir Remove a directory

Scripting

script scriptname Starts recording a script
Strg-d Stops recording a script

TAR / UNZIP

tar -cvf outputfile inputfiles Creates a tar archive called outputfile which contains the inputfiles
tar -xvf tarfile Extracts the contents of tarfile
tar -tf tarfile View the contents of tarfile
unzip zipfile Extracts the contents of zipfile to the current directory

Misc

<up-arrow> Get previous command
<down-arrow> Get next command
<left-arrow>
<right-arrow>
Move cursor to the left or right
<tab> Path-completion