26

I want to install many packages on Windows and I want to write an executable script to install these packages from Windows repo. How can I write Ubuntu-like sudo apt-get install <name> command?

8
  • 5
    Have you considered Chocolatey?
    – Darius
    Commented Jul 29, 2015 at 23:40
  • 2
    @Darius obviously he hasn't, but now that you mention it he will have
    – barlop
    Commented Jul 30, 2015 at 0:18
  • 2
    The program the developer childishly called "chocolatey nugget", or chocolatey for short, is a package manager , like an apt-get but for windows. It got its name 'cos the developer based it off of NuGet which is a package manager for visual studio, and that sounds like nugget (as in chicken nugget), so he thought he'd be "funny" or "clever" and call his program Chocolatey NuGet . I heard that on a podcast that interviewed him. It doesn't have anywhere near as many programs as apt-get
    – barlop
    Commented Jul 30, 2015 at 0:21
  • 4
    I should point out Windows 10 has this type of functionality built-in.
    – Ramhound
    Commented Jul 30, 2015 at 1:12
  • 1
    I can only assume that @Ramhound means using WSL and a Debian based distro.. but I am not SURE that's what he means. Commented Dec 27, 2019 at 18:10

3 Answers 3

22

Chocolatey


Chocolately is a package manager for Windows that works like apt-get. For example, choco install git. It has a wide variety of programs to choose from including Notepad++, Sublime Text, Chrome, 7zip, and others.

To sweeten the deal, they have a copy-paste command available here that will download and install Chocolatey, easy as pie.

The perfect icing for this chocolatey cake is Cmder. Cmder is a command line emulator that comes packaged with all of those Unix commands that you've come to know and love.

Chocolatey Packages Screenshot

[ Disclaimer : Chocolatey's repository of packages isn't nearly as extensive as apt-get's ]

5
  • 4
    having a larger repo than any others, err but you should point out that there are hardly any others and the others have really miniscule repositories. Like saying it's ahead of the race and not mentioning that the others in the race are a few disabled people.
    – barlop
    Commented Jul 30, 2015 at 0:36
  • 1
    Did it through the cmd.exe command: @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
    – Brethlosze
    Commented Jun 18, 2017 at 20:32
  • Can Chocolatey work together with CygWin and/or with apt-get repositories?
    – Brethlosze
    Commented Jun 20, 2017 at 18:11
  • @hyprfrco You can install Cygwin: choco install cygwin. I don't believe you can use it for apt repos but this might be a work around alternative to Chocolatey. Commented Jun 20, 2017 at 18:48
  • 1
    Apt-get is more than just a repo for programs you can use. It's also a library repository for software development. Unfortunately, you can't choco install libsdl2-dev. :-( Commented Jun 7, 2020 at 15:49
6

Microsoft is actually creating their own app , albeit open source. It is called winget and you need to be part of the Windows Insider's program:

https://docs.microsoft.com/en-us/windows/package-manager/winget/

Which is supposed to be loosely based on Appget: https://appget.net/

https://medium.com/@keivan/the-day-appget-died-e9a5c96c8b22

1
  • 1
    Also you can install the Windows Subsystem for Linux in Windows 10 (Windows Features) and from there install either Ubuntu 18.04 or 20.04 from the Windows store. Not the UI but just basic terminal which includes access to a large selection of CLI tools and libraries.
    – D4rXiD3
    Commented Jul 7, 2020 at 22:26
4

The three main contenders at the moment are:

You must log in to answer this question.

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