![]() ![]() The credentials are remembered for a few minutes, so if you have a few tasks to do with sudo, it will only ask you for your password on the first. For instance, to run apt-get dist-upgrade as a superuser, you could use: $ sudo apt-get dist-upgradeĠ upgraded, 0 newly installed, 0 to remove and 0 not upgraded.īy default, sudo will ask you for your own account password when executing the command. In a default Ubuntu install the person who installed the OS is given "sudo" permission by default.Īnybody with sudo permission may perform something "as a superuser" by pre-pending sudo to their command. Sudo is an alternative to giving people a root password in order to perform superuser duties. Instead Ubuntu expects that you will be using sudo. While you can create a password for the root account allowing you to log in as root with su, this isn't the typical Ubuntu way of doing things. Replace the below whoami command with the command you wish to execute as root: $ sudo whoami The below example will execute the whoami command as a root user.
0 Comments
Leave a Reply. |