toamitkumar's Code Blog

Ruby, Rails, RubyMotion, Chef, Puppet, Play and others. Opinions expressed here are my own and do not reflect those of my employer.

Sudo: Cd: Command Not Found

| Comments

Ever tried this:



Weird isn’t it ?
I checked the “/etc/sudoers” and everything looked normal:
toamitkumar   ALL = (ALL) NOPASSWD: ALL
I have sudo access - which means I have access to everything (thats what my understanding was)
Well, I was wrong.

After thinking for a while I felt - ‘cd’ is not a program, it is built-in for bash shell. So, I had to do:

sudo -s or sudo su or sudo bash

and then ‘cd’.

But be careful, that will open a shell for ‘root’ user.

Comments