<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>go language Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/go-language/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 26 Aug 2021 15:26:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to install Go Language on Debian 11 / 10?</title>
		<link>https://www.osradar.com/go-language-debian-programming/</link>
					<comments>https://www.osradar.com/go-language-debian-programming/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 31 Aug 2021 23:19:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[go language]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=16279</guid>

					<description><![CDATA[<p>The world of software development is a complex world. Every day new and better features emerge that force developers to broaden their knowledge. However, not all these technologies are complex to assimilate, and for this purpose, I will teach you how to install GO language on Debian 11 / 10. Go is an open-source (BSD [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/go-language-debian-programming/">How to install Go Language on Debian 11 / 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The world of software development is a complex world. Every day new and better features emerge that force developers to broaden their knowledge. However, not all these technologies are complex to assimilate, and for this purpose, I will teach you how to install GO  language on Debian 11 / 10.</p>



<p><a href="https://golang.org">Go</a> is an open-source (BSD license)  programming language that was born with the objective of allowing the creation of efficient and easily distributable applications. So, it has binaries for Windows, Mac OS and of course, for Linux.</p>



<p>So, in this post, I will install it and create a “Hello World” file for the test.</p>



<h2>Download and install Go Language on Debian 11 /10</h2>



<p>Go Language is cross-platform which makes it available for Linux. However, first you have to download the binaries from the project website. But we will use the terminal that is faster and more efficient.</p>



<p>First, make sure you have <a href="https://www.osradar.com/the-wget-command/" target="_blank" rel="noreferrer noopener" aria-label="wget (opens in a new tab)">wget</a> installed on your computer.</p>



<pre class="wp-block-preformatted">:~$ sudo apt install wget</pre>



<p>Then proceed to download Go Language. At the time of writing this post, the latest stable version is 1.17</p>



<pre class="wp-block-preformatted">:~$ wget -c https://golang.org/dl/go1.17.linux-amd64.tar.gz -O go.tar.gz</pre>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" src="https://www.osradar.com/wp-content/uploads/2019/12/1-20-1024x228.png" alt="1.- Download and install Go Language on Debian 11 / 10" class="wp-image-32017" width="946" height="210" srcset="https://www.osradar.com/wp-content/uploads/2019/12/1-20-1024x228.png 1024w, https://www.osradar.com/wp-content/uploads/2019/12/1-20-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/1-20-768x171.png 768w, https://www.osradar.com/wp-content/uploads/2019/12/1-20-696x155.png 696w, https://www.osradar.com/wp-content/uploads/2019/12/1-20-1068x238.png 1068w, https://www.osradar.com/wp-content/uploads/2019/12/1-20.png 1366w" sizes="(max-width: 946px) 100vw, 946px" /><figcaption>1.- Download and install Go Language on Debian 11 / 10</figcaption></figure>



<p>Then, decompress it.</p>



<pre class="wp-block-preformatted">:~$ tar xvf go.tar.gz</pre>



<p>Now you have to change the folder permissions. Besides moving it to another location like <code>/usr/local/</code>.</p>



<pre class="wp-block-preformatted">:~$ sudo chown -R root:root go
:~$ sudo mv go /usr/local</pre>



<p>Then, it is necessary to make some modifications to the user&#8217;s bash profile in order to use Go. Open the configuration file and add the following:</p>



<pre class="wp-block-preformatted">:~$ sudo nano ~/.profile</pre>



<pre class="wp-block-preformatted">export GOROOT=/usr/local/go    
export GOPATH=$HOME/work/
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="634" height="219" src="https://www.osradar.com/wp-content/uploads/2019/12/3-1.png" alt="3.- Edit the bash profile" class="wp-image-16282" srcset="https://www.osradar.com/wp-content/uploads/2019/12/3-1.png 634w, https://www.osradar.com/wp-content/uploads/2019/12/3-1-300x104.png 300w" sizes="(max-width: 634px) 100vw, 634px" /><figcaption>2.- Edit the bash profile</figcaption></figure>



<p>Save the changes (CTRL + O) and close the file (CTRL + X).</p>



<p>With this, Go is ready for work. You can check it by showing the version of the program.</p>



<pre class="wp-block-preformatted">:~$ go version</pre>



<figure class="wp-block-image size-full"><img loading="lazy" width="461" height="94" src="https://www.osradar.com/wp-content/uploads/2019/12/2-18.png" alt="3.- Go language version" class="wp-image-32018" srcset="https://www.osradar.com/wp-content/uploads/2019/12/2-18.png 461w, https://www.osradar.com/wp-content/uploads/2019/12/2-18-300x61.png 300w" sizes="(max-width: 461px) 100vw, 461px" /><figcaption>3.- Go language version</figcaption></figure>



<p>Now with a &#8220;hello world&#8221; we&#8217;ll see that everything works.</p>



<h2>Testing the installation</h2>



<p>As I said before, the best way to test the installation is to run a real code. For this, we will use the typical &#8220;Hello World&#8221;.</p>



<p>First, we&#8217;ll create the directory structure. In our Home, we will create a folder for the project called <code>work</code>. Inside a folder called <code>src</code> where the source code files will go. In it, a folder called <code>hello</code> and inside the file <code>hello.go</code>. Something like this is the directory structure. The folders work and hello can be called differently.</p>



<pre class="wp-block-preformatted">:~$ mkdir -p $HOME/work/src/hello</pre>



<p>Now, create the Go file and add the following:</p>



<pre class="wp-block-preformatted">:~$ nano ~/work/src/hello/hello.go</pre>



<pre class="wp-block-preformatted">package main 
 import "fmt"
 func main() {
 fmt.Printf("hello, world\n")
 }</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="888" height="198" src="https://www.osradar.com/wp-content/uploads/2019/12/5.png" alt="5.- Creating a go file" class="wp-image-16301" srcset="https://www.osradar.com/wp-content/uploads/2019/12/5.png 888w, https://www.osradar.com/wp-content/uploads/2019/12/5-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/5-768x171.png 768w, https://www.osradar.com/wp-content/uploads/2019/12/5-696x155.png 696w" sizes="(max-width: 888px) 100vw, 888px" /><figcaption>5.- Creating a go file</figcaption></figure>



<p>Again, save the changes and close the file.</p>



<pre class="wp-block-preformatted">:~$ go build hello
:~$ go install hello
:~$ hello</pre>



<p>So, enjoy it.</p>



<h2>Conclusion</h2>



<p>GO is a very popular language and every day it is more and more popular. It’s simple but very powerful, besides being open source. As you have seen, its installation is really simple.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/go-language-debian-programming/">How to install Go Language on Debian 11 / 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/go-language-debian-programming/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install GO Language on Rocky Linux 8 /CentOS 8 / Fedora 34?</title>
		<link>https://www.osradar.com/install-go-language-centos-8/</link>
					<comments>https://www.osradar.com/install-go-language-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 02 Jul 2021 00:30:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[go language]]></category>
		<category><![CDATA[How to]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14068</guid>

					<description><![CDATA[<p>There is a large number of programming languages quite diverse and varied. Some of them, with specific purposes such as the web or the desktop but others more general. What is certain is that the big companies of development and implementation of software are in the frequent search of languages of programming that adapt to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-go-language-centos-8/">How to install GO Language on Rocky Linux 8 /CentOS 8 / Fedora 34?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>There is a large number of programming languages quite diverse and varied. Some of them, with specific purposes such as the web or the desktop but others more general. What is certain is that the big companies of development and implementation of software are in the frequent search of languages of programming that adapt to the new necessities of the clients. In this sense, more and more people are talking about GO because of its speed and efficiency. In this post you will learn how to install GO language on Rocky Linux 8 /CentOS 8 / Fedora 34.</p>



<p><a rel="noreferrer noopener" aria-label="Go (opens in a new tab)" href="https://golang.org/" target="_blank">Go</a> is a programming language created in 2007 by Google. It was initially intended to be an internal coding standard for the company&#8217;s own infrastructure, but its potential prompted it to go on the air. <strong>Go is a concurrent and compiled programming language inspired by C syntax</strong>. It has been developed by Google, and its initial designers are Robert Griesemer, Rob Pike and Ken Thompson. It is cross-platform because it has binaries for Windows, <a href="https://www.osradar.com/tag/linux/">Linux</a>, macOS, <g class="gr_ gr_53 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="53" data-gr-id="53">and</g> FreeBSD.</p>



<p>Some of its features are:</p>



<ul><li>Go uses a syntax similar to C. </li><li>In teh same way, Go uses statically typed and is as efficient as C.</li><li>Go has many of the features and ease of dynamic languages like Python.</li><li>Although it is a language designed for system programming, it provides a garbage collector, reflection and other high-level capabilities that make it a very powerful language.</li></ul>



<p>Therefore we are talking about a robust, technical and efficient language. So, let us install Go language on CentOS 8.</p>



<h2>Install GO language on Rocky Linux 8 / CentOS 8 / Fedora 34</h2>



<p>First you have to update the system. This is always recommended for security reasons.</p>



<p>So open a terminal session and run the following:</p>



<pre class="wp-block-preformatted">:~$ su<br>:~# dnf update</pre>



<p>By having the system updated, you will have the latest security patches available and your system will be more robust.</p>



<p>Then you have to download the corresponding binaries for our system. For this we will use a tool called wget, if you don&#8217;t have it installed, you will have to do it.</p>



<pre class="wp-block-preformatted">:~# dnf install wget<br>:~# wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz</pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="225" src="https://www.osradar.com/wp-content/uploads/2019/09/1-30-1024x225.png" alt="1.- Download GO language on Rocky Linux 8 /CentOS 8 / Fedora 34" class="wp-image-14077" srcset="https://www.osradar.com/wp-content/uploads/2019/09/1-30-1024x225.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/1-30-300x66.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/1-30-768x169.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/1-30-696x153.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/1-30-1068x235.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/1-30.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Download GO language on Rocky Linux 8 /CentOS 8 / Fedora 34</figcaption></figure>



<p>Versions may change over time. So check in the <a rel="noreferrer noopener" aria-label="download section (opens in a new tab)" href="https://golang.org/dl/" target="_blank">download section</a> which is the latest stable version and modify the command.</p>



<p>Now we will have to unzip it and move it to an installation folder. In my case, I will do it in <code>/usr/local</code> and unzip the file there.</p>



<pre class="wp-block-preformatted">:~# dnf install tar
:~# tar -zxvf go1.13.1.linux-amd64.tar.gz -C /usr/local</pre>



<p>It is now the turn to maintain the environment variables. All this so that the installation does not have problems finding the command and the compiler.</p>



<pre class="wp-block-preformatted">:~# echo 'export GOROOT=/usr/local/go' | tee -a /etc/profile<br>:~# echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /etc/profile</pre>



<p>Finally, refresh your bash profile.</p>



<pre class="wp-block-preformatted">:~# source /etc/profile</pre>



<p>Now let&#8217;s test the installation. To do this we will create the typical Hello World program. First create the folders:</p>



<pre class="wp-block-preformatted">:~# mkdir -p project/helloworld
:~# cd project/helloworld</pre>



<p>Then, create the new file and add the following:</p>



<pre class="wp-block-preformatted">:~# nano helloworld.go</pre>



<pre class="wp-block-preformatted">package main
import "fmt"
func main() {
    fmt.Printf("Hi, I am Angelo. Welcome to osradar.com\n")
}</pre>



<figure class="wp-block-image"><img loading="lazy" width="935" height="192" src="https://www.osradar.com/wp-content/uploads/2019/09/2-29.png" alt="2.- Testing GO language" class="wp-image-14078" srcset="https://www.osradar.com/wp-content/uploads/2019/09/2-29.png 935w, https://www.osradar.com/wp-content/uploads/2019/09/2-29-300x62.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/2-29-768x158.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/2-29-696x143.png 696w" sizes="(max-width: 935px) 100vw, 935px" /><figcaption>2.- Testing GO language</figcaption></figure>



<p>Then, save the changes and close the file.</p>



<p>Now, run the program:</p>



<pre class="wp-block-preformatted">:~# go run helloworld.go</pre>



<figure class="wp-block-image"><img loading="lazy" width="913" height="121" src="https://www.osradar.com/wp-content/uploads/2019/09/3-26.png" alt="3.- GO language is working on Rocky Linux 8 / CentOS 8 / Fedora 34" class="wp-image-14079" srcset="https://www.osradar.com/wp-content/uploads/2019/09/3-26.png 913w, https://www.osradar.com/wp-content/uploads/2019/09/3-26-300x40.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/3-26-768x102.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/3-26-696x92.png 696w" sizes="(max-width: 913px) 100vw, 913px" /><figcaption>3.- GO language is working on Rocky Linux 8 / CentOS 8 / Fedora 34</figcaption></figure>



<p>Yeah, everything&#8217;s fine and working. Now you can start creating great apps with Go.</p>



<h2>Conclusion</h2>



<p>Go is a versatile and very efficient modern programming language sponsored by Google. This makes it quite robust with a solid community behind it. Today you have learned to install it on CentOS 8 and RHEL 8.</p>



<p>So, please share this post with your friends and<a rel="noreferrer noopener" aria-label=" join our Telegram channel (opens in a new tab)" href="https://t.me/osradar" target="_blank"> join our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-go-language-centos-8/">How to install GO Language on Rocky Linux 8 /CentOS 8 / Fedora 34?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-go-language-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
