tilde expansion

The shell replacing a tilde at the start of a word with your home directory path before a command runs.

In more detail

Because the shell does it, the command receives a full path such as /home/ada/data and never sees the tilde. It only happens unquoted and at the start of a word, so "~/data" in double quotes stays a literal tilde. ~ada expands to the home directory of the user ada.

Example

ls ~/data

Related terms

Taught in

References