Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Sudo: Difference between revisions

From atl.wiki
(sudo - initial)
 
(capitalization; some rewording)
Line 10: Line 10:
}}
}}


sudo (substitute user do) is a [[cli]] tool used to run [[commands]] as other users (most likely [[root]]). the system administrator can further edit the permissions of which user/group can use sudo and what commands can they run it on through the <code>/etc/sudoers</code> file
The cli tool <code>sudo</code> is a command line tool used to run commands as another user (most likely [[root]]). Its name is shorthand for "substitute user and do". System administrators may configure sudo by editing the <code>/etc/sudoers</code> file to specify which users or groups can execute specific commands.
 


== Usage ==
== Usage ==

Revision as of 05:49, 6 July 2024

Sudo

Sudo used on pacman
Release Status Maintained
Last Release 1.9.15p5, 2023-12-30
Language(s) c
Developer(s) sudo project
Website www.sudo.ws/

The cli tool sudo is a command line tool used to run commands as another user (most likely root). Its name is shorthand for "substitute user and do". System administrators may configure sudo by editing the /etc/sudoers file to specify which users or groups can execute specific commands.

Usage

The following are several common usecases for sudo.

note: every mentioned command is also compatible with the -u <user> argument, which will run the command as the given user instead of superuser

Common Sudo Commands
Command Description
sudo <command> run the given command as superuser
sudo -E <command> Run the given command as superuser while keeping the current user's env vars
sudo -s Opens a shell with superuser permissions


TODO: explain the usage of sudoedit and /etc/sudoers