Installing Hugo in Windows 11
Last Update: Jun 7, 2024
I wrote a book! Check out A Quick Guide to Coding with AI.
Become a super programmer!
Learn how to use Generative AI coding tools as a force multiplier for your career.
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.
Run the wizard:
You can use all the defaults to install it.
Now you’re done. Verify your Go installation by opening a terminal and typing
go version
Great!
Build from Source (The Hard Way)
First, download MinGW-w64 - for 32 and 64 bit Windows
Then run the installer:
Choose the latest version with the architecture that matches your machine (i686 is 32-bit, x86_64 is 64-bit)
Click next:
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.
Search for “path” and select Edit the system environment variables
Select environment variables:
And under User variables for [username]
select Path
and then Edit
Click New
and add the path to your bin folder in this window.
Click Ok to close the three windows.
Open a Command Prompt and type in
gcc -v
and you should see something like this:
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
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.
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
Save the file and unzip it to C:\Users\jerem\go\bin
And that’s it! Now you can run
hugo version
and it’s up and running!
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
Want to become an expert Go programmer?
You can boost your skills in a few weekends by taking these high quality Go courses taught by top experts!
We have over 30 hours of Go courses you can take now! You can try it for 10 days free of charge.