The school computers run Linux. This section covers the minimum you need to get around on the command line.

Warning: Most Linux commands execute immediately without asking for confirmation. A mistyped rm command can permanently delete files with no way to recover them. Read commands carefully before pressing Enter.

The filesystem layout#

Linux organizes all files in a single directory tree rooted at /. There are no drive letters — everything starts from the same root.

Path Purpose
/ Root of the filesystem
/home/firstname.lastname Your personal home directory (also written ~)
/tmp Temporary files, cleared on reboot
/etc System configuration files
/usr/bin Programs and commands

Your home directory /home/firstname.lastname (also written ~) is not where your files are permanently stored. On school computers, the home directory is local to each machine and is wiped on logout. Your persistent storage is an AFS volume (network storage), symlinked to ~/afs.

Anything saved outside of ~/afs is lost when you log out. Always store your work inside ~/afs. Because it is network storage, your files are identical on every machine in the school — log in anywhere and find them exactly where you left them.

Essential commands#

Command Effect
pwd Print the current directory
ls List files in the current directory
ls -la List with details, including hidden files
cd dirname Enter a directory
cd .. Go up one level
cd ~ Go to your home directory

Files and directories#

Command Effect
mkdir name Create a directory
touch file Create an empty file
cp src dest Copy a file
mv src dest Move or rename a file
rm file Delete a file — no confirmation, no trash
rm -r dir Delete a directory and everything inside it
cat file Print the contents of a file
less file View a file page by page (Q to quit)

Getting help#

Command Effect
man command Open the manual page for a command
command --help Print brief usage information

AFS#

The AFS (Andrew File System) is the storage space allocated to each student allowing you to store files persistently between different sessions on any computer in the machine hall. Each student has 2GB of storage. Any file stored outside your AFS storage will be lost after a reboot of the computer.

Be careful, this storage space fills up quickly and can cause problems for you if you have reached your quota. Stay vigilant about your usage of the space.