<?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>Tobias Cohen &#187; Unix</title>
	<atom:link href="http://tobiascohen.com/category/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://tobiascohen.com</link>
	<description>Journal of a Web Developer</description>
	<lastBuildDate>Fri, 16 Jul 2010 11:59:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Making Cygwin look at your .bashrc</title>
		<link>http://tobiascohen.com/2009/08/26/making-cygwin-look-at-your-bashrc/</link>
		<comments>http://tobiascohen.com/2009/08/26/making-cygwin-look-at-your-bashrc/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 00:40:46 +0000</pubDate>
		<dc:creator>Tobias Cohen</dc:creator>
				<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://tobiascohen.com/?p=116</guid>
		<description><![CDATA[Having recently installed Cygwin on my windows machine in order to get access to helpful Unix stuff like Git, I soon found the need to set some custom defaults, such as the PATH variable. The standard way to do this is to create a file called .bashrc in your home directory, containing something like this: [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently installed Cygwin on my windows machine in order to get access to helpful Unix stuff like Git, I soon found the need to set some custom defaults, such as the PATH variable. The standard way to do this is to create a file called .bashrc in your home directory, containing something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">/</span>cygdrive<span style="color: #000000; font-weight: bold;">/</span>c<span style="color: #000000; font-weight: bold;">/</span>mysql4.1.36<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">export</span> PATH</pre></div></div>

<p>Creating this file, and then launching the bash command worked fine for me, but when it came to launching Cygwin directly, it would ignore my .bashrc and start from a clean slate every time.</p>
<p>Looking around on the internet I came across two solutions:</p>
<ol>
<li>
Type into the Cygwin shell:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>defaults<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>skel<span style="color: #000000; font-weight: bold;">/</span>.bash_profile ~</pre></div></div>

</li>
<li>
Add to the end of /etc/profile:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">. <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/.bashrc&quot;</span></pre></div></div>

</li>
</ol>
<p>I did both of these and it fixed my problem, but you may only need one.</p>
]]></content:encoded>
			<wfw:commentRss>http://tobiascohen.com/2009/08/26/making-cygwin-look-at-your-bashrc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
