Ubuntu Linux Shell Commands quick reference

The following is a quick reference list of some useful Linux shell commands along with a short description of common usage. There are several more, but this basic list was created to help familiarize the newly introduced Ubuntu users. Those who might be migrating from a Windows operating environment.

Linux Shell Commands - examples

cd - change to a new directory.

usage: cd <directory name>

clear - clear the screen.

clear

cp - copy files (similar to copy in DOS).

cp <filename> <new location>

diff - compare files for differences.

diff <file1> <file2>

exit - exit or quit the terminal.

exit

find - find files by name.

find -name <filename>

fsck - check disk integrity (similar to DOS scandisk).

fsck

ifconfig - view network settings (similar to DOS ipconfig).

less - view text files

less <filename>

lpr - print text files.

lpr <filename>

man - get help for a provided command.

man <command>

mkdir - create a directory (make directory).

mkdir <directory name>

mv - move files to a new location or rename files.

mv <filename> <new location>

ping - check a network connection.

ping <address>

rm - delete or remove a directory or file (similar to del in DOS).

rm -rf <directoryname>

rm <filename>

tracepath - view a network route of provided address.

tracepath <address>

vi - edit files (command line text editor).

vi <filename>