{"id":6318,"date":"2021-05-09T19:59:54","date_gmt":"2021-05-09T19:59:54","guid":{"rendered":"https:\/\/linuxways.net\/?p=6318"},"modified":"2021-05-09T19:59:54","modified_gmt":"2021-05-09T19:59:54","slug":"install-go-on-linux-mint-20","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/install-go-on-linux-mint-20\/","title":{"rendered":"Install Go on Linux Mint 20"},"content":{"rendered":"<h2>Introduction:<\/h2>\n<p>Go is a relatively newer statically typed and compiled programming language that was developed in 2009. A Go program is a combination of functions and methods. This programming language provides a great level of liberty and flexibility to coders and hence it is used quite extensively. Let us take a look at the procedure of installing this language on a Linux machine.<\/p>\n<h2>The procedure of Installing Go on Linux Mint 20:<\/h2>\n<p>If you want to install Go language on your Linux system, then you should perform the steps described over here on your system.<\/p>\n<h3>Step # 1: Perform a System Update:<\/h3>\n<p>Before installing Go language on your system, it is good to have an updated system that can be achieved by executing the command shown below:<\/p>\n<pre><strong>$ sudo apt-get update<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"21\" class=\"wp-image-6319\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-40.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-40.png 404w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-40-300x16.png 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/strong><\/p>\n<p>This command will complete its execution with the following output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"410\" class=\"wp-image-6320\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-41.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-41.png 645w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-41-300x191.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<h3>Step # 2: Install Go on your System:<\/h3>\n<p>Now, you can install Go language on your Linux system with this command:<\/p>\n<pre><strong>$ sudo apt-get install golang<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"23\" class=\"wp-image-6321\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-42.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-42.png 461w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-42-300x15.png 300w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/strong><\/p>\n<p>During the installation, you need to provide a confirmation with the &#8220;y&#8221; character and press the Enter key as shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"296\" class=\"wp-image-6322\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-43.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-43.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-43-300x140.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>Finally, Go language will be installed on your system and you will be able to verify it as well.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"411\" class=\"wp-image-6323\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-44.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-44.png 647w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-44-300x191.png 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/p>\n<h3>Step # 3: Check the Installed Version of Go on your System:<\/h3>\n<p>To confirm which version of Go language has been installed on your Linux system, you can execute the following command:<\/p>\n<pre><strong>$ go version<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"327\" height=\"23\" class=\"wp-image-6324\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-45.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-45.png 327w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-45-300x21.png 300w\" sizes=\"auto, (max-width: 327px) 100vw, 327px\" \/><\/strong><\/p>\n<p>You can see the version of Go language installed on our system in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"333\" height=\"61\" class=\"wp-image-6325\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-46.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-46.png 333w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-46-300x55.png 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/p>\n<h3>Step # 4: Create a Program in Go Language on your System:<\/h3>\n<p>To further test your installation of Go language on your system, you can create a program in this language and try to execute it. First, you need to create a file with the \u201c.go\u201d extension by executing this command:<\/p>\n<pre><strong>$ sudo nano FileName.go<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"383\" height=\"25\" class=\"wp-image-6326\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-47.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-47.png 383w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-47-300x20.png 300w\" sizes=\"auto, (max-width: 383px) 100vw, 383px\" \/><\/strong><\/p>\n<p>After creating a Go file, we have created a simple program that prints a sample message on the terminal as shown below. You can save this file by pressing Ctrl+ X.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"461\" class=\"wp-image-6327\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-48.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-48.png 652w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-48-300x212.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/p>\n<h3>Step # 5: Run the Go Program you have just created on your System:<\/h3>\n<p>Now, it is time to run our Go program with the following command:<\/p>\n<pre><strong>$ go run FileName.go<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"360\" height=\"23\" class=\"wp-image-6328\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-49.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-49.png 360w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-49-300x19.png 300w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/strong><\/p>\n<p>The output of our first Go language program is shown in the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"57\" class=\"wp-image-6329\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-50.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-50.png 401w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-50-300x43.png 300w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/p>\n<h2>Additional Tip:<\/h2>\n<p>You can also remove the Go language from your Linux system very easily with the following command:<\/p>\n<pre><strong>$ sudo apt-get purge --autoremove golang<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"24\" class=\"wp-image-6330\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-51.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-51.png 551w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-51-300x13.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/strong><\/p>\n<p>Soon after running this command, the Go language will be completely removed from your Linux system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"411\" class=\"wp-image-6331\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-52.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-52.png 645w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/05\/word-image-52-300x191.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>This was a very basic introductory article on the installation of the Go language on a Linux Mint 20 system. Moreover, we also shared with you a very quick method of creating a sample Go program. Finally, we concluded this guide on the removal procedure of Go language from a Linux Mint 20 system.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction: Go is a relatively newer statically typed and compiled programming language that was developed in 2009. A Go program is a combination of functions and methods. This&hellip;<\/p>","protected":false},"author":1,"featured_media":6344,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[320,129],"class_list":["post-6318","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-go","tag-linux-mint-20"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/6318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=6318"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/6318\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/6344"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=6318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=6318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=6318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}