install hugo on ubuntu 1

install hugo on ubuntu

wget -c "https://github.com/$(curl -s "https://github.com/gohugoio/hugo/releases" | grep -Eo "\/gohugoio\/hugo\/releases\/download.*hugo_extended_[0-9]+\.[0-9]+\.[0-9]+_Linux\-64bit\.deb" | head -n 1)" -O "hugo-$(uname -r).deb"; sudo dpkg -i "hugo-$(uname -r).deb"

Here is what the above code is Doing:
1. We’re using the curl command to get the latest release page of Hugo from GitHub.
2. We’re using grep to find the link of the latest release of Hugo for Linux.
3. We’re using head to get the first result from the previous grep command.
4. We’re using wget to download the latest release of Hugo for Linux.
5. We’re using dpkg to install the downloaded package.

Similar Posts