On Monday, October 15, 2012 05:19:29 PM Ralf Mardorf wrote: > Assumed that you are not blind, perhaps a YouTube video will help you to > learn faste, resp. it might better explain how to e.g. become root in a > terminal emulation.
Or, perhaps, a simple list of ways to become root without any clutter. Log in as root on a console, and return to the GUI: Type <SHIFT><ALT><F1> through <SHIFT><ALT><F6> to get to a console Log in as root Log out (typically using <CTRL/D> or exit) Type <SHIFT><ALT><F7> to return to your GUI. (It usually runs on virt. cons. 7, but sometimes on VC6 or VC8). Become root in the current directory: su su root sudo su sudo su root sudo /bin/bash Execute a command as root: su -c "/sbin/sbin-command with options and args" su root -c "/sbin/sbin-command with options and args" sudo /sbin/sbin-command with options and args sudo -u root /sbin/sbin-command with options and args Become root as though root had logged in on the terminal (or text console); this give you root's PATH and other ENV settings and puts you in root's home dir: su - su - root sudo su - sudo su - root sudo /bin/bash -l # Except this one leaves you in the current dir Execute a command in root's environment: su - -c "/sbin/sbin-command with options and args" su - root -c "/sbin/sbin-command with options and args" sudo su - -c "/sbin/sbin-command with options and args" sudo su - root -c "/sbin/sbin-command with options and args" Notes: - Su will always ask for the target user's password unless you are already root. - Sudo (on most modern GNU/Linux dostros) will ask for the user's password instead of root's password. - Having su run a command (or having sudo run a command other than su) can be insecure (but it is not necessarily so) - Some distros will install only sudo by default. For security purposes (partly because the X11 protocols can be insecure), most GNU/Linux distros do not allow root to log in to the GUI. To learn more, 'man su', 'man sudo', and/or 'man bash'.