sudo 用来执行命令行(CLI)程序
gksu 用来执行图形的(GUI)程序
GUI = Graphical User Interface
CLI = Command Line Interface
sudo 是当前用户的home目录,gksu 是root 用户的home目录
sudo gvim 和 gksu gvim 明显不同,
sudo gvim 读取当前用户下的 ~/.gvim 配置文件,
gksu 读取 root 用户的配置文件,因为当前用户配置文件里设置字体没起作用,:cd 后 :pwd 结果是 /root
所以在系统或程序启动时,没有运行终端CLI,可以用gksu来实行root权限。
su/sudo for CLI commands, and gksu/gksudo for running GUI applications (launched from the command line).
In ubuntu gksudo is just a link to gksu, so your always running gksu anyways. You can check for yourself> nautilus /usr/bin
Here's a little known tip, if you run just "gksu" you will get a root run dialog, to run any app as root or other user.
1. In Ubuntu (I suppose in most unix/linux systems), there is a user called root (also called superuser) that has the necessary rights (privileges) to do anything that he wants.
2. In Ubuntu, they have chosen to disable the root user, because any user that belongs to the admin group is able to execute commands as if he was the root user. To execute a command with the same privileges as the root user, he has to put the word "sudo" before the command. (I suppose, sudo stands for SuperUserDO)
3. There is also the command su, that stands for switch user. It is intended to switch from one user to another user in the terminal; the syntax is "su name_of_the_other_user".
4. If you call su without indicating the name_of_the_other_user, su assumes that the other user is the root user. So Ubuntu edgy and feisty simply replaces sudo with su without the name_of_the_other_user, which corresponds to su root.
(Question: how can su switch to the root user if the root user is disabled?)
5. gksu and gksudo are in the graphical environments what su and sudo are in the terminal.
By the way, I have read in another thread: people should use gksudo in the terminal to launch a graphical application with root privileges; for example "gksudo gedit". It is also possible to use "sudo gedit", but it is not a good way to do it, because gksudo sets up things for a graphical environment, but sudo sets them up for a text environment. (or something like this)
ref: http://ubuntuforums.org/showthread.php?t=397398
分享到:
相关推荐
博客附带的附件,有利于问题的解决,Ubuntu下删除 sudo文件的问题解决!
说明的Ubuntu中sudu命令的含义及用法。希望对大家有帮助。
Ubuntu18.04sudoaptupdate无法解析域名的解决方案.docx
从细节上给你讲解su和sudo的区别, 1 就是说从sudo切入进去的root并不是真正的root,而是具有root的某方面权限而已.. 也就是说 从sudo切入进去的,跟输入root 再输入密码的.两种情况权限可能不相同的...对吗...
nginx-autoinstall, 在Debian和Ubuntu上,使用定制模块从源代码编译 Nginx 自动安装通过optionnal模块编译和安装 Nginx 。 兼容性x86,x64,arm*Debian 8和更高版本Ubuntu 16.04和更高版本特性最新的主线或者稳定...
Ubuntu中sudo执行需要网络代理的命令.pdf
解决Ubuntu域名无法解析方法 要的抓紧下啊
Ubuntu20.04和Ubuntu16.04等其他Ubuntu离线安装openssh-server 安装步骤: sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb sudo dpkg -i openssh-client_8.4p1-6ubuntu1_amd64.deb sudo dpkg -i openssh-...
在ubuntu系统下,对文件进行拷贝,重命名等操作
sudo 与 su 两个命令的最大区别是:sudo ...另外一个区别是其默认行为。sudo 命令只允许使用提升的权限运行单个命令,而 su 命令会启动一个新的 shell,同时允许使用 root 权限运行尽可能多的命令,直到明确退出登录。
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb sudo dpkg -i openssh-client_8.4p1-6ubuntu1_amd64.deb sudo dpkg -i openssh-sftp-server_8.4p1-6ubuntu1_amd64.deb sudo dpkg -i openssh-server_8.4p1-6...
2. sudo dpkg -i libtirpc1_0.2.5-1.2ubuntu0.1_amd64.deb 3. sudo dpkg -i rpcbind_0.2.3-0.6ubuntu0.18.04.1_amd64.deb 4. sudo dpkg -i keyutils_1.5.9-9.2ubuntu2_amd64.deb 5. sudo dpkg -i nfs-common_1%3a...
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.7_amd64.deb sudo dpkg -i openssh-client_8.4p1-6ubuntu1_amd64.deb sudo dpkg -i openssh-sftp-server_8.4p1-6ubuntu1_amd64.deb sudo dpkg -i openssh-server_8.4p1-6...
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb sudo dpkg -i openssh-client_7.2p2-4ubuntu2.8_amd64.deb sudo dpkg -i openssh-sftp-server_7.2p2-4ubuntu2.8_amd64.deb sudo dpkg -i openssh-server_7.2...
sudo dpkg -i openssh-client_6.6p1-2ubuntu1_amd64.deb sudo dpkg -i openssh-sftp-server_6.6p1-2ubuntu1_amd64.deb sudo dpkg -i libck-connector0_0.4.5-3.1ubuntu2_amd64.deb sudo dpkg -i openssh-server_6.6...
ubuntu server 7.0.4 xming,Xmanage putty 1. Update ubuntu sudo apt-get update sudo apt-get upgrade 2. install the development environment and libraries sudo apt-get install build-essential ...
在ubuntu16.04上模拟硬件lcd绘图显示, 用c语言使用绘图在lcd上显示
sudo dpkg -i openssh-client_1%3a7.6p1-4ubuntu0.6_amd64.deb sudo dpkg -i ncurses-term_6.1-1ubuntu1.18.04_all.deb sudo dpkg -i openssh-sftp-server_1%3a7.6p1-4ubuntu0.6_amd64.deb sudo dpkg -i openssh-...