How to Install Hugo on Windows 11

Know the 3 ways to install Hugo on Windows 11 and then choose the easiest.

Hugo is a static site generator that can be installed on a Linux, Windows, macOS, and even OpenBSD & FreeBSD machine. Here, in this tutorial, we’ll see how to install Hugo on Windows 11 machine.

Hugo is a modern SSG (static site generator) written in the Go programming language. It’s lightning-fast and aims to make website creation fun again. In comparison, it has a faster build speed than Gatsby or Jekyll and has better stability than Gatsby.

Installing Hugo on Windows 11

Anyways, let’s see how we can install Hugo on a Windows 11 computer:

Installing Hugo on Windows 11

There are 3 ways to install Hugo SSG on your Windows 11 machine:

  1. Using Chocolatey package manager
  2. Using Scoop package manager
  3. Using Hugo executable (recommended)

Let’s see all of these 3 ways one-by-one:

1. Using Chocolatey package manager

If you use the Chocolatey package manager on your Windows 11 machine, Hugo can be installed just by running this one-liner command:

choco install hugo -confirm

Just copy-paste the above command in the Windows Terminal and within a few minutes, Hugo will be installed on your system.

2. Using Scoop package manager

Much like the previous way, if you’re using Scoop package manager on your Windows 11 machine, Hugo can be installed with the following command:

scoop install hugo

Just copy and paste the command in the Windows Terminal and within a few minutes, the latest version of Hugo will be installed on your system.

3. Using Hugo executable (recommended)

I think it’s the most efficient way to go with. You just have to follow these few steps:

  • Download the Hugo executable for Windows from Hugo releases (32-bit or 64-bit depending upon your system) which will be a zipped file
  • Open the Windows 11 Flie Explorer and create a new folder C:\Hugo and a new sub-folder C:\Hugo\bin
  • Extract the zipped file that you downloaded to the C:\Hugo\bin folder (there should be 3 files in the C:\Hugo\bin folder: hugo.exe, LICENSE, and README.md)
  • Add Hugo to your Windows 11 PATH settings (see how to do below), and you’re done

And, here are instructions to add Hugo to the PATH settings:

#1. Open Windows Search and search for the “Edit the system environment variables” app, click on it to open 👇

Open-Edit-the-system-environment-variables-app-on-Windows-11

#2. Click on the Environment Variables button 👇

Click on Environment variables in System Properties

#3. Select the row that starts with Path in User variables for <your-user-name> (in my case, the username is deepak) section, and click on the Edit button 👇

Edit the PATH environment variable

#4. Click on the New button and add the Path to the hugo.exe file which would be C:\Hugo\bin in our case 👇

Add a new Environment Variable in the list

#5. Click the Ok button on all the open windows to exit, and you’re done ✅

To test the installation, open a new Windows Terminal window and run the following command:

hugo version

And if it shows the version of Hugo, the installation has now been successfully completed and you can now start developing your Hugo static site.

If you’re having any difficulty following, here’s a video by Mike Dane explaining how to install Hugo on Windows 11 step-by-step.

Also, please note that the Hugo binary can be run from anywhere. You don’t need to install it in a global location but it’s recommended to install it somewhere on the C-drive.

If you have trouble installing it on your system, check out the official Hugo documentation for more information.

And, if you have any related queries, feel free to let us know in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *