The One Symbol That Saves You From Ever Typing a Long File Path Again
A single character that quietly stands in for the longest part of almost every path you’ll ever type
The One Symbol That Saves You From Ever Typing a Long File Path Again
A single character that quietly stands in for the longest part of almost every path you’ll ever type
Photo by Julian Zwengel on Unsplash
Every file on your computer lives at the end of a long, specific path.
Some folder, inside another folder, inside another, all the way back to the very root of your system.
Typed out in full, these paths get long fast. Especially anything tucked deep inside your own home folder.
Many people type the whole thing anyway. Every time.
There’s a single character that replaces the longest, most repetitive part of that path, every single time, and it’s been sitting on your keyboard.
The symbol itself
~
The tilde. One character, usually shared with the backtick key, near the top left of most keyboards. In a terminal, this single symbol stands in for your entire home folder path, automatically, every time you use it.
So instead of typing this.
/home/yourname/Documents/projects
You type this.
~/Documents/projects
Same destination. A fraction of the typing. The tilde quietly expands into your full home path the instant you use it, without you ever having to type or even remember what that full path actually is.
Why this matters more than it looks like it should
Home folder paths tend to be the longest, most repetitive part of almost everything you type in a terminal.
You’re constantly referencing folders inside your own home directory, Documents, Downloads, Desktop, some project folder you’re working in. Every single one of those starts the exact same way.
The tilde collapses all of that repetition into one character every time, for every command.
cd ~/Downloads
cp report.txt ~/Documents/
ls ~/Desktop
Three different commands, three different folders, and not one of them required typing your actual home directory path in full.
It works for other people’s folders too
Add a username right after the tilde, and it points to that specific user’s home folder instead of your own.
~otheruser/Documents
This is especially useful on a shared computer with multiple accounts, where you occasionally need to reference a path inside someone else’s home folder without typing the entire absolute path from scratch.
A second symbol worth knowing alongside it
While the tilde handles your home folder, a single dot handles something different but equally useful: your current location.
.
One dot means “right here, the folder I’m currently in.” Two dots means “one level up from here.”
..
Here’s what that looks like in practice. Say you’re sitting inside this folder.
~/Documents/projects/website
You want to get to ~/Documents/projects instead, just one level up. Instead of typing the whole path again, you type:
cd ..
That single command takes you from website straight up into projects. You're now here:
~/Documents/projects
Want to go up two levels instead of one? Stack two pairs of dots, separated by a slash.
cd ../..
Starting again from ~/Documents/projects/website, that command jumps you up twice, landing you here:
~/Documents
Each .. is one step upward. One pair, one step. Two pairs, two steps. You're never typing the actual folder names on the way up, just counting how many levels you need to climb.
Combine tilde and dots together, and you can move around relative to wherever you currently are, without ever typing a full path at all.
cd ../../Documents
This moves up two folders from where you currently are, then into Documents from there, all without referencing a single absolute path.
Putting both together
These two symbols cover almost every situation you’ll run into.
Tilde when you want to jump straight to your home folder or somewhere inside it, regardless of where you currently are. Dots when you want to move relative to your current position without caring what the full path actually is.
cp ~/Downloads/file.txt .
This copies a file from your Downloads folder straight into wherever you currently are.
Why almost nobody gets taught this early
Most introductions to the terminal teach cd and ls first. Then move on to other commands, treating paths as something you'll just figure out by typing them in full until it becomes muscle memory.
Nobody pauses to point out that an entire category of repetitive typing has a one-character shortcut sitting right there the whole time.
Once it clicks, though, it’s hard to imagine typing full paths again. The tilde becomes the default starting point for almost everything, and the long version starts to feel like the strange, unnecessary detour it always was.
A small habit that quietly removes a constant annoyance
Next time you catch yourself typing out a long path starting with /home/, stop. Replace everything up through your username with a single tilde instead. One character, doing the work of an entire folder structure, every single time you need it.
It’s a small change. But it’s the kind that, once automatic, makes every single path you type from then on just a little shorter, a little faster, and a little less annoying than it used to be.
Thanks for reading! I left a six-figure smart contract auditing career to learn Linux, Python, and AI engineering from scratch. I share my raw learning updates and one actionable terminal trick every Wednesday in my newsletter, Terminal to AI. **Join the journey for free here**.
메타데이터
- post_id
- 8e74f88fd341
- slug
- the-one-symbol-that-saves-you-from-ever-typing-a-long-file-path-again-8e74f88fd341
- url
- https://medium.com/my-lifes-mirrow/the-one-symbol-that-saves-you-from-ever-typing-a-long-file-path-again-8e74f88fd341
- canonical_url
- https://medium.com/my-lifes-mirrow/the-one-symbol-that-saves-you-from-ever-typing-a-long-file-path-again-8e74f88fd341
- author_url
- https://medium.com/@tibas
- status
- ok
- fetched_at
- 2026-06-27 18:37:17