3
sudo -i返回错误
当我尝试使用root切换到root时sudo -i,出现错误/var/tmp/sclDvf3Vx: line 8: -i: command not found...但是,su -我将继续使用的作品。我绝不是Linux系统管理员,因此环境对我来说仍然很模糊。我想我的问题是: 为什么会引发错误? 这两个命令有什么区别? 你为什么要使用一个? 更新: 我正在使用CentOS版本:CentOS版本6.6(最终版) 这是要求我运行的一些命令的输出,在下面的注释中。 type sudo : sudo is /opt/centos/devtoolset-1.1/root/usr/bin/sudo sudo -V : /var/tmp/sclIU7gkA: line 8: -V: command not found grep'^root:' /etc/passwd : root:x:0:0:root:/root:/bin/bash 更新: 由于我需要C ++ 11支持,因此将它添加到了我的非root用户的〜/ .bashrc中。当我注释掉它后,重新输入ssh,我就可以运行sudo -i了,而且没有任何错误。 if [ "$(gcc -dumpversion)" != "4.7.2" ]; then scl …