In Terminal:

Mac OS X: $ brew install hugo

Ubuntu: $ sudo apt install hugo

Verify Installation:

$ hugo version 
Hugo Static Site Generator v0.75.1/extended darwin/amd64 BuildDate: unknown 

| — | — | | | query version | | | you should get something like this |

Version should at least v0.75.0, on Ubuntu the version can be outdated, download later version of hugo from:

https://github.com/gohugoio/hugo/releases

For Ubuntu, download the “hugo_extended_x.xx.x_Linux-64bit.deb”, for example, to install Hugo version 0.77.0:

$ wget https://github.com/gohugoio/hugo/releases/download/v0.77.0/hugo_extended_0.77.0_Linux-64bit.deb

$ sudo dpkg -i hugo_extended_0.77.0_Linux-64bit.deb