New machine setup

Run a command as administrator (sudo on Windows)

Windows 11 now has sudo. Switch it on, or open an administrator PowerShell instead.

Fill these in once

macOS already has sudo: put it in front of a command, for example sudo softwareupdate --list.

Linux already has sudo: put it in front of a command, for example sudo apt update.

  1. Switch on sudo (once)Run as administrator
    PowerShell
    sudo config --enable normal

    Run this in an administrator window, or turn it on in Settings, System, For developers. Needs Windows 11 24H2 or newer.

  2. Then run any command as admin
    PowerShell
    sudo winget upgrade --all
  3. Or open a whole administrator PowerShell
    PowerShell
    Start-Process powershell -Verb RunAs