💾 Archived View for jan.bio › bash › repeating-a-command-with-sudo.gmi captured on 2023-11-14 at 07:47:01. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-10-31)
-=-=-=-=-=-=-
Sometimes I forget to run a command as sudo. Bash comes to help and can repeat the previous command:
$ pacman -Suy docker Sorry, you need to be root to execute docker. $ sudo !! sudo pacman -Suy docker [sudo] passord for jans: ... $
`!!` can also be used to repeat the previous command.