<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>toolchain on
A Scripter's Notes</title><link>https://scripter.co/tags/toolchain/</link><description>Recent content in toolchain
on A Scripter's Notes</description><language>en-us</language><managingEditor>kaushal.modi@gmail.com (Kaushal Modi)</managingEditor><webMaster>kaushal.modi@gmail.com (Kaushal Modi)</webMaster><lastBuildDate>Wed, 22 Apr 2026 08:24:58 -0400</lastBuildDate><generator>Hugo -- gohugo.io</generator><docs>https://validator.w3.org/feed/docs/rss2.html</docs><atom:link href="https://scripter.co/tags/toolchain/index.xml" rel="self" type="application/rss+xml"/><item><title>Installing go toolchain</title><link>https://scripter.co/installing-go-toolchain/</link><description>&lt;blockquote>&amp;ldquo;Installing&amp;rdquo; &lt;code>go&lt;/code> is simply extracting its release archive, putting it
somewhere in you &lt;code>$HOME&lt;/code> and pointing &lt;code>GOROOT&lt;/code> and &lt;code>PATH&lt;/code> env vars to
it.&lt;/blockquote>&lt;div class="ox-hugo-toc toc">
&lt;div class="heading">Table of Contents&lt;/div>
&lt;ul>
&lt;li>&lt;a href="#installing-go">Installing &lt;code>go&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="#updating-go">Updating &lt;code>go&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;/div>
&lt;!--endtoc-->
&lt;p>There are &lt;strong>two&lt;/strong> reasons why I suggest installing &lt;code>go&lt;/code> to anyone,
whether they are Go developers, or not (like me).&lt;/p>
&lt;ol>
&lt;li>You can then build amazing utilities like &lt;a href="https://github.com/peco/peco">peco&lt;/a>, &lt;a href="https://github.com/gohugoio/hugo">hugo&lt;/a> and &lt;a href="https://github.com/variadico/noti">noti&lt;/a>.&lt;/li>
&lt;li>&lt;strong>It&amp;rsquo;s easy!&lt;/strong>&lt;/li>
&lt;/ol>
&lt;h2 id="installing-go">Installing &lt;code>go&lt;/code>&amp;nbsp;&lt;a class="headline-hash no-text-decoration" href="#installing-go">#&lt;/a>&lt;/h2>
&lt;p>Below instructions are for installing &lt;code>go&lt;/code> on a 64-bit GNU/Linux
machine, and using &lt;code>tcsh&lt;/code> shell. But similar steps should work for any
other OS and shell.&lt;/p>
&lt;ol>
&lt;li>Download the &lt;em>tar.gz&lt;/em> for the latest &lt;em>linux-amd64&lt;/em> binaries from
&lt;a href="https://golang.org/dl/">https://golang.org/dl/&lt;/a>.&lt;/li>
&lt;li>Extract it to some place in your &lt;code>$HOME&lt;/code>. I extract it to
&lt;code>${HOME}/go/&lt;/code>&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>.&lt;/li>
&lt;li>Create a directory where you would want to install the &lt;code>go&lt;/code>
packages.
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">mkdir -p ~/go.apps
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>Set the following environment variables&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>, and also save them to
your shell config:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-tcsh" data-lang="tcsh">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">setenv &lt;/span>GOROOT &lt;span class="k">${&lt;/span>&lt;span class="nv">HOME&lt;/span>&lt;span class="k">}&lt;/span>/go &lt;span class="c"># go root&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">setenv &lt;/span>GOPATH &lt;span class="k">${&lt;/span>&lt;span class="nv">HOME&lt;/span>&lt;span class="k">}&lt;/span>/go.apps &lt;span class="c"># for go applications&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>Add the &lt;code>${GOROOT}/bin&lt;/code> and &lt;code>${GOPATH}/bin&lt;/code> directories to your
&lt;code>$PATH&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>Now you can install any &lt;code>go&lt;/code> application!&lt;/p>
&lt;p>For instance, &lt;code>noti&lt;/code> is a nice little utility that triggers an alert
(desktop popup, &lt;em>Pushbullet&lt;/em> notification, etc.) when a process
finishes. From its &lt;a href="https://github.com/variadico/noti#installation">installation notes&lt;/a>, you just run the below to
install it:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">go get -u github.com/variadico/noti/cmd/noti
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Apart from the &lt;code>go&lt;/code> applications I suggested here, &lt;em>go&lt;/em> out and explore
more &amp;ndash; &lt;code>go get&lt;/code> them 😁&lt;/p>
&lt;h2 id="updating-go">Updating &lt;code>go&lt;/code>&amp;nbsp;&lt;a class="headline-hash no-text-decoration" href="#updating-go">#&lt;/a>&lt;/h2>
&lt;ol>
&lt;li>Delete the existing &lt;code>$GOROOT&lt;/code> directory (&lt;strong>not &lt;code>GOPATH&lt;/code>!&lt;/strong>)
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="cl">rm -rf ~/go &lt;span class="c1"># as that is my GOROOT&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>Download the &lt;em>tar.gz&lt;/em> for the latest &lt;em>linux-amd64&lt;/em> binaries.&lt;/li>
&lt;li>Extract it to the same &lt;code>$GOROOT&lt;/code> (&lt;code>~/go&lt;/code> in my case).&lt;/li>
&lt;/ol>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>I prefer to not add the version number to my &lt;code>go&lt;/code> installation
folder. That way, when I want to update it, I simply &lt;code>rm -rf&lt;/code> it and
put in the new version.. and I don&amp;rsquo;t need to update &lt;code>GOROOT&lt;/code> or
&lt;code>PATH&lt;/code>.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>You can refer to these official &lt;code>go&lt;/code> references [ &lt;a href="https://golang.org/doc/install#tarball">1&lt;/a> ], [ &lt;a href="https://golang.org/doc/install#testing">2&lt;/a> ] for
further information on these variables.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description><author>Kaushal.Modi@fakeEmailToMakeValidatorHappy.com (Kaushal Modi)</author><category domain="https://scripter.co/categories/unix">unix</category><category domain="https://scripter.co/tags/toolchain">toolchain</category><category domain="https://scripter.co/tags/golang">golang</category><guid>https://scripter.co/installing-go-toolchain/</guid><pubDate>Fri, 24 Feb 2017 01:33:47 -0500</pubDate></item></channel></rss>