How To Install Hugo On Ubuntu

Download latest *.deb and use dpkg.

There are a few ways to install Hugo on Ubuntu/Linux

  • Snap (too troublesome with dependency and some issues)
  • apt-get (easy, but might not have the latest version)
  • Download and install Hugo package (mights sounds troublesome, but I think it's the most reliable method)

Download Hugo package

Visit Hugo release page to find the latest stable release (look under Downloads).

Use the following command to check your server machine achitecture

uname -i# outputx86_64

Download the latest version for the correct platform and architecture (select .deb file)

wget https://github.com/gohugoio/hugo/releases/download/v0.25.1/hugo_0.25.1_Linux-64bit.deb

Install Hugo package

Install the package with dpkg

sudo dpkg -i hugo*.deb

Check if installation is successful by checking its version

hugo version# outputHugo Static Site Generator v0.25.1 linux/amd64 BuildDate: 2017-07-10T14:58:07+08:00

Install the Pygments Syntax Highlighter

You should install Pygments if you need server-side syntax highlighting of code block in your website.

sudo apt-get install python-pipsudo pip install Pygments

References

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.