Useful Commands

The following is a list of useful Linux commands

A

apt-get autoremove – Removes installed packages that are no longer used.

B

C

cat {filename} – Displays the content of a file.

cd {directory(folder) name} – Changes directory (folder).

cd .. – Moves to the parent directory at the top of the directory tree.

cp {filename} – Makes a copy of a file.

clear – Clears the terminal screen.

D

date – Displays the date and time.

E

F

G

H

I

J

K

L

ls – Displays the contents of the current directory.

ls -l – Displays a detailed list of the contents of the current directory.

M

man {command} – Displays the manual page for the command.

mv {filename} {directory} – Moves the file to the new location (directory).

mkdir {directory name} – Creates a new directory.

N

nano – Opens the nano text editor.

nano {filename} – Opens the chosen file in the nano text editor.

O

P

pwd – Shows the current directory you are working in.

Q

R

rm {filename} – Deletes the chosen file.

sudo rpi-update – Raspberry Pi firmware update command.

S

sudo – runs commands as super user

T

U

apt-get update – Updates the raspberry pi. Must be ran as super user (sudo) for example sudo apt-get update

apt-get upgrade – upgrades to the latest packages. Must be ran as super user (sudo) for example sudo apt-get upgrade

V

W

X

Y

Z