A new native package manager, WinGet (Windows Package Manager), appeared in Windows 10. You can use it to install apps from the command prompt (like Linux package managers do, for example yum, dnf, apt, etc.).
WinGet.exe is a console tool making app installation easier on a computer running Windows (like Chocolatey package manager). To install a program, you don’t need to look for its distribution, download it, run the installation wizard and click Next dozens of times. Using Windows Package Manager, you can install an app by running a single command.
WinGet repository is currently maintained by Microsoft, but there is an option of connecting third-party repositories as well. The WinGet source code is available on GitHub.
How to Install WinGet Package Manager on Windows 10?
You can install WinGet in Windows 10 in build 1709 or newer. Microsoft promises that WinGet will be integrated into the next Windows 10 builds.
You can install WinGet from the Microsoft Store (it is called App Installer there):
Invoke-WebRequest -Uri "https://github.com/microsoft/winget-cli/releases/download/v-0.2.10191-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle" -OutFile "C:\PS\WinGet.appxbundle"
Check the installed winget version using this command:
Here are the basic winget commands:
winget install <package>—install a package
winget show <package>— display the package info
winget source <options>— manage repositories
winget search <search_string>— search for packages in repositories
winget hash <package>— get a package installer hash
winget validate <package>— to validate a manifest file
The last two commands are mostly used to publish apps in the repository.
How to Install Software Using WinGet?
Prior to installing an application via WinGet, you need to find out the package name. To search packages, the search command is used. For example, to search zip archive managers in the repository, run this command:
winget search zip
The command returns the list of packages (with their names and versions) matching your query.
You can get information about the specific package:
winget show 7zip.7zip
For example, you want to install 7zip. Copy its name or ID and run the following installation command:
winget install 7zip.7zip
As you can see, the package manager has automatically downloaded and installed the app using a single command. The program has appeared in the list of installed software in Start menu.
Then let’s install Windows Terminal and VSCode to write PowerShell scripts, for example.
Search the package names first:
winget search terminal
winget search "visual studio"
Then install them in turn:
winget install Microsoft.WindowsTerminal –e ; winget install Microsoft.VisualStudioCode –e
If you want to run the package installation in the background, use the –silent option:
winget install "VLC media player" --silent
As you can see, WinGet makes software installation easier. Most popular Windows apps are available in the repository. To install an app, it is enough to run only one command. WinGet is still in development, it lacks a number of useful functions (including a package update option), but I think it will become a full-featured package management tool in Windows within a year.