sudo, gksudo, kdesudo and their differences?
sudo
stands for Super User Do
. That means it provide privileges of the root/main user via terminal. Learn more about sudo from its official site.
From Vinicius's comment
It originally stood for 'superuser do' as the older versions of sudo were designed to run commands only as the superuser. However, the later versions added support for running commands not only as the superuser but also as other (restricted) users, and thus it is also commonly expanded as 'substitute user do'. Although the latter case reflects its current functionality more accurately, sudo is still often called 'superuser do' since it is so often used for administrative tasks.
gksudo
and kdesudo
both are also sudo
thing except that first one is use for graphical sudo
operation which works using GUI instead of terminal and second one is gksudo
alternative for Kubuntu.
And a short note from wiki
You should never use normal sudo to start graphical applications as Root.You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by Root. (AFAICT, this is all that's special about the environment of the started process with gksudo vs. sudo).
Related videos on Youtube
SamuelH
Updated on September 18, 2022Comments
-
SamuelH almost 2 years
What is the difference between sudo, kdesudo and gksudo, and when should I use each? I know that sudo allows me to run both cli and gui functions, but I've seen other people on websites using kdesudo and gksudo for gui functions.
-
bacon over 10 yearsInteresting question but it can also be found here superuser.com/q/202676/302835
-
Takkat over 10 yearsrelated: askubuntu.com/questions/21033/… and worth further reading: askubuntu.com/questions/78352/when-to-use-pkexec-vs-gksu-gksudo
-
-
Youda008 about 7 years
su
is not 'super user', but 'switch user', the user to switch to is an optional argument, which default valus is root -
Nabil about 7 years@Youda008 AFAIK sudo stands for 'super user do'. If you have any reference add them here please.
-
valkalon about 6 yearsthe "man sudo" on Ubuntu will tell you "Execute a command as another user" @Youda008 seems to be right. I guess the "super user do" is a simplification. Anyway, so much for the detail ;)
-
Vinicius about 6 yearsJust as a curiosity, from Wikipedia: "It originally stood for 'superuser do' as the older versions of sudo were designed to run commands only as the superuser. However, the later versions added support for running commands not only as the superuser but also as other (restricted) users, and thus it is also commonly expanded as 'substitute user do'. Although the latter case reflects its current functionality more accurately, sudo is still often called 'superuser do' since it is so often used for administrative tasks." en.wikipedia.org/wiki/Sudo
-
pdc almost 6 yearsI understand with 18.04 that one can no longer do
gksu gedit /path/to/file.txt
to edit a file, and instead one must now dogedit admin:///path/to/file.txt
as discussed here maketecheasier.com/gksu-alternatives-ubuntu-bionic -
rexkogitans about 5 yearsIf
sudo
is somehow related tosu
, it must be substitute user, according to Wikipedia and the FreeBSD man page of thesu
command.