Repeating the Last Command as Root — a Quick Intro to Event Designators with Video Example
If you ever forget to run a command with root privileges, you can simply repeat it by using sudo !! or su -c “!!”. $ adduser sam -bash: /usr/sbin/adduser: Permission denied $ sudo !! sudo adduser sam $ id sam uid=1007(sam) gid=1007(sam) groups=1007(sam) $ usedel -r sam -bash: /usr/sbin/userdel: Permission denied $ sudo !! sudo … Read more