CoursesLinux essentialsThe shell & filesystem

The shell & navigating

Where you are, moving around, getting help.

Beginner12 min · lesson 1 of 25

The shell is the text interface you type commands into, and it is where nearly all server and DevSecOps work happens — no clicking, just commands. The most common shell is bash (some systems use zsh); when you open a terminal you get a prompt, and every command you type is a program the shell finds and runs for you. Getting comfortable here is the foundation for everything above it, because the rest of the stack — Docker, Kubernetes, CI — is ultimately you driving Linux from a shell.

terminal
$ pwd # print working directory — where am I?
/home/deploy
$ ls -la # list everything here, long format, including hidden files
$ cd /var/log # change directory
$ cd ~ # ~ is your home directory; "cd" alone also goes home

Everything is a path

Linux organizes everything as a single tree of directories starting at / (the root). An absolute path starts from the root (/var/log/syslog); a relative path is from where you currently are (../config). A leading ~ means your home directory. Two special names appear everywhere: . is the current directory and .. is the parent. Once paths click, navigating any Linux system is the same everywhere.

When you do not know a command

Nobody memorizes every option. Three habits make you self-sufficient: man <command> opens the manual page, <command> --help prints a quick usage summary, and which <command> tells you where a program actually lives on disk. Reaching for man first is the difference between guessing and knowing, and it works offline on every Linux box.

terminal
$ man ls # full manual (press q to quit, / to search)
$ ls --help | head # quick usage summary
$ which ssh # where does this command live?
/usr/bin/ssh
$ history # every command you have run — handy, and an audit trail
The shell does exactly what you say
There is no "are you sure?" for most commands — rm deletes immediately, with no recycle bin. A mistyped path or a stray space (rm -rf / tmp instead of rm -rf /tmp) can be catastrophic, especially as root. Read the command before you press Enter, prefer explicit paths, and be extra deliberate with anything destructive. Respect for the shell’s literal-mindedness is a security habit, not just a safety one.