Useful Commands

File commands

ls (-l)

List files (-l = detail)


Print working directory


Change directory

cp <original> <newname>

Copy file/directory

mv <original> <newname>

Move file/directory

locate <filename>

Locate a file

User/permission commands

su <username>

Substitute user (change to a different user)

chmod <permission> <filename>

Change mode (alter file/directory permissions)

chown <username>:<group> <filename>

Change ownership of a file/directory


Reminds you what user you are running as

Text commands

less <filename>

Display a text file on screen (q to exit)

tail <filename>

Print last few lines of a file

grep <search term> <filename>

Get regular expression (search for all occurrences of <search term> in a file

joe <filename>

Simple text editor

emacs <filename>

Complex text editor

vi <filename>

Insanely complex text editor

Other commands

man <commandname>

Manual: display help file for a command (q to exit)

ssh <hostname>

Secure shell (log on to another server)

scp <options>

Secure copy (copy files between servers)

lynx <url>

Text-mode browser


Text-mode ftp client


Total operating processes (displays system perfomance)


Up/down arrow keys

Recall previous commands


Command/filename completion


Cancel (force quit) from a program


Current directory


One level up


Home directory