I ssh into my machine and then, in order to run some commands, I need to
sudo bash first.
In an interactive terminal session, if I do this:
[vagrant@33 ~]$ sudo bash [root@33 vagrant]# which bundle /opt/upnxt/rbenv-0.4.0-7/shims/bundle
things work. But if I need to do this in one line:
[vagrant@33 ~]$ sudo bash -c "whoami; which bundle" root which: no bundle in (/sbin:/bin:/usr/sbin:/usr/bin)
things stop working. Why is this happening and what else do I need to do to the second scenario in order to be able to run it like the first one?