0

I want to install a game in Windows using Cygwin. When trying to use the sudo command, I receive the following error:

-bash:sudo:command not found

I get a similar error when trying to use command add-apt-repository:

unable to start "add-apt-repository" this specified file was not found

Why are these commands not recognized?

3
  • apt-get is Debian specific and afaik Cygwin uses it's own repos. Also install sudo via Cygwin installer. Be warned that what you want might not work, you definitely need to recompile the program you want to execute if it hasn't been already compiled for cygwin.
    – ljrk
    Apr 4, 2016 at 14:21
  • 2
    Possible duplicate of There's no 'sudo' command in Cygwin
    – DavidPostill
    Apr 4, 2016 at 16:26
  • The cygin package manager is apt-cyg
    – DavidPostill
    Apr 4, 2016 at 16:27

2 Answers 2

2

You may have misunderstood what Cygwin is useful for. From their website:

Cygwin is not: a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.

Packages like sudo do not exist in Cygwin. You can find available packages here.

They also have a detailed FAQ that plainly describes what it is, how it can be used, and so on.

0

I think I tried steps below after doing some research & succeeded (on Windows)

  1. Install scoop using powershell 3
    iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

  2. Do scoop install --global sudo

  3. Make sure paths (C:\Users\<username>\scoop\shims & C:\ProgramData\scoop\shims) added in environmental path variable.
1
  • I don’t see how this is related to the question...? It’s about Cygwin, not PowerShell or CMD.
    – Daniel B
    Jul 9, 2017 at 18:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .