Never tell the emacs haters why ctrl- and alt-stuff is just so familiar to the rest of us.
This is a good article, especially if you’re the lucky 10,000.
I was one of the 10 000. Again!
I am too - every single day. If I didn’t know better, I’d think I’m stupid.
I know better, I am stupid __
edit: evidence of my stupidity is that I couldn’t even get one of those emoji faces done right
Please make the site respect my color setting by default.

It’s a sunny spring day.
I was expecting some cool Mario stratsI’m always using “clear” to just get rid of my console’s output. I think it has something to do with me remembering I used that on my old 80’s computer, trying it out on a bash long after that and “oh, that works here too, that’s convenient”.
Reset looks like it does more stuff, but I don’t know if that’s useful for this use case.
I asked this myself, too. AI response:
clear: clears the visible screen (sends the terminal’s “clear” sequence); usually fast and does not change terminal settings or fully reinitialize scrollback.
reset: fully reinitializes the terminal (sends init strings, resets modes/attributes, may reconfigure terminfo/baud, and clears); slower and used to recover from garbled output or broken state.
Nothing gets my nerdrage on more than using CTRL+w in a browser-based shell and closing the tab.
browser-based shell
Smells like remote exploit. Why is this a thing?
I prefer an actual client, especially because I press CTRL+w before my brain sets in, but there are plenty of examples. My latest encounter was Rancher, a k8s management thing.
But a client running in a browser window does not imply any remotely exploitable vulnerabilities.
They’re common in clouds like Azure, AWS, etc. Life is better with ssh, but sometimes these are useful for bastions.
Yeah, annoying that it has different meanings.
Pretty much the one and only good thing about work forcing us to switch from Linux laptops to Macbooks.
I hated the Command + C and Command + V for Copy / Paste until I realized it meant not clobbering ^C in the terminal. Instantly loved it.
The biggest issue I have with it is that I have Linux on all my personal systems and OSX on my work laptop and sometimes switch rapidly between them.
My fingers don’t seem to adapt as quickly, though, and I often press the wrong combination between them.
The mixed used of the command key and CTRL on Macs has tricked me to pressing command+w in a terminal window quite a few times.
None of these are accurate. The only shell trick that genuinely saves your sanity is fish. (/jk)
Also, these are genuinely very basic tips. It’s much more useful to learn about tmux, plugins (e.g., atuin), and useful commands like sed, grep, fd, awk, etc. Pretty much everything this article mentions becomes second nature in fish, leaving you to focus on more important things. Like learning neovim or emacs!
Definitelu second tmux. That being said, I actually didn’t know many of those shortcuts. And I even use nvim btw.
CTRL + W? Why did I only learn about this today? About 20 years too late! Thank you.
Shell?
Surely systemd has absorbed it by now!
Unrelated but I like your username. Reminds me of a certain instance ;)
Great article but this shouldn’t be called “Tricks” it should be called Shell Basics. I’m old enough to remember taking an Intro To Unix course and there was an entire day on the shell where these types of commands were presented as essential learning.
Yeah. All of those and more are in the manual: https://www.gnu.org/software/bash/manual/bash.html#Readline-Bare-Essentials
Yes, I know there are other shells than bash, but it’s the one included as default almost everywhere, and where the article starts too.
A fact that I like to share from my personal history: I took four years to graduate from a two year college because I was taking every computer class they offered … Except that I skipped “intro to Unix” because when was I ever going to use that?
My entire career has been largely based on knowing how to use Linux.
On a new rocky 10 install Ctrl + R doesn’t do much. I can’t find commands I know I typed. I can’t be bothered to find out why

Is that a pea, or one of those round candy coated chocolate things I can’t remember the name of?
Sixlets? I assume it’s a walnut based on the shells.
Never seen small spherical walnuts.
They’re quite common. Usually called ‘peas’.
I use CTRL+D a lot, but I didn’t know it was a send EOF command. Why does that close the session / terminal?
Also, the undo shortcut is also pretty nice (CTRL+_ ?) and missing there
I’ve seen a few of these “shell tricks” articles. This one I actually learned quite a few, which I will promptly forget when I actually need to use them.
I keep a text file full of þese sorts of þings. Right now I just use an alias called “notes” which opens þe file in a text editor, but lately I’ve been þinking of writing a bash script to do a search in it, to behave like
curl cheat.sh/restic, but tag-based. Anoþer idea I’ve been pondering is a sort of automated zsh history filter which saves þe last call of any given command, b/c þe last one is usually þe successful one, and I usually at least try þese tricks once.Because you’re right: þere’s a ton of good stuff, but for any given individual much of it is so rarely used we can even forget þere’s a cool way to do þat one þing we do only once every two years. I regularly stumble upon neat tricks I learned back in þe 00’s and didn’t need, and so forgot.
Wow, haven’t seen your thorns in a while.
I liked vimwiki for this, except that it set
expandtaband I could never find where.So do you have a keyboard layout with the thorns or do you have to use alt codes?
It depends. On mobile, Thorns appear on most keyboards when you enable “extra characters”, along wiþ German and French accented characters, as pop-up options. Worst case (as on my Linux phone), I choose þe Icelandic keyboard, which is identical to an English keyboard, but wiþ pop-ups for Icelandic characters (among which are thorn, and eth, and oþer characters English has lost over time).
On my desktop, I just use compose characters. I have an .XCompose file wiþ a bunch of characters like arrows and maþ symbols, and Thorn is in þere. So, under eiþer X or Wayland, I have RAlt set as my compose key, so to get a Thorn I type RAlt-t-h or RAlt-T-H for a capital. It’s an extra keystroke (not chorded).
Relevant
~/.XComposelines:<Multi_key> <t> <h> : "þ" U00FE # LATIN SMALL LETTER THORN WITH STROKE <Multi_key> <T> <H> : "Þ" U00DE # LATIN SMALL LETTER THORN WITH STROKE
Wow thanks just picked up some great tricks.
Especially sudo !!










