How to install Hugo?
Extract hugo_0.11_linux_amd64.tar.gz
to a directory. In that directory you should find three files:
hugo_0.11_linux_amd64 LICENSE.md README.md
Make sure either hugo
is in your path or provide a path to it. For example, rename the hugo_0.11_linux_amd64
executable file to hugo
. Move the hugo
executable file to /usr/local/bin
.
Run
$ hugo help
Continue to follow the instructions for Using Hugo.
References:
Hugo
Hugo Documentation: Getting Started
The installation page does mention:
Once downloaded it can be run from anywhere. You don’t need to install it into a global location.
Ideally you should install it somewhere in your path for easy use./usr/local/bin
is the most probable location.
As long as:
- you chose the right release for your architecture (linux, Mac or Windows)
- rename the executable to hugo (or make a symlink to it, named hugo)
your
$PATH
(or%PATH%
on Windows) environment variable references the executablehugo
, you can start using it.hugo new site /path/to/site
Old question, but I figured this could help somebody down the road. I'm on Windows
(yes I know this was for Linux
) and was running Hugo outside the created directory where hugo.exe
lives.
Note that the hugo.exe
doesn't have to live in c:\hugo\bin
as per the example below
- Download Hugo (64 or 32-bit) from https://github.com/spf13/hugo/releases
- Create a folder on your
C:\
calledHugo
. - Create another folder inside of
C:\Hugo
calledbin
- Unzip the file downloaded from the HUGO URL into the
bin
folder - Open
cmd.exe
to add the path to HUGO to the windows PATH environment variables. Typeset PATH=%PATH%;C:\Hugo\bin
To verify that hugo is installed globally, under any directory in command prompt type where hugo
and it'll tell you where it is (in our case, c:\hugo\bin\hugo.exe
)
From there you should be able to run your Hugo sites from any repository on your HD.