I recently updated my laptop to Windows 11, and I like it. I write these articles using Hugo, so I’m sharing a couple of ways you can install Hugo on your Windows 11 machine.

Hugo is a static site generator, and it’s my favorite. I use it to build this blog, among many other projects. It’s written in Go. It’s extremely fast and generates static pages with ease. Plus, it works on all three (Windows, Mac, Linux) platforms. I love using it.

Here’s how you can install Hugo on your Windows 11 machine.

I’ve included a hard way and an easy way.

Step 1: Get Go

You’ll need to install Go for Hugo.

Go Download

How to Install Hugo Windows 11

Run the wizard:

How to Install Hugo Windows 11

You can use all the defaults to install it.

How to Install Hugo Windows 11

Now you’re done. Verify your Go installation by opening a terminal and typing

go version

How to Install Hugo Windows 11

Great!

Build from Source (The Hard Way)

First, download MinGW-w64 - for 32 and 64 bit Windows

Then run the installer:

How to Install Hugo Windows 11

Choose the latest version with the architecture that matches your machine (i686 is 32-bit, x86_64 is 64-bit)

How to Install Hugo Windows 11

Click next:

How to Install Hugo Windows 11

Copy this file path. We’ll need it. In my case, it’s

C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin

And it’s installed.

How to Install Hugo Windows 11

Search for “path” and select Edit the system environment variables

How to Install Hugo Windows 11

Select environment variables:

How to Install Hugo Windows 11

And under User variables for [username] select Path and then Edit

How to Install Hugo Windows 11

Click New and add the path to your bin folder in this window.

How to Install Hugo Windows 11

Click Ok to close the three windows.

Open a Command Prompt and type in

gcc -v

and you should see something like this:

How to Install Hugo Windows 11

Now you’re ready to build Hugo!

mkdir src 
cd src

Make sure you have Git for Windows installed.

git clone https://github.com/gohugoio/hugo.git

How to Install Hugo Windows 11

Then cd into the Hugo folder and build it:

cd hugo
go install --tags extended

This build will take a while. Get yourself a glass of water, hydrate, and kick back for a bit.

How to Install Hugo Windows 11

And, you’re good to go!

Now, this is the hard way. However, when you update Hugo, you can quickly go into the Hugo folder, pull the newest version down and build it. This is how I usually how I do it.

Installing the Binary (The Easy Way)

The easiest way to install Hugo in Windows 11 is by using the Binary.

Go to the Hugo Releases page.

Look for the Windows binary for your machine. In my case I use hugo_extended_xxxx_Windows-64bit.zip

How to Install Hugo Windows 11

Save the file and unzip it to C:\Users\jerem\go\bin

How to Install Hugo Windows 11

And that’s it! Now you can run

hugo version

and it’s up and running!

How to Install Hugo Windows 11

This is the easy way. However, if you want to update Hugo, you will have to download and unzip the folder again. It’s mostly a personal preference.

Conclusion

So here are two ways you can install Hugo on your Windows 11 machine. This is for development purposes. Depending on what I’m doing, I use Linux, a Mac, FreeBSD, and Windows, so I like to have a copy of Hugo set up and running on all of them for my various projects. I’m a little weird like that.

But this is an excellent way to set up and develop your blog. If you want to run a blog, you should own it. It should be on your domain and built by you if possible. I use Hugo to build JeremyMorgan.com, and I host it on Netlify. Feel free to hit me up if you have any questions or need help setting something up.

–Jeremy





Learn how to leverage the Standard Library like a PRO. I just created a new course, The Go Standard Library, check it out!
Go Tutorials

Published: Jan 13, 2022 by Jeremy Morgan. Contact me before republishing this content.