<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Siddhant Jain on Medium]]></title>
        <description><![CDATA[Stories by Siddhant Jain on Medium]]></description>
        <link>https://medium.com/@seekingpeace?source=rss-970c556eef4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qCdXxOf_skL0r7m3.</url>
            <title>Stories by Siddhant Jain on Medium</title>
            <link>https://medium.com/@seekingpeace?source=rss-970c556eef4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:12:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@seekingpeace/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Game of Paths ! [linux/unix]]]></title>
            <link>https://medium.com/greyatom/game-of-paths-linux-unix-6bd685a60a61?source=rss-970c556eef4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bd685a60a61</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Siddhant Jain]]></dc:creator>
            <pubDate>Mon, 09 Oct 2017 08:36:12 GMT</pubDate>
            <atom:updated>2017-10-11T11:39:08.350Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQFoOjSYL_nKRRa7UJaGBw.png" /></figure><p><strong>W</strong>e are often confused / lost in the paths at the initial stage of setting up few softwares or installing a new version of a particular language.<br>So, today I’ll be talking about few commands that can help us get hold of the situation when things get out of hand.</p><p>I happened to be in a situation when I was very frustrated with what is wrong with my Anaconda installation. Everything down here helped me debug this and problems popped up later when i had to configure Hadoop and related tools.</p><pre>echo $PATH</pre><blockquote>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin</blockquote><ul><li>This little command over here tells us where all can my OS find the executable or scripts (PATHS are separated by a colon : here) so that you can run it by its name as a command.</li><li>OS parses the PATH variable sequentially i.e. first it will look for binaries in /usr/local/bin then in /usr/bin . <em>This is the main reason, because of which we have to </em><strong><em>prepend</em></strong><em> </em><em>$PATH for Anaconda .</em></li></ul><pre>which python</pre><blockquote>/usr/bin/python</blockquote><p><strong>Now, let’s modify the path.<br></strong>Whenever we fire up bash/terminal there are few scripts that always run. I am talking precisely about the config file for your bash here. Here we can add a simple command to modify the path set by the core system.<br><em>Note: for my OS I have to change in </em><em>~/.profile. For others it may be </em><em>~/.bashrc or </em><em>~/.zshrc (</em><em>~ is for home directory by default in linux)</em></p><p>We now need to edit this config file to modify the path. We can do it by typing gedit ~/.profile or vi ~/.profile which ever text editor we are comfortable with and add the following line in the file (I have anaconda3 installed in this directory and /bin in anaconda directory contains the binaries it manages) :<br> export PATH=&quot;/Users/sid/anaconda3/bin:$PATH&quot;</p><p>As we come back to terminal type:<br>source ~/.profile this is to load the changes to my current bash.</p><pre>which python</pre><blockquote>/Users/sid/anaconda3/bin/python</blockquote><p>Now we can see that as $PATH has been modified. First directory is parsed and OS chooses python present in anaconda directory as its default.</p><p>What if I appended the path instead of prepending it??<br>ie export PATH=&quot;$PATH:/Users/sid/anaconda3/bin&quot;</p><pre>which python</pre><blockquote>/usr/bin/python</blockquote><p>Again, we see that I get my old result only. This is because of sequential parsing of paths.</p><p>Thus, it’s very important to note the order of paths we declare in $PATH as these are parsed sequentially and OS uses the first found binary/script as default for executing as a command.</p><p><strong><em>Stay tuned for more!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bd685a60a61" width="1" height="1" alt=""><hr><p><a href="https://medium.com/greyatom/game-of-paths-linux-unix-6bd685a60a61">Game of Paths ! [linux/unix]</a> was originally published in <a href="https://medium.com/greyatom">GreyAtom</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>