Phase 0: Command Line & OS Literacy · ~35 minutes · Terminal · chmod · PATH
Permissions, Processes, and Environment Variables
"command not found" almost never means it didn't install. It usually means it installed somewhere your shell isn't looking.
Hiring signal: Diagnoses 'command not found' and 'permission denied' by checking the actual cause, not by reinstalling or chmod-ing blindly
What you will learn
- Read and set file permissions with chmod, in both symbolic and octal notation
- Explain $PATH as the ordered list of places the shell looks for commands
- Diagnose 'installed but not on PATH' as distinct from 'not actually installed'
- Predict who can read/write/execute a file from its permission string
Introduction
Type: Learn Languages: Bash / Zsh Prerequisites: Lesson 02 (Reading, Filtering, and Combining Text) Time: ~35 minutes
Objective
Learning objectives
- Read and set file permissions with
chmod, in both symbolic and octal notation - Explain
$PATH as the ordered list of places the shell looks for commands - Diagnose "installed but not on PATH" as distinct from "not actually installed"
- Predict who can read/write/execute a file from its permission string
What you're building
A script greet.sh that prints a short greeting:
- Create it, confirm with
ls -l that it initially lacks execute permission, and confirm running it directly fails with Permission denied - Fix it with
chmod +x, confirmed by both ls -l and successfully running ./greet.sh - Move it to a directory that is not currently on your
$PATH (create one if needed), confirm running it by bare name (greet.sh) fails with command not found even though it exists and is executable - Add that directory to
$PATH for your current session and confirm greet.sh now runs by bare name - Record every command and its real output in
path_notes.txt, plus one sentence distinguishing what problem each of the two errors actually indicated
A file's permission string is -rwxr-x---. Who can execute this file?
Reading the three groups: owner is rwx (full access, including execute), group is r-x (read and execute, no write), other is --- (nothing at all). Execute permission (the x) is present for owner and group, absent for everyone else — so the owner and the file's group can run it, but no one outside that group can, matching a common real setting for a team-shared script that shouldn't be world-runnable.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Problem, Check Yourself, Key Terms & Next — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy