Skip to content

Instantly share code, notes, and snippets.

@vishalvivekm
Last active November 27, 2023 20:37
Show Gist options
  • Save vishalvivekm/bc3b07e23c76b1c40891afafc9f389f2 to your computer and use it in GitHub Desktop.
Save vishalvivekm/bc3b07e23c76b1c40891afafc9f389f2 to your computer and use it in GitHub Desktop.
How to install go and hugo
how to install golang on linux
Get go releases from here https://go.dev/dl/
1. download the latest release : wget https://go.dev/dl/go1.21.4.linux-amd64.tar.gz
2. sudo tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz
3. export PATH=$PATH:/usr/local/go/bin
4. $ go version
> go version go1.21.4 linux/amd64
for installing .deb packages
sudo dpkg i packageName.deb
for listing a particular package
sudo dpkg -l hugo
> ||/ Name Version Architecture Description
+++-==============-============-============-=======================================
ii hugo 0.120.4 amd64 Build, archive and release Go programs.
note: ii in the first column of the output - that means 'installed ok installed,
to remove the package itself (without the configuration files), you'll have to run:
$ dpkg -r <packageName>
for purging a package
sudo dpkh -P package
installing hugo
get releases, ( extended ones: support scss)
1. wget https://github.com/gohugoio/hugo/releases/download/v0.120.4/hugo_extended_0.120.4_linux-amd64.deb
2. sudo dpkg -i hugo_extended_0.120.4_linux-amd64.deb
3. check hugo version
to delete (purge) the package completely (with configuration files):
$ dpkg -P urserver
to check if the package has been removed successfully:
$ dpkg -l urserver
If the package has been removed without configuration files, you'll see the rc status near the package name, otherwise, if you have purged the package completely, the output will be empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment