{"id":2949,"date":"2022-09-08T09:42:06","date_gmt":"2022-09-08T09:42:06","guid":{"rendered":"https:\/\/www.checkmateq.com\/blog\/?p=2949"},"modified":"2023-08-04T16:07:20","modified_gmt":"2023-08-04T16:07:20","slug":"install-golang","status":"publish","type":"post","link":"https:\/\/www.checkmateq.com\/blog\/install-golang","title":{"rendered":"How to install Golang in Linux and Windows"},"content":{"rendered":"<p><strong><a href=\"https:\/\/www.checkmateq.com\/golang-development\">Golang<\/a> or Go programming language <\/strong>is an <strong>open-source programming language<\/strong> supported by <strong>Google<\/strong>. Go is clear, simple, expressive, and productive. Its innovative type system enables flexible and modular program creation, and its <strong>concurrency techniques<\/strong> make it simple to write programs that take full advantage of multicore and networked devices. Go swiftly converts to machine code and has run-time reflection strength and convenience as well as garbage collection. It is a <strong>quick<\/strong>, <strong>statically typed<\/strong>, <strong>compiled language<\/strong> that has the feel of an interpreted, dynamically typed language.<\/p>\n<p>In this blog, we will see how to install Go on Linux and Windows systems.<\/p>\n<h2>Installing in Linux<\/h2>\n<ul>\n<li>Download the GoLang package using the following command.<\/li>\n<\/ul>\n<pre>sudo wget https:\/\/go.dev\/dl\/go1.19.1.linux-amd64.tar.gz\r\n<\/pre>\n<ul>\n<li>To download the latest version, visit the following link.<\/li>\n<\/ul>\n<pre>https:\/\/go.dev\/dl\/\r\n<\/pre>\n<ul>\n<li>Use the following command to verify the tarball checksum.<\/li>\n<\/ul>\n<pre>sha256sum go1.19.1.linux-amd64.tar.gz\r\n<\/pre>\n<ul>\n<li>Extract the tarball to \/usr\/local directory.<\/li>\n<\/ul>\n<pre>sudo tar -C \/usr\/local -xzf go1.19.1.linux-amd64.tar.gz\r\n<\/pre>\n<ul>\n<li>Now, create a<strong> go.sh<\/strong> file in the<strong>\/etc\/profile.d<\/strong> directory and set the environment variable globally by adding the following line in the file.<\/li>\n<\/ul>\n<pre>sudo vi \/etc\/profile.d\/go.sh<\/pre>\n<pre class=\"wp-block-preformatted\">export PATH=$PATH:\/usr\/local\/go\/bin<\/pre>\n<ul>\n<li>Next, define the environment variable in<strong> .bash_profile<\/strong> file.<\/li>\n<\/ul>\n<pre>sudo vi ~\/.bash_profile\r\n\r\nexport GOPATH=$HOME\/go\r\nexport PATH=$PATH:\/usr\/local\/go\/bin:$GOPATH\/bin\r\n<\/pre>\n<ul>\n<li>Run the following command to reload the updated profiles.<\/li>\n<\/ul>\n<pre>source \/etc\/profile.d\/go.sh\r\nsource ~\/.bash_profile\r\n<\/pre>\n<ul>\n<li>Verify the installation with the following command.<\/li>\n<\/ul>\n<pre>go\u00a0 version\r\n<\/pre>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2956\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-qa-tester-300x31.png\" alt=\"\" width=\"745\" height=\"77\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-qa-tester-300x31.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-qa-tester-1024x106.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-qa-tester-768x79.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-qa-tester.png 1084w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<h2>Installing Golang in <a href=\"https:\/\/www.checkmateq.com\/azure-cloud\">Windows<\/a><\/h2>\n<ul>\n<li>Go to the following link and download MSI installer for windows.<\/li>\n<\/ul>\n<pre>https:\/\/go.dev\/dl\/\r\n<\/pre>\n<ul>\n<li>After, downloading the msi file, double-click on it.<\/li>\n<li>Follow the prompts for installation.<\/li>\n<li>Click Next, and accept the license agreement.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2958\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-custom-software-development-company-300x227.png\" alt=\"Golang \" width=\"756\" height=\"572\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-custom-software-development-company-300x227.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-custom-software-development-company.png 762w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Select the destination folder for installation.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2959\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-testing-services-300x233.png\" alt=\"Golang \" width=\"744\" height=\"578\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-testing-services-300x233.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-testing-services.png 757w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Click Install to begin the installation.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2960\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-development-company-300x227.png\" alt=\"\" width=\"745\" height=\"564\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-development-company-300x227.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-software-development-company.png 763w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2961\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-Cloud-DevOps-Services-300x235.png\" alt=\"Golang \" width=\"744\" height=\"583\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-Cloud-DevOps-Services-300x235.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Checkmate-Cloud-DevOps-Services.png 748w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2963\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-bigdata-engineer-300x229.png\" alt=\"Golang \" width=\"745\" height=\"569\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-bigdata-engineer-300x229.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-bigdata-engineer-768x586.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/hire-bigdata-engineer.png 772w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Open the command prompt or Powershell and run the following command to verify the installation.<\/li>\n<\/ul>\n<pre>go version\r\n<\/pre>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-2965\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-DevOps-engineer-300x45.png\" alt=\"Golang \" width=\"747\" height=\"112\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-DevOps-engineer-300x45.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-DevOps-engineer-768x114.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/09\/Hire-DevOps-engineer.png 993w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p><a href=\"https:\/\/www.checkmateq.com\/\">Please contact<\/a> our technical consultants if you have anything related to cloud <a href=\"https:\/\/www.checkmateq.com\/devops-engineering\">DevOps<\/a> infrastructure to be discussed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Golang or Go programming language is an open-source programming language supported by Google. Go is clear, simple, expressive, and productive. Its innovative type system enables flexible and modular program creation, and its concurrency techniques make it simple to write programs that take full advantage of multicore and networked devices. Go swiftly converts to machine code &hellip; <a href=\"https:\/\/www.checkmateq.com\/blog\/install-golang\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to install Golang in Linux and Windows&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":2968,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[2,71,70,69,68,8,14,6],"_links":{"self":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/2949"}],"collection":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/comments?post=2949"}],"version-history":[{"count":16,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/2949\/revisions"}],"predecessor-version":[{"id":4242,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/2949\/revisions\/4242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media\/2968"}],"wp:attachment":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media?parent=2949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/categories?post=2949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/tags?post=2949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}