Linux & shell: Navigate & list
13 Linux & shell commands: Navigate & list. Click a command to see what each part does.
Linux & shell: Navigate & listIndex
- Whole sheet251
- Navigate & list13
- Create, copy, move, delete13
- View & compare files9
- Permissions & ownership31
- Help & shell basics11
- Users & groups6
- Install packages7
- Package & software versions29
- System info9
- Network basics & SSH10
- Zip & compress4
- Shell operators6
- Processes6
- Files & search8
- Text processing pipelines4
- Disk3
- Network5
- Services & logs6
- Archives & copying4
- Firewall7
- Scheduling: cron & systemd timers6
- Storage, mounts & LVM10
- Kernel, hardware & limits8
- Performance & tracing10
- TLS & certificates8
- Packet capture & network debugging10
- Terminal tools8
Navigate & list13
cd <dir>Go into a folderWhat each part does
cdchange directory (a shell built-in)<dir>relative path (logs) or absolute path (/var/log)
cd ~Go to your home folderWhat each part does
cdchange directory~your home directory (/home/<user>); plain "cd" with no argument does the same
cd ..; cd -Go up one level / back to the previous folderWhat each part does
cd ..".." is the parent of the current folder;thencd -jump back to the folder you were in before (and print it)
pwdShow where you areWhat each part does
pwdprint working directory: the full path of the current folder
lsList filesWhat each part does
lslist the current folder (names only, hidden dot-files not shown)
ls -lLong listing: permissions, owner, size, dateWhat each part does
lslist directory contents-llong format: permissions, links, owner, group, size in bytes, modified date, name
ls -laInclude hidden files (.env, .git …)What each part does
-llong format-a--all: also show entries starting with "." (including . and ..)
Tip ls -lA shows hidden files but leaves out . and ..
ls -lhLong listing with readable sizesWhat each part does
-llong format-h--human-readable: sizes like 4.0K, 12M, 1.3G instead of bytes (works with -l)
ls -ltrNewest files last (great for log folders)What each part does
-llong format-tsort by modification time, newest first-r--reverse: flip the order, so the newest ends up at the bottom next to your prompt
ls -lhSBiggest files firstWhat each part does
-l -hlong format with readable sizes-Ssort by size, largest first
ls -d */List only sub-foldersWhat each part does
-d--directory: list the folders themselves, not what is inside them*/shell glob that matches only directories
ls -R <dir>List everything below, recursivelyWhat each part does
-R--recursive: list every sub-folder too
tree -L 2 <dir>Folder tree, two levels deepWhat each part does
treedraw the folder structure (install it: apt install tree)-L 2limit depth to 2 levels
Nothing matches.
My DevOps Playbook by Angelo John Calleja