When I try to switch to root using
sudo -i i get the error
/var/tmp/sclDvf3Vx: line 8: -i: command not found... However,
su - works which I will continue to use. I'm by no means a linux system administrator so the environment is still pretty foggy to me. I guess my questions are:
- Why is the error being thrown?
- What's the difference between the two commands?
- Why would you use one over the other?
I'm using CentOS version: CentOS release 6.6 (Final)
Here's the output from some commands I was asked to run, in the comments below.
sudo is /opt/centos/devtoolset-1.1/root/usr/bin/sudo
/var/tmp/sclIU7gkA: line 8: -V: command not found
This was added to my non-root user's ~/.bashrc a while back because i needed C++11 support. When I comment it out, re-ssh in, I can run sudo -i just fine without any errors.
if [ "$(gcc -dumpversion)" != "4.7.2" ]; then scl enable devtoolset-1.1 bash fi