{"id":535,"date":"2023-08-06T10:11:38","date_gmt":"2023-08-06T10:11:38","guid":{"rendered":"http:\/\/192.168.0.142\/?p=535"},"modified":"2023-08-08T06:12:48","modified_gmt":"2023-08-08T06:12:48","slug":"go-installation-on-ubuntu-22-04","status":"publish","type":"post","link":"http:\/\/192.168.0.142\/go-installation-on-ubuntu-22-04\/","title":{"rendered":"Go Installation on Ubuntu 22.04"},"content":{"rendered":"\n
Update package index files<\/strong><\/p>\n\n\n\n Download package<\/strong><\/p>\n\n\n\n Remove any previous Go installation<\/strong> by deleting the \/usr\/local\/go folder (if it exists), then extract the archive you just downloaded into \/usr\/local, creating a fresh Go tree in \/usr\/local\/go:<\/p>\n\n\n\n Add \/usr\/local\/go\/bin to the PATH environment variable<\/strong><\/p>\n\n\n\n Add below line to the end of file<\/strong><\/p>\n\n\n\n <\/p>\n\n\n\n Check the go version<\/strong><\/p>\n\n\n\n Terminal output for reference<\/strong><\/p>\n\n\n\n Update package index files Download package Remove any previous Go installation by deleting the \/usr\/local\/go folder (if it exists), then extract the archive you just downloaded into \/usr\/local, creating a fresh Go tree in \/usr\/local\/go: Add \/usr\/local\/go\/bin to the PATH environment variable Add below line to the end of file Check the go version Terminal output for reference<\/p>\n","protected":false},"author":1,"featured_media":550,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[57,12],"_links":{"self":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/535"}],"collection":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/comments?post=535"}],"version-history":[{"count":10,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/535\/revisions"}],"predecessor-version":[{"id":589,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/535\/revisions\/589"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/media\/550"}],"wp:attachment":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/media?parent=535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/categories?post=535"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/tags?post=535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}sudo apt update<\/code><\/pre>\n\n\n\n
wget https:\/\/go.dev\/dl\/go1.20.7.linux-amd64.tar.gz<\/code><\/pre>\n\n\n\n
sudo rm -rf \/usr\/local\/go && sudo tar -C \/usr\/local -xzf go1.20.7.linux-amd64.tar.gz<\/code><\/pre>\n\n\n\n
nano ~\/.profile<\/code><\/pre>\n\n\n\n
export PATH=$PATH:\/usr\/local\/go\/bin<\/code><\/pre>\n\n\n\n
source ~\/.profile <\/code><\/pre>\n\n\n\n
go version<\/code><\/pre>\n\n\n\n
$ go version\ngo version go1.20.7 linux\/amd64<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"