GUIDE 01 / START HERE
Terminal & files
Navigate the filesystem, inspect files, and work comfortably in the terminal.
Commands use class paths and example filenames. Replace placeholders and inspect the target before making changes.
Find your place
An absolute path starts at /. A relative path starts from your current directory. The ~ shortcut refers to your home directory.
pwd
ls -lah
cd "$HOME"
cd /var/log
cd ..Use ls -ld DIRECTORY to inspect the directory itself rather than its contents.
Create, copy, and move
Work in a practice directory while learning. mkdir -p creates missing parent directories. cp copies a file; mv moves or renames it.
mkdir -p ~/practice/linux
cp ~/practice/example.txt ~/practice/linux/
mv ~/practice/linux/example.txt ~/practice/linux/notes.txtThese copy and move examples assume ~/practice/example.txt already exists. Check destination names before overwriting files.
Identify and read files
file inspects content to identify a file type. less and more are pagers; less supports convenient forward and backward navigation. Press q to leave a pager.
file notes.txt
less notes.txt
head -n 10 notes.txt
tail -n 10 notes.txt
wc -l /etc/passwdRenaming image.png to image.pdf does not convert its contents. Use a real conversion tool. diff works best on text; extract PDF text before comparing document wording.
Find files by name
Quote patterns so find receives the wildcard. The starting directory is depth 0; -maxdepth 1 examines immediate children, and -maxdepth 2 also examines their children.
find /etc -maxdepth 1 -type f -name "*.conf" 2>/dev/null
find /etc -maxdepth 2 -type f -name "*.conf" 2>/dev/null
find "$HOME" -type f -name "*.pub"Permission errors hidden with 2>/dev/null mean your search may be incomplete. wc -l counts output lines, which normally correspond to paths unless a filename contains a newline.