Best practices, and Linux analogies (apt, dnf, pacman, zypper).
Actions: install / upgrade / downgrade / pin
How repositories and their security work
To test: in a safe environment: PowerShell scripts
On Linux, using package managers like apt, dnf, zypper or pacman has become second nature for installing, updating and managing software. On Windows, the convenience of launching executables (.exe, .msi) with a simple click was a relief for users.
Today, SafeITExperts reveals: Windows also has command-line tools: winget, Chocolatey and Scoop. Let's explore them together.
On Linux, package managers are central:
| Distribution | Tool | Command Examples |
|---|---|---|
| Debian / Ubuntu | apt | apt update, apt install, apt upgrade, apt remove |
| Fedora / RHEL | dnf | dnf install, dnf upgrade, dnf downgrade |
| Arch | pacman | pacman -S, pacman -Syu, pacman -Rns |
| openSUSE | zypper | zypper refresh, zypper install, zypper update |
Windows bridges the gap with winget (official), Chocolatey (DevOps veteran) and Scoop (minimalist, no admin). π―
On Windows, we don't type sudo. System actions trigger UAC (User Account Control):
winget/choco may require elevated sessions for "machine-wide" installations. Scoop works by default without admin (in user profile), but can also install globally with admin.
# Check & relax for current user
Get-ExecutionPolicy
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Windows Subsystem for Linux (WSL) was created by Microsoft and introduced in 2016 to bring Windows and Linux closer together. WSL allows running a full GNU/Linux distribution (Ubuntu, Debian, Fedora, openSUSE, Kaliβ¦) directly on Windows, without heavy virtual machines or dual-boot.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
wsl --install -d Ubuntu
wsl --list --online
wsl --list --verbose
# With winget
winget install --id Microsoft.WSL -e --source winget
wsl --install
# With Chocolatey
choco install wsl -y
wsl --install
# With Scoop (after Scoop installation)
scoop install sudo
sudo dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
sudo dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --install
# Open Windows Terminal, activate Copilot (Win + C), and say:
"Install and configure WSL 2 with Ubuntu"
# Copilot will execute necessary commands
wsl --list --verbose
wsl --set-version <distro> 2
wsl --terminate <distro>
ls /mnt/c/Users
cmd.exe /c dir C:\
wsl uname -r
sudo apt update && sudo apt upgrade
sudo apt install <package>
sudo apt install <package>=<version>
winget is the official Windows package manager (Windows Package Manager), introduced by Microsoft. It allows installing, updating, configuring and uninstalling software directly from command line, similar to apt on Linux or brew on macOS.
winget --version
winget search vscode
winget search --id Microsoft.VisualStudioCode -e
winget show Microsoft.VisualStudioCode
winget install --id Microsoft.VisualStudioCode -e
winget install --id Microsoft.VisualStudioCode -e --version 1.80.0
winget install --id Microsoft.VisualStudioCode --scope user
winget install --id Microsoft.VisualStudioCode --silent
winget install --id Microsoft.VisualStudioCode --override "/VERYSILENT /NORESTART"
winget install --id 9NBLGGH4NNS1 --source msstore
winget upgrade
winget upgrade <name>
winget upgrade --all
winget upgrade --include-unknown
winget list
winget uninstall --id Microsoft.VisualStudioCode -e
winget export -o apps.json --include-versions
winget import -i apps.json
winget pin add --id Microsoft.VisualStudioCode --version 1.80.*
winget pin list
winget pin remove --id Microsoft.VisualStudioCode
winget source list
winget source update
winget source reset
winget settings
winget features
Chocolatey is one of the oldest Windows package managers (2011). Inspired by apt-get, automation/DevOps oriented, and widely used in enterprise environments.
Set-ExecutionPolicy Bypass -Scope Process -Force
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
iex ((New-Object Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco --version
choco search vscode
choco list --localonly
choco outdated
choco install vscode -y
choco install vscode --version=1.80.0 -y
choco install nodejs-lts --pre -y
choco upgrade vscode -y
choco upgrade all -y
choco uninstall vscode -y
choco install vscode --version=1.79.0 -y
choco pin add -n=vscode -v=1.79.0
choco pin list
choco pin remove -n=vscode
β Advantage: supports downgrade (rollback possible if version available).
choco source list
choco source add -n=myfeed -s "https://my.nexus/nuget/choco"
choco source disable -n=chocolatey
choco config get cacheLocation
choco config set cacheLocation "D:\ChocoCache"
choco feature list
choco feature enable -n=allowGlobalConfirmation
choco clean -y
choco upgrade all --noop
Scoop was created by Luke Sampson in 2013. It adopts a minimalist philosophy, close to the brew experience on macOS. Everything is installed in the user folder without requiring administrator rights.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
iwr -useb get.scoop.sh | iex
scoop --version
scoop bucket list
scoop bucket known
scoop bucket add extras
scoop bucket add versions
scoop bucket rm extras
scoop search vscode
scoop info vscode
scoop list
scoop install vscode
scoop install vscode@1.80.0
scoop install -g 7zip
scoop update
scoop update vscode
scoop update *
scoop status
scoop reset vscode@1.79.0
scoop hold vscode
scoop unhold vscode
scoop cleanup vscode
scoop cleanup *
scoop checkup
scoop cache show
scoop cache rm *
scoop which code
scoop install aria2
scoop config aria2-enabled true
Windows Copilot, integrated in Windows 11, revolutionizes CLI tool usage by acting as an intelligent voice and text assistant. It translates your natural language requests into precise PowerShell commands to interact with winget, Chocolatey and Scoop.
# Install Docker with Winget silently
"Copilot, install Docker with winget without confirmation"
β winget install Docker.DockerDesktop --silent
# Migrate my Chocolatey apps to Winget
"Copilot, migrate my Chocolatey apps to winget"
β Automatic migration script
# Diagnose an installation error
"Copilot, why did Node.js installation fail?"
β Log analysis and fix suggestions
Copilot generates scripts combining multiple tools:
# Multi-tool batch installation
"Copilot, install Git, Python and VS Code with the optimal tool"
β winget install Git.Git Python.Python Microsoft.VisualStudioCode
# Cross-tools cleanup
"Copilot, clean unused packages on all managers"
β scoop cleanup * & choco remove --all-versions & winget uninstall --orphaned
# Custom script
"Copilot, create a script that installs Java, clones my repo and runs the build"
β Generation of a complete PowerShell script
| Tool | What Copilot Can Do |
|---|---|
| Winget | Silent installations, version management, export/import configurations |
| Chocolatey | Migration between versions, package creation, private repository management |
| Scoop | Bucket management, admin-free installations, multi-versions |
| WSL | Translation of Linux commands (apt β winget, etc.) |
| Terminal | Automatic profile configuration and dedicated tabs |
# Compare installation performance
"Copilot, which tool is fastest to install 20 apps?"
β Benchmark winget vs choco vs scoop
# Secure an installation
"Copilot, check if this Scoop script is safe before execution"
β Potential risk analysis
# Complex dependency management
"Copilot, install Node.js with npm and configure PATH"
β Installation + environment configuration
| Criterion | winget | Chocolatey | Scoop |
|---|---|---|---|
| Origin | Microsoft (official) | Community + enterprise offering | Community |
| Repositories | winget + msstore + private | community + private (NuGet) | Git buckets (main, extras, β¦) + private |
| Security | Manifest + SHA256, Signed Store | Review + checksums (scripts) | SHA256, depends on buckets |
| Admin Rights | Often required (machine-wide) | Recommended (global) | No by default (user), -g for global |
| Downgrade | Via --version if available | Yes (--version) | Yes (@version / reset) |
| Ideal for | Windows users & Store integration | Enterprise, CI/CD, DevOps | Devs & power-users, user sandbox |
| Aspect | Linux (apt/dnf/pacman/zypper) | winget | Chocolatey | Scoop |
|---|---|---|---|---|
| Package Origin | Official distro repos (signed builds) | Publisher installers referenced via manifests; also Microsoft Store | Community packages (scripts) + enterprise (private repos) | Community buckets (Git) + private buckets |
| Verification | GPG/RPM signatures; trust chains | SHA256 hash in manifests; CI validation; signed Store apps | Review + recommended checksums; scripts may call external URLs | SHA256 in manifests; depends on bucket maintainer |
| Sandbox/Integration | Strong integration with package system | Uses native Windows installers (MSI/EXE/MSIX) | Install scripts (PowerShell/MSI/EXE) | Archives/zip and shim; isolated in user profile |
| Downgrade | Often natively supported | Possible if versions available (no dedicated command) | Yes, simple via --version | Yes, via @version/reset |
| Admin Rights | sudo with password | Often required for machine-wide (UAC) | Elevated recommended for global | No by default; -g = admin |
| Task | Linux | winget | choco | scoop |
|---|---|---|---|---|
| Update Index | apt update / zypper refresh | winget source update | β | scoop update |
| View Updates | apt list --upgradable | winget upgrade | choco outdated | scoop status |
| Update All | apt upgrade / pacman -Syu | winget upgrade --all | choco upgrade all -y | scoop update * |
| List Installed | dpkg -l, dnf list installed | winget list | choco list --localonly | scoop list |
| Install | apt install pkg | winget install --id <ID> -e | choco install pkg -y | scoop install app |
| Specific Version | apt install pkg=ver | --version if available | --version | @version |
| Downgrade | dnf downgrade | depends on versions | yes | yes |
| Uninstall | apt remove | winget uninstall | choco uninstall | scoop uninstall |
| Lock Version | apt-mark hold | winget pin add | choco pin add | scoop hold |
| Linux Environment | Native | wsl --install then manage via apt/dnf | ||
winget export -o apps.json --include-versions
scoop install aria2
scoop config aria2-enabled true
choco upgrade all --noop
Is a password required to use these commands?
Not in command line. If an action requires admin rights, Windows displays a UAC prompt: you confirm (admin session) or enter admin credentials if you're in a standard account.
Can I do everything from CMD?
Yes for winget and choco. Scoop mainly targets PowerShell. Windows Terminal is the most comfortable.
Is this as "secure" as Linux?
The model is different. Linux compiles and signs packages within official repositories. On Windows, these tools orchestrate publisher installers; security relies on manifests, hashes, publisher signatures (Store) and your policies (private repos in enterprise).
Can I use multiple managers on the same machine?
Yes, it's possible and sometimes recommended. For example: winget for main applications, Scoop for dev tools without admin rights. Just avoid installing the same software via multiple managers.
How to verify package integrity before installation?
- Winget: uses SHA256 hashes in official manifests
- Chocolatey: ensure package has valid checksums (avoid --allow-empty-checksums)
- Scoop: manifests include SHA256 hashes for each downloaded file
What's the best solution for deployment automation?
Chocolatey is best suited for enterprise environments with private repositories, approval features and SCCM/Intune integration. Winget is also becoming a strong option with its export/import features.
Does WSL replace Windows package managers?
No, WSL is complementary. It allows running complete Linux environments (with apt, dnf, etc.) while winget/choco/scoop manage Windows applications. You can use both together.
For a "classic" Windows user, start with winget.
For machine fleets and DevOps, Chocolatey shines.
For devs/power-users, Scoop and WSL are essential.
For everyone, Copilot transforms your CLI experience.