Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails: Why "sudo" command is not recognized?

In my application directory (on Windows) I run:

sudo pdfkit --install-wkhtmltopdf

as explained here, but I got this error:

'sudo' is not recognized as an internal or external command, operable program or batch file.

What could be the problem ?

like image 657
Misha Moroshko Avatar asked Mar 03 '11 00:03

Misha Moroshko


People also ask

How do I fix sudo command not found?

4. Fixing the “Command Not Found” Error. The “command not found” error can occur if we have set a custom $PATH to run our scripts. This is because sudo might execute commands with a fresh environment instead of inheriting modified environment variables.

Why is sudo not recognized as an internal or external command?

C:\Users\C2c>sudo pip install pyaudio 'sudo' is not recognized as an internal or external command, operable program or batch file. If you get this error in Windows Command Prompt that because you are trying to run a Unix command on Windows System.

How do I use sudo on Windows?

There is no sudo command in Windows. The nearest equivalent is "run as administrator." You can do this using the runas command with an administrator trust-level, or by right-clicking the program in the UI and choosing "run as administrator."

What is sudo command?

sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.


Video Answer


3 Answers

Sudo is a Unix specific command designed to allow a user to carry out administrative tasks with the appropriate permissions.

Windows does not have (need?) this.

Run the command with the sudo removed from the start.

like image 62
Douglas F Shearer Avatar answered Oct 08 '22 22:10

Douglas F Shearer


sudo is a Unix/Linux command. It's not available in Windows.

like image 31
dnch Avatar answered Oct 08 '22 22:10

dnch


sudo is used for Linux. It looks like you are running this in Windows.

like image 5
skaz Avatar answered Oct 08 '22 21:10

skaz