Reading output and exit codes
After a command runs, it usually prints something. Learning to read that output is a real skill, because it's how you and the AI find out whether things worked.
- Normal output is just information — files listed, progress messages, a server saying it started.
- Errors usually say so plainly:
Error:,command not found,permission denied,cannot find module. The words after the colon are your clue. Copy the whole error and paste it to your AI — it's the single most useful thing you can hand over when something breaks.
Behind the scenes, every command finishes with an invisible exit code: 0 means success, anything else means a problem. You rarely need to check it by hand, but you'll hear it mentioned. You can see the last one like this:
echo $? # prints the exit code of the last command (0 = OK)
If a command failed silently and you're not sure, echo $? tells you whether it really succeeded.