Working on a Linux Computer

Basic Linux Commands

ls Show file list (in the current directory)
ls -l Show a detailed file list (in the current directory)
mkdir dirname Create a new subdirectory named dirname
cd dirname Move from current directory to the directory named dirname
pwd Print the full path of the current directory
cd .. Go to the directory above the current one
cd Go back to your main (home) directory
more filename Show the file filename on the screen, page at a time (press space to scroll)
cp file1 file2 Copy file1 to file2
cp filename dirname/ Copy the file filename into the subdirectory dirname
cp * dirname/ Copy all the files in the current directory to the subdirectory dirname
mv file1 file2 Rename file1 to file2
mv filename dirname/ Move the file filename to a the directory dirname
rm filename Remove (delete) the file filename
passwd Change password
rm -r dirname Remove the directory dirname (with all its contents)
program > filename Redirect the output from program program to the file filename
Control-c Interrupt a running process (e.g. your Perl program) in the middle
lpr -Pprinter_name filename Print the file filename on the laser printer printer_name
exit Log out