I am only talking about installing and upgrading Hugo on mac in this post. A very important guide is the Hugo’s official tutorial on installing Hugo . Homebrew is the easiest way. I did not use this method simply because my MacOS version is so old that I could not install and upgrade Hugo through Homebrew. If you are like me, you can read on.
I chose the second method, which is called “Tarball” in Hugo’s tutorial . However, the instructions in this tutorial are way more complicated than it should be. That’s why I am writing about it here.
In fact, there are only two steps:
-
Go to the page of official Hugo release where you can find the latest version of Hugo. And then download the file of hugo_0.70.0_macOS-64bit.tar.gz 1.
-
Open Terminal, and type
open -a Finder /usr/local/bin
2. This will open the folder of/usr/local/bin
. Then drag thehugo
file inhugo_0.70.0_macOS-64bit
that you just downloaded and unzipped into the/bin
folder. If you are upgrading, just replace the old one.
If you don’t have /usr/local/bin
, you can first go to /usr/local
and create the bin
folder by yourself.
To make it clearer, this is where you should place the hugo
file:
└── local
└── bin
└── hugo
Last modified on 2021-10-05