Ubuntu 20.04
Install Go
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt update
$ sudo apt install golang-go
$ go version
go version go1.20.2 linux/amd64
Install hugo
$ CGO_ENABLED=1 go install --tags extended github.com/gohugoio/hugo@latest
Add go to the path environment variable
Add export PATH=$PATH:$HOME/go/bin
in ~/.bashrc
Check the version
$ hugo version
hugo v0.111.2+extended linux/amd64 BuildDate=unknown
Windows 11
Using winget
- install / check version / upgrade
PS> winget install Hugo.Hugo.Extended
PS> winget search --id Hugo.Hugo.Extended
PS> winget upgrade "Hugo (Extended)"
WSL2 with prebuild binary (optional)
- Download prebuild binary: Hugo on WSL2 (Ubuntu18.04)