MacOS

Installing via Homebrew Package Manager is the most convenient method.

Install Packages with Homebrew on macOS
# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# install hugo
brew install hugo

# verify hugo installation
hugo version
> hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e+extended darwin/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=brew

Windows

Open powershell with Task Manager: Press win + x, navigate to Windows PowerShell (Admin), make sure to select Run as administrator.

Check the execution policy:

Get-ExecutionPolicy

If it shows Restricted, run the following command:

Set-ExecutionPolicy AllSigned

Install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Verify the installation by typing in powershell:

choco
# If you receive a response, the installation is successful

Now, you can install Hugo using Chocolatey! 👇👇👇

Install Packages with Chocolatey on Windows
# install hugo
choco install hugo-extended

# verify hugo installation
hugo version
> hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e...


References