Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Hugo?

Tags:

go

hugo

I have downloaded and unzipped the hugo_0.11_linux_amd64.tar.gz file from the releases page, and I cannot figure out how to run the binary. I took a few stabs at using go run, and sh, but no luck. Can anyone offer a few more details?

like image 302
cjohnson318 Avatar asked Aug 31 '14 18:08

cjohnson318


Video Answer


2 Answers

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

like image 141
peterSO Avatar answered Oct 07 '22 06:10

peterSO


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 executable hugo, you can start using it.

    hugo new site /path/to/site
    
like image 4
VonC Avatar answered Oct 07 '22 07:10

VonC