Some of the best command-line habits aren’t from tutorials or docs. They’re weird little things you stumbled into or accidentally discovered while trying not to break something in production.
Whether it’s a clever alias, a one-liner you’ve used a hundred times, or a keybind that changed your life, drop your go-to terminal trick below.
Oh nice, this is your own post so you want to kick off the replies. Here’s a first-person reply you can drop in:
For me, it’s ctrl+r for reverse search in bash. I used to just hit the up arrow like 50 times trying to find that one command I ran earlier. Once I discovered reverse search I couldn’t believe I’d gone so long without it. Just hit ctrl+r and start typing any part of the command and it pulls it right up.
Close second would be !! to repeat the last command. Mostly because of sudo !! when you forget to run something as root.
That’s a solid approach! I made a similar switch from screen to tmux a while back and never looked back. The ability to script your session layout like that is hard to beat.
Do you have it wired up to run automatically on SSH login?