performance
easy
Apply
history-expansion
2 points
Question 43. CSCD240-E1-A
Forgot sudo on previous command. Re-run with sudo prepended without retyping.
Work the drill
Answer on paper or in a terminal before revealing the ideal answer.
Ideal answer
sudo !!
Misconception bank
Each row below is a plausible wrong answer, the thinking that produces it, and the remedy that corrects the misconception. These are the foundation of the multiple-choice framing and the targeted feedback a student receives after answering.
sudo $LAST
Misconception. Env var doesn't exist by default.
Remedy. Teach !! specifically.
sudo <up-arrow>
Misconception. Up arrow followed by Home + "sudo " works but question asks for a one-line keystroke.
Remedy. Both work; sudo !! is the single-command form.
Authority mappings
Hover any chip for the mapping justification; click to open the authority record.
DCWF roles:
IT-411 Technical Support Specialist
DCWF tasks:
T0295
KU outcomes:
CD-BSP-O1
Course-artifact links
Lectures
- CSCD240-S26-L04. Command history, man pages, help system, history file
Lab questions
- CSCD240-S26-LAB2: Run several commands, then show output of history. Use !n to re-run.
CTF challenges
- 01 Shell & Help: Oops, Need Sudo