Ubuntu – How to gain root privileges

permissionsroot

How do I gain root privileges in Ubuntu Desktop 12.04? I installed to a USB stick to try it out. Now when I installed it on a VM, I don't have the same options as I did on the USB stick, such as opening remote desktop, installing drivers, and some of the video capabilities.

Best Answer

There are 2 ways to do things with elevated permissions.

sudo lets you run commands in your own user account with root privileges.

su lets you switch user so that you're actually logged in as root. But this options is by default disabled on Ubuntu. Instead you can simply start a root shell with sudo -i.

Read What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? for more information.

Use either method only as and when needed, they can cause your system damage if used without caution.