Linux Fundamentals

The Shell & Filesystem

Navigate the filesystem, understand paths, and get comfortable in a POSIX shell.

35 min read beginner 3 objectives

Status

Not started

What you will learn

  • Move around the filesystem with confidence
  • Read absolute vs relative paths
  • Inspect files and directories

New to this? Start here

The basics, in plain English

Before any of this makes sense, here is the ground floor. A computer stores everything as files, and those files live inside folders. The shell is just a place where you type short text commands to move around those folders and open or change files, instead of clicking with a mouse.

File
A single saved thing on the computer: a photo, a note, a program. It has a name.
Folder / directory
A container that holds files and other folders. "Directory" is just the technical word for a folder.
Filesystem
The whole tree of folders inside folders, starting from one top folder, that holds everything on the machine.
Terminal
The black window where you type commands. Think of it as a chat box with the computer.
Shell
The program listening inside that window. You type a command, the shell runs it and shows the result.
Command
A short word you type to make something happen. "ls" lists files, "cd" changes folder.
pwd
Stands for "print working directory". It tells you which folder you are standing in right now.
cd
Stands for "change directory". It moves you into a different folder, like double-clicking a folder.
ls
Stands for "list". It shows you what files and folders are inside where you are.
01

Why the shell matters

Every server you touch in DevOps is driven from a shell. Mastering it is non-negotiable. The shell is a text interface to the kernel — you type commands, it runs programs.

02

Core navigation

Use pwd to print the working directory, cd to change it, and ls to list contents. Paths starting with / are absolute; everything else is relative to where you stand.

03

Inspecting files

cat dumps a whole file, less paginates it, head and tail read the ends, and file tells you what a thing actually is.

Try it yourself

bash
$pwd
Print the current directory so you always know where you are.
$cd /var/log
Move into the system log folder.
$ls -lah
List everything: long format, human-readable sizes, and hidden files.
$tail -f syslog
Stream a log live and keep printing new lines as they arrive.
↳ lines explain what each command does — only the commands get copied

Finished this topic?

Mark it done to earn 100 XP and keep your streak alive.