!! Just puts in your last typed command. So if you typed rm -rf /etc, you wouldn’t have permission. But if you typed in sudo !! Right after, then you’re really fucked.
Adding to this, if you notice numbers next to your previous commands when you run history, you can do !<number> and it will rerun that command. Probably the second cool shell trick I learned back in the olden days or yore (mid-90s?) after ⬆️
!! Just puts in your last typed command. So if you typed rm -rf /etc, you wouldn’t have permission. But if you typed in sudo !! Right after, then you’re really fucked.
Ah I wasn’t clear – those, I knew. It’s alt+S I don’t know. I’m at my machine now and it doesn’t seem to do anything on Pop_OS.
Seem to be a
fishshell thing.I tested on my good ole trusty
bashand got nothing so I went searching.EDIT: Clarification :
alt+sseems to be afishshell thing.Ya I haven’t tried alt s. Never heard of it before either.
Not if you don’t type your password.
Adding to this, if you notice numbers next to your previous commands when you run history, you can do !<number> and it will rerun that command. Probably the second cool shell trick I learned back in the olden days or yore (mid-90s?) after ⬆️
ctrl-r is generally quicker
Learned that one embarrassingly much later.
I assume if you are silly enough to type in rm -rf /etc, then you are silly enough to type in your password 😅