Linux Format

10 Gain more access privileges with Sudo

-

When you open the Terminal, you log on to the shell via your own user account. Certain commands require elevated access as the root user (look for a ‘permission denied’ error), and you achieve this by preceding the command with sudo , like so: $ sudo apt-get install vlc You’ll be prompted for your own user account password, and the command will now run – you should now be able to use the sudo command again during the Terminal session without being prompted for your password. By the way, if you forget to include sudo from a command, just type sudo !! and hit [Enter] to repeat the command with sudo applied to it. If you want to launch a desktop app with root privileges (such as the Nautilus file manager), use the gksu tool (install it first): $ sudo apt-get update && sudo apt-get install gksu $ gksu nautilus Nautilus will open as normal, but with elevated access. When you’re done, close the app window, then press [Ctrl] + [C] in the Terminal, which interrupts the current running program and returns you to the command line. Some distros enable you to log on to the command line as the root user with the su tool, but Ubuntu blocks this, and for good reason. Stick with the sudo tool instead.

Newspapers in English

Newspapers from Australia