How-To
Installing Windows Software from the Command Line Using WinGet
Linux has spoiled me over the last 26 years concerning installing applications, as it has had a command-line package installation program (apt-get) since 1999. Apt-get made it incredibly easy to upgrade, install, and list the programs on your system with a single command. For example, you only need to enter apt-get upgrade on the command line to upgrade all the packages currently installed on your system. Likewise, it makes it easy to try new software as you only need to enter apt-get install vim to install the Vim command-line editor. This makes it incredibly easy to maintain the software on a Linux system.
Unfortunately, Microsoft didn't have a similar tool until 23 years later, when they released WinGet in late 2021. To be sure, many third-party companies tried to make a package manager for Windows, but without Microsoft's support, they never really gained widespread acceptance. That is not to say that there aren't some good ones out there; it's just that they never caught on.
In this article, I will tell you why I love WinGet and show you how easy it is to use.
Why I Love WinGet
The WinGet command has radically changed how I install, update, and manage applications on my Windows systems. Before discovering it, I had to search for, download, and install applications manually. Now, I can install, update, list, and uninstall applications from the command line. WinGet's central software repository not only hosts Microsoft applications but third-party ones as well. Furthermore, Microsoft ensures that users obtain applications directly from trusted sources.
Using WinGet Is Intuitive and Easy to Use
WinGet's design emphasizes simplicity, making it incredibly easy to learn and use. Below are a few examples of its usage.
To list the packages on your system, open a terminal and enter winget list.
[Click on image for larger view.]
As seen above, you need to accept a "terms of transaction" before it will list all the applications that it knows about on your system.
[Click on image for larger view.]
To search for a new application, even a third party one, enter winget search <product name>.
[Click on image for larger view.]
It lists all the applications it knows about that are either named or tagged with the search term.
To get detailed information about a specified application, enter winget show <package name>.
[Click on image for larger view.]
The show command provides very detailed information about the package, including the publisher, description, and even the publisher's website.
To install an application, enter winget install <product name>.
Once an application is installed, it can be upgraded to its latest release by entering enter winget search <product name>.
[Click on image for larger view.]
Going Further with WinGet Commands
WinGet has many options and parameters to refine the installation and management process.
You can specify a specific version of an application: winget install --id handbrake --version 1.8.0.
If you want to install an application without any user interaction: winget install --id handbrake --version 1.8.0--silent.
One of the greatest things about apt-get is that it can install the dependencies along with the main application: winget install --id handbrake --include-optional.
WinGet vs. Chocolatey
As mentioned above, some third-party package managers are available for Windows, the most popular being Chocolatey, which was first released in 2011. So, I thought that it would be interesting to see how this long-time staple compares to MS's new offering.
With its 13-year time advantage, Chocolatey offers a larger repository with thousands of packages, including niche developer tools. While WinGet's repository is growing, it still can't match it. Chocolatey is well-loved by its users, has a well-established community, and offers free and paid tiers with advanced features. In contrast, WinGet, supported by Microsoft, integrates seamlessly with the Windows ecosystem but lacks some community-driven packages. Chocolatey uses custom scripts for more flexible installations, while WinGet relies on the software publisher's installer, offering a more straightforward but less customizable installation process.
Final Thoughts on WinGet
I am so thankful that I stumbled on WinGet a couple of months ago, as I have waited decades for a package manager for Windows like I have been using for Linux. Over the months that I have used it, I have found it to be a powerful tool that simplifies software management on Windows systems. By using it, I can streamline workflows, enhance security, and gain greater control over the applications and software on my system. I look forward to it maturing and evolving. WinGet should become an indispensable tool for individual users and system administrators alike.
This article provided a general overview of WinGet. You can run winget -help or winget -info for command-line help or visit help command (winget) for more information.
About the Author
Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He previously worked as a Technical Marketing Manager for ControlUp. He also previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.