Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to use sudo

📅 2014-May-20 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ sudo ⬩ 📚 Archive

$ sudo adduser joe sudo
$ sudo some_command

The superuser privileges last at this shell session for about 15 minutes. Any other superuser commands you execute within this time at this shell session will not require you to enter the password.

$ sudo -u joe some_command
$ sudo -s
$ sudo -E some_command
$ sudo -l
$ sudo -l -U joe

Tried with: Ubuntu 18.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧