Read one line from stdin with a prompt.
Section: Reading Input
Prompt user for input
bash
bash
read -r -p 'Enter name: ' nameExplanation
-r prevents backslash escaping during input.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Reading Input