After this lesson, you will be able to: Navigate the Linux filesystem confidently, directories, absolute vs relative paths, and the 'everything is a file' philosophy.
Most of the cloud runs Linux. If you're going to deploy, debug, or operate a real system, the Linux shell is the place you do it. This lesson is the foundation.
This is a free introductory lesson. No purchase required.
Linux runs most of the world's servers, nearly every cloud instance, the inside of almost every container, and Android phones. If you operate software in production, you operate it on Linux, which is why this subtrack is the prerequisite for the rest of the track. A 'distribution' (distro) bundles the Linux kernel with tools and a package manager. You will mostly meet three: Ubuntu (and its Debian base) is the default for servers and what this track uses; Alpine is a tiny distro built for containers, so Docker images are often Alpine-based; Kali is a security-focused distro loaded with pentest tools, used in the Cybersecurity track. The commands you learn here transfer across all of them; mainly the package manager differs.
Everything starts at `/` (the root). `/home/<user>` is your home directory (also written `~`). `/etc` holds system-wide configuration files. `/var` holds variable data (logs, mail, databases). `/usr` holds user-installed programs and shared data. `/tmp` is scratch space cleared on reboot. `/bin`, `/sbin`, `/usr/bin` hold executables. Memorise this tree; you'll reference it for the rest of your career.
Absolute path starts with `/`: `/home/alex/code/api/src/main.ts`. Unambiguous everywhere. Relative path is relative to your current directory (cwd): `code/api` if you're in `/home/alex`. Shorter to type. Special shortcuts: `.` = current dir, `..` = parent dir, `~` = home dir, `-` = previous dir. Use `pwd` to see your current dir; `cd ~` to jump home; `cd -` to flip back.
These commands let you orient anywhere on any Linux box.
pwd # print working directoryls # list files in current dirls -la # list ALL files (including dotfiles), long formatcd /var/log # change directory (absolute)cd .. # up one levelcd ~ # jump to homewhoami # which user am Iuname -a # OS + kernel versiondf -h # disk usage, human-readablefree -h # memory usage
Trying to operate without `pwd` and `ls`. You'll delete the wrong file. Memorising commands without understanding what they do. Type `<command> --help` or `man <command>` for the docs. Treating Linux like Windows. Forward slashes only; case-sensitive file names. Editing files in `/etc` without making a backup first. `sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak` is muscle memory.
Pick the canonical location.