Install Hugo on Ubuntu 20.04 or Ubuntu-based distributions

Hugo is one of the world’s fastest framework for building websites and most popular open-source SSG(static site generators).

It is written in Go language. It accepts data files, configurations, layouts templates, static files, i18n bundles, and content written down in Markdown and renders a static website.

Hugo a Static Site Generator(SSG)

With its amazing speed and flexibility, Hugo makes building websites fun with numerours features.

Some features such as shortcodes support within Markdown, in built SEO, commenting, anayltics, Multilingual & i18n, custom output format like JSON or AMP, unlimited content types and many more capabilities, add feathers to it.

Hugo also supports page caching that will allow browsers to serve content locally without any extra network call by fingerprinting static resources that aren’t expected to change.

Hugo reduces operations overhead by using serverless hosting. It’s also developer friendly that doesn’t require security or framework upgrades or accessing a live production server.

It can be installed via the Snapcraft store as a snap package or with apt.

Installing Hugo as a Snap Package

Canonical manages and distributes the Hugo snap package, the one behind Ubuntu.

Snap packages are secure & easy to upgrade. As Snaps are self-contained software packages. It includes all dependencies needed to run an application.

Open your terminal (Ctrl+Alt+T) and run the below command with sudo privileges

sudo snap install hugo

This command will install the latest stable hugo and other dependencies too. The snap package will automatically update(in the background) whenever a new version of hugo is released.

Install Extended Version

sudo snap install hugo --channel=extended

To switch between the two, use either snap refresh hugo --channel=extended or snap refresh hugo --channel=stable.


Installing Hugo with apt

Hugo deb is already available in the default Ubuntu repositories.

Open your terminal (Ctrl+Alt+T) and run the below command with sudo privileges

sudo apt update && sudo apt install hugo -f

This command will install the latest hugo and other dependencies. It will also fix broken packages.

Hope you find this article helpful!

Keep helping and happy 😄 coding

Avatar

A web geek, an industry experienced web developer & tutor/instructor residing in India 🇮🇳

Next
Previous

Related