Just installed mint yesterday, I get it now
Just installed mint yesterday, I get it now
I thought it'd be a pain but installing programs through the terminal is actually so nice, I never would have expected it
Just installed mint yesterday, I get it now
I thought it'd be a pain but installing programs through the terminal is actually so nice, I never would have expected it
sudo !!
which foo
tells you where the foo
program is locatedls -la
cd
without any args takes you to your home dircd -
takes you to your previous dirIf you’re looking for a full list of these kind of navigation shortcuts, they all come from readline
so read the man
page for that. Or just look up the basic navigation of emacs
which is what readline
is mimicking.
I've been using the commandline for so long but was always too lazy to look up the rest of these commands after ctrl+a/e and ctrl+r THANK YOU!!!
post this commend again and again! There's always lazy idiots like me who will be helped that way!
Nice list, TIL about Ctrl+U
and Ctrl+Y
.
If I may add, Ctrl+X
into Ctrl+E
opens $EDITOR
to edit the current line.
Makes me realize just how illogical and bad these shortcuts are
I believe, these are Emacs shortcuts. There's also set -o vi
in bash, but I've never used it, so can't vouch for it.
That’s good to know. It’s interesting that the other commenter thinks emacs shortcuts are illogical. I’ll make my best guesses at the logic
- ctrl-a/ctrl-e for start/end of line
a is the beginning of the alphabet; e for end (of line)
- ctrl-u to clear the command you’ve typed so far but store it into a temporary pastebuffer
- ctrl-y to paste the ctrl-u’d command
No idea here. Seems similar to nano with k-“cut” and u-”uncut”.
- ctrl-w to delete by word
w for word obviously.
- ctrl-r to search your command history
- alt-b/alt-f to move cursor back/forwards by word
r reverse, b back, f forward. Not sure why alt vs control though; presumably ctrl+b and ctrl+f do different things although I know emacs likes to use Alt (“Meta”) a lot.
In the 1980s, Digital Equipment Corporation had a word processor, WPS. Ctrl-u cleared the line you were typing and put it into the paste buffer. Maybe legacy usage?
Explains why they are so illogical! Unfortunately i think its better to just learn the defaults since i remote into lots of servers where i dont carry my config