13

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?

  • 5
    Have you considered Chocolatey? – Darius Jul 29 '15 at 23:40
  • 2
    @Darius obviously he hasn't, but now that you mention it he will have – barlop Jul 30 '15 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 Jul 30 '15 at 0:21
  • Thanks a lot for this suggestion. I haven't searched for Chocolatey. I will look into it. – 343_458 Jul 30 '15 at 0:58
  • 4
    I should point out Windows 10 has this type of functionality built-in. – Ramhound Jul 30 '15 at 1:12
16

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 ]

| improve this answer | |
  • 2
    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 Jul 30 '15 at 0:36
  • 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 Jun 18 '17 at 20:32
  • Can Chocolatey work together with CygWin and/or with apt-get repositories? – Brethlosze Jun 20 '17 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. – NonlinearFruit Jun 20 '17 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. :-( – James M. Lay Jun 7 at 15:49
1

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

| improve this answer | |
  • 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 Jul 7 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.