Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sudo command not found on Cygwin

I am currently trying to install and update a few packages on a Windows OS. The only matter is that I am using Cygwin in order to type the commands through a terminal (as I'm aware, I can type in Linux type commands such as cd, ls etc. on Cygwin - I may be wrong). However, when I try to install a package like:

sudo apt-get install paparazzi-dev  

I get the reply:

-sh: sudo: command not found. 

Does anyone have an idea as to how I can fix this problem?

like image 928
Adam Avatar asked Mar 20 '14 08:03

Adam


People also ask

How do I get the sudo command in cygwin?

In Cygwin itself I believe you can run a root command with su -c /the/cmd as for sudo itself within Windows™ file-system elevating the user's permissions from the command line, If you are an administrator, this will work great for you. Otherwise, use runas and get admin's pass ;).

How do I fix sudo command not found?

Step 1: Install the 'sudo' command To achieve this, log in or switch to root user and use the APT package manager to update the system package list. Then install sudo as shown. When prompted to continue. hit 'Y' to proceed.

Does cygwin have sudo?

Sudo for Cygwin This tool emulates Unix sudo in cygwin. It allows you to run applications in elevated user mode from a non-elevated cygwin shell. It is based on nu774's tool and has full terminal support, so you can run interactive applications like vim or a shell through it.


2 Answers

Run cygwin as administrator.. then you wouldn't need any sudo command.

like image 77
Aimal Avatar answered Sep 16 '22 15:09

Aimal


Cygwin is not a full Linux distribution. Therefore you don't have sudo or the Debian/Ubuntu package manager apt-get. There is a number of packages available from the Cygwin repository: http://cygwin.com/packages/ You have to chose these packages during setup.

like image 39
Caleb Avatar answered Sep 17 '22 15:09

Caleb