su与sudo的区别

root@XBBubuntu1210x86:/home/administrator/下载# ./VMware-Workstation-Full-7.1.6-744570.x86_64.bundle
Extracting VMware Installer...done.

** (vmware-installer.py:7888): WARNING **: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
/tmp/vmis.JzPtGe/install/vmware-installer/vmware-installer: 行 22:  7888 段错误               (核心已转储) VMWARE_INSTALLER="$VMWARE_INSTALLER" VMISPYVERSION="$VMISPYVERSION" "$VMWARE_INSTALLER"/vmis-launcher "$VMWARE_INSTALLER"/vmware-installer.py "$@"


 自己在ubuntu1210x64安装vmwareworkstation时候出现以上错误,后来纠结了一下,终于找到类似的资料,试了下果然可以。
因为我是su root切换用户安装的,所以出错,用su -root切换用户就可以顺利安装(本人没试,不过按照下面的文章,应该没问题的),我自己是直接在执行命令前加sudo,完整命令:sudo ./VMware-Workstation-Full-7.1.6-744570.x86_64.bundle

####################你懂的######################################################3

附上原文链接:
http://cache.baiducontent.com/c?m=9d78d513d9851bf84fede53e5a498a204e4380126f95924b2485c00ec83907564717b5e0713510758f983a7001de080bb6a62172465037b7ea88df0883f085285e9f2745671df60748840eafba19728061c30fbeb81996eab77384aea3928805148a08433197f0fa185d4a913ebb0076a3f89612531952adec4378e21c326c882337b616bfbd256e70d0ab8241118237d0631297ad3fad3d15b711ae140c2433fa0aee56&p=8b2a96448c934eac5eed8728610ec12e&newp=c062de5e91934eac5eedc92d0215d62d5c5bc4387ebad0117f89&user=baidu&fm=sc&query=the+remote+application+did+not+send+a+reply%2C+the+message+bus+security+policy+blocked+the+reply%2C&qid=&p1=8
感谢原文作者!!!

下面是原文:

su与sudo的区别
 
今天在用gvim(ubuntu12.04)的时候出现如下错误,以前都没出现这个错误,而且打开时gvim会白屏,等很久才正常显示.
刚开始没有在意,google了一下用gvim -f就可以解决,正常使用.
  www.2cto.com  
后来使用的时候有出现下面的错误
\GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
google了一下说是没有以 root 身份使用 dbus。
 
奇怪了,我明明就是root权限。
以前一直用sodu -i 切换到root权限,今天不知怎么的在写一个自动登录的脚本的时候心血来潮用su root 得到root权限,难道这里出问题了?
果然:
su 和 sudo 的区别:
1.共同点:都是root用户的权限;
2.不同点:su仅仅取得root权限,工作环境不变,还是在切换之前用户的工作环境;sudo是完全取得root的权限和root的工作环境。
  www.2cto.com  
su - root 和 su root(su)有什么区别?
su - root:表示人以root身份登录
just like login as root, then the shell is login shell,
which mean it will expericene a login process,
usually .bash_profile and .bashrc will be sourced
su root:表示与root建立一个链接,通过root执行命令
like you open an interactive shell in root name
then only .bashrc will be sourced.
最直接的区别就是su目录还是原先用户的目录
但是su或su - root后目录就变为root用户的主目录了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值