Thursday, June 4, 2009

How to run a command in Ubuntu as an administrator without opening a terminal

One of the major drawbacks of starting to learn linux is having to open a terminal every time you want to do anything as an administrator.Here is the tutorial without openning a terminal
  • in Ubuntu, press alt and F2 at the same time. This will bring up a "run application" box.
  • In the "Application Box", type "gksu [APPLICATION OR COMMAND]" where [APPLICATION OR COMMAND] is the command or application you want to run as administrator. the "gksu" will automatically ask you for the password, and will run the command that follows it as an administrator.
  • an example would be wanting to run nautilus, the window manager for Ubuntu, as an administrator, so you can add, edit and delete files in other places than just the home directory. that command would be: "gksu nautilus". This would ask you for your password, and then open nautilus as an admin.
Its best to do most everyday commands without being an administrator, as this limits the user and limits any accidental damage to the operating system or software. Only use this when you need to.


  1. Thanks for the tip!

  2. Excellent tip! Thank you! Being that this is Ubuntu perhaps gksudo would be more appropriate, but they have the same man page so close enough for me!

    You can also prepend gksudo to menu shortcuts that you need to run as a super user. (I'm looking at you WireShark.)

    Thanks again!

  3. What if the "alt and F2" combination gives nothing?