Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sudo not found. Trying npm install

I am using a Windows 8.1 laptop. I keep getting sudo not found. Trying npm install with the following command:

F:\Webruin2>sudo npm install -g git
'sudo' is not recognized as an internal or external command,
operable program or batch file.

F:\Webruin2>npm install -g git
[email protected] C:\Users\Dave\AppData\Roaming\npm\node_modules\git
└── [email protected]

F:\Webruin2>git -v
'git' is not recognized as an internal or external command,
operable program or batch file.

F:\Webruin2>npm install -s sudo
[email protected] node_modules\sudo
├── [email protected]
├── [email protected]
└── [email protected] ([email protected])

F:\Webruin2>sudo npm install -g git
'sudo' is not recognized as an internal or external command,
operable program or batch file.

Please let me know the best way to proceed. If this is off topic, please help me get it back on topic. ;)

Tim

like image 516
WebRuin Avatar asked Apr 12 '15 17:04

WebRuin


1 Answers

The 'sudo' command will not be recognized by the Windows command prompt (cmd.exe) because 'sudo' is a Unix/Linux-based application which is only compatible with that particular operating system. Windows does not currently include or support this command.

On a Unix/Linux operating system, 'sudo' is an application used to temporarily gain the security privileges of another user (usually root/administrator), often for the purpose of software or driver installation, and is similar to running the Windows command prompt as administrator.

Based on the outputs you have posted, npm already appears to be installed on your system (as seen by the execution of "npm install -s sudo"), so you should be able to install npm modules with the command "npm install $modulename", with '$modulename' being replaced by the name of the module or library you wish to install.

If you are trying to install Git on your Windows platform, I recommend using the appropriate installer from: http://git-scm.com/download

like image 100
dlindley Avatar answered Oct 07 '22 22:10

dlindley