# Asking Questions: read

read waits for the user to type a line and keeps it in a variable: -p shows a question first, -s hides what's typed, and ${name:-default} gives an answer that was left empty a default.

![Cheat sheet for the lesson Asking Questions: read: read waits for the user to type a line and keeps it in a variable: -p shows a question first, -s hides what's typed, and ${name:-default} gives an answer that was left empty a default.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/823766316859457da8ed52dba0696853.webp)

- Category: Bash
- Level: Apprentice
- Tags: linux, read, shell-variable, standard-streams, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-reading-input-cheat-sheet
