Monday, November 10, 2014

Sudo command not found

 

Yep sometimes you'll see sudo command not found error.

The solution is quite easy and straightforward.

1) Open your Unix/Linux console, type the following command:

whereis sudo

2) It will print the current path for the sudo command. Copy that path (excluding /sudo).

3) Now, go to your HOME, for e.g. /home/<username>

4) Open up a hidden file named .profile

5) There is supposed a PATH variable in .profile. And the variable might have some values, which are some other paths there already. Now paste the path that you copied from step 1 at the tail of the other paths.

6) Open a new session of console, now you should be able to run your "sudo" command already.


No comments:

Post a Comment