Difference between sudo and gksudo

James Gilbert jamie.gilbert at gmail.com
Fri Sep 7 10:18:51 BST 2007

Rafael Francisco Compte Mosquera wrote:
> Hi, I am kind of a newbie in linux. I like to learn new things and 
> being a musician it was very stimulating and great challenge (because 
> I only knew Windows) to wipe out my Windows XP and install 
> Ubuntustudio 7.04, which I find incredibly powerful. All my knowledge 
> of linux (which is still very limited) has come from digging dip in 
> the manuals , help files and forums on the web, and now I think I am 
> able to do much better when it comes to do the things I need to do 
> with my computer. As someone else posted "in theory" one should use 
> gksudo. Why is this? I have used sudo whitout an issue when I needed 
> to do something as root. But I didn-t know about gksudo. Can anybody 
> explain the difference?
> Thanks,
> Rafael
Taken from the man of gksudo:

 "gksu  is a frontend to su and gksudo is a frontend to sudo.  Their 
primary purpose is to run graphical commands that need  root  without  
the need to run an X terminal emulator and using su directly."

That means you don't need to load up a terminal (or ubuntu doesn't) to 
use a graphical program as root without being logged in as a root user. 
So you could type "gksudo gedit <filename>" in a run box (or have an 
icon that runs this command), and no terminal would load up. I think, 
but i'm not 100% on this, that if you run a program from a terminal with 
gksudo it has more properties based on the gui rather than a terminal 
emulating buttons and events, like close.

Man pages are extremely useful for this kind of thing, a lot of the time 
they seem to contain gibberish or language that only experienced 
unix/linux sysadmins can understand, but this really just depends on the 
author. To read the manual page of a command just type "man <command>" 
in a terminal.


More information about the Ubuntu-Studio-users mailing list