Linux Commands Helper
💬 Your AI-powered Linux assistant
sudo Command - Execute a Command as Another User
sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. It is commonly used to perform administrative tasks.
Syntax
sudo [options] command
Examples
sudo apt update
Run apt update
as root.
sudo useradd newuser
Add a new user with root privileges.
Notes
- Requires the user to be listed in the
/etc/sudoers
file. - Use
sudo -i
to start a root shell. - Misuse can lead to system damage; use with caution.