Shell basics
Understand the prompt, run commands and read help without guessing.
What you will be able to do
- Use pwd to see where you are.
- Use which or type to find a command.
- Check $? for the previous exit code.
- Use man or --help to learn options.
In plain English
The shell reads a line, finds an executable on your PATH and runs it with arguments. Exit codes tell you whether it worked: 0 means success and anything else means failure. Read them instead of assuming.
pwd
type git
echo "exit: $?"
ls --help | headYour turn
EasyCheck a command result
Run a command and print its exit code.
BASH · starter
lsCheck your understanding before moving on.
Knowledge checkQuestion 1
What exit code means success?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.