If you’re running Debian or Ubuntu on your VPS, you can actually easily install Hugo via:
sudo apt install hugo
However, the version you can get from the repository is so old. Mine’s around version 0.80 I think.
If you want the latest version of Hugo installed, you need to get it from github. As of this writing, the latest version is v0.117.0. Thus, you can run:
wget https://github.com/gohugoio/hugo/releases/download/v0.117.0/hugo_extended_0.117.0_linux-amd64.deb
sudo dpkg -i hugo_extended_0.117.0_linux-amd64.deb
By default, using the above method, hugo is saved under /usr/local/bin
. You can verify that by running which hugo
command. But this needs to be copied to the /usr/bin
folder. Thus, run:
sudo cp /usr/local/bin/hugo /usr/bin/
You can double check if indeed you have the latest version by running:
hugo version
Redo all the installation instructions above including the sudo cp /usr/local/bin/hugo /usr/bin/
command.