C
Command: cd
Description: Changes the current directory
Click to Show Example$cd /home/user/Documents
Command: chmod
Description: Sets file permissions
$chmod 766 file.php
For more on setting permissions using chmod, use this convenient permission calculator.
Command: cp
Description: Copies directories and/or files
Click to Show Example$cp myfile.txt /Documents
L
Command: ls
Description: Lists files in the current directory
Click to Show Example$ls
$Desktop Downloads document.odt SamplePhoto.jpg
M
Command: mkdir
Description: Creates a new directory
Click to Show Example$mkdir newdir
Command: mount
Description: Mounts a disk drive
Click to Show Example$mount /dev/sda1
Command: mv
Description: Moves files/directories to new locations. Also can be used to rename files.
Click to Show Example$mv myfile.txt /Documents
$mv myfile.txt newfile.txt
P
Command: pwd
Description: Prints the name of the current directory
Click to Show Example$pwd
$/home/user/Documents
R
Command: rmdir
Description: Deletes an existing directory
Click to Show Example$rmdir Documents
S
Command: su
Description: User becomes root
Click to Show Example$su
Command: sudo
Description: Runs a program as root
Click to Show Example$sudo vi index.php
U
Command: umount
Description: Unmounts a disk drive
Click to Show Example$umount /dev/sda1