Set a shell variable in the current shell.
Section: Variables and Expansion
Assign shell variable
bash
bash
name='alice'Explanation
Do not put spaces around `=` in shell variable assignments.
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 Variables and Expansion