This thread is full of great solutions that I know I will ignore…
I also recommend Atuin, the better shell history that works with most shells and can replace both up arrow and ctrl-r
cd -will bring you to the last directory you were in.Very useful tip: i have ls aliased to eza which is ls with eyecandy, I have la aliased to eza -a and I have cd aliased to cd && eza which makes navigating folders very easy. I also aliased … to cd … for convenience. I know a lot of people are purists about the terminal but i think this is a good ballance between convenience and simplicity. Doesnt do a lot of the cursed stuff ricers like to do.
cdis azoxidealias for me. If I need to navigate by folder content, I haveyaziony
Let me teach you about reverse-i-search in bash…
Yeesh, I just learned something new. Thanks!
I was just about to ask how the hell anyone remembers or knows all these commands, thanks for the info! I am trying to learn Linux and get used to using the Terminal more often.
Yep, thats a good one. Another one,
ALT + .inputs the last argument from your last command, pressing it multiple times cycles thorough your past arguments.Nice, 30 years and I didn’t know this one. I always use the
$!for the last argument.I’ve never heard of
$!but we use Macs at work.Alt+.doesn’t work so I’ve been using$_.⌥+.does the trick for me on MacOS.Just as a matter of interest, I just tried this and it simply printed ≤ on the console. I’m using
Terminaland Tahoe 26.2.I think for
Terminal.appyou have to enable “Use Option as Meta key”I’ll try to remember to check it out in the morning, thank you.
edit: This worked. This is amazing. Thank you so much.
I don’t even want to think about how much effort this has saved me.
Ctrl-R
Try it. Please, I beg you.






