Linux command: sudo

Quick startsudoCommand to run commands as another user

sudoUsually used to run commands as root.

You must enable it to usesudo, And then you can run the command as the root user by entering the user password () (Is notroot user password).

Permissions are highly configurable, which is especially useful in a multi-user server environment, and certain users can be granted access to run specific commands in the following ways:sudo.

For example, you can edit the system configuration file:

sudo nano /etc/hosts

Otherwise, you will not be able to save because you do not have permission.

You can runsudo -iStart the shell as the root user:

you can use itsudoRun the command as any user.rootIs the default setting, but please use-uSpecify options for other users:

sudo -u flavio ls /Users/flavio

ThissudoThis command can be used in Linux, macOS, WSL and wherever you have a UNIX environment

Download mine for freeLinux Command Manual


More cli tutorials: