Welcome to r/linuxtricks — The home for Linux one-liners, shell tricks, and CLI hacks
If you've ever typed a command and thought "there has to be a shorter way"
— you're in the right place.
r/linuxtricks is a community for practical Linux tricks, shell one-liners,
and CLI shortcuts that actually save time. No fluff, no theory — just
commands that work.
**What belongs here:**
- Shell tricks (bash, zsh, fish, ksh, posix)
- CLI tool shortcuts (awk, sed, tmux, vim, openssl, kubectl and more)
- Sysadmin one-liners that make you look like a wizard
- Anything that saves keystrokes and runs on Linux
**The rules are simple:**
-
Test your command before posting — working code only
-
Label your shell or tool in the title e.g. [bash] or [openssl]
-
Free tools mentioned in context are fine — sales pitches are not
-
Be kind to beginners — everyone started somewhere
**How to post:**
Share a trick with a working example and a one-line explanation of what
it does. The best posts show the before and after — what most people do
vs the shortcut.
**To kick things off** — here's the trick that started this community:
Stop typing the filename twice. Brace expansion handles it.
Instead of:
cp config.yml config.yml.bak
Just write:
cp config.yml{,.bak}
Works in bash and zsh. Been saving keystrokes for 28 years.
---
Got a trick that saved your day? Post it.
Someone out there is still typing the long way.
How to Get Started
- Introduce yourself in the comments below.
- Post something today! Even a simple question can spark a great conversation.
- If you know someone who would love this community, invite them to join.
- Interested in helping out? We're always looking for new moderators, so feel free to reach out to me to apply.
Thanks for being part of the very first wave. Together, let's make r/linuxtricks amazing.
Posted Feb 22, 2026, 9:16 PM UTC