If you have never used a variable before, do not worry. It is one of the simplest ideas in this whole course, and Bash's version of it is about as plain as it gets. This lesson also covers quoting, which trips up almost everyone once, and then never again once it clicks.
A variable is just a name that stands in for a piece of text. Think of it like a sticky note: you write "today" on the note, stick it to a piece of paper that says "13 May 2026", and from then on, whenever you see the note "today", you know what it really means. In Bash, that sticky note is the variable name, and the paper underneath is the value. ...
What you'll learn
- Variable assignment
- Double quotes vs single quotes
- ${var} braces
- Command substitution $(...)
Work through Variables and Quoting
Sign in free and open the Bash course. Work through the lesson, and ask the AI tutor when you get stuck.
Read this lesson in your language
Explore other courses
Claude from Zero to Mastery47 lessons, 8.4h
Vibe Coding: Fundamentals12 lessons, 4.5h
Prompt Engineering11 lessons, 6.2h
Python19 lessons, 9.3h
Git13 lessons, 5.9h
Docker13 lessons, 6.6h
Kubernetes14 lessons, 8h
TypeScript18 lessons, 7.7h
Go20 lessons, 12.3h
React17 lessons, 10.2h
Linux17 lessons, 8.5h
Ansible12 lessons, 6.1h
Helm10 lessons, 5.4h
GitLab CI11 lessons, 5.8h
Jenkins11 lessons, 5.3h
PostgreSQL14 lessons, 7.6h
MySQL13 lessons, 6.8h
Web14 lessons, 5.9h
Vibe Coding12 lessons, 5.8h
Vibe Coding: Prototype to Production12 lessons, 5.5h
Vibe Coding: Multi-Agent Engineering12 lessons, 5.3h
Vibe Coding: Advanced Engineering12 lessons, 7.3h