<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How to Set and Unset Local, User and System Wide Environment Variables in Linux	</title>
	<atom:link href="https://www.tecmint.com/set-unset-environment-variables-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/set-unset-environment-variables-in-linux/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Thu, 13 Jul 2023 14:45:18 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: abetancort		</title>
		<link>https://www.tecmint.com/set-unset-environment-variables-in-linux/comment-page-1/#comment-1307114</link>

		<dc:creator><![CDATA[abetancort]]></dc:creator>
		<pubDate>Tue, 17 Dec 2019 04:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18368#comment-1307114</guid>

					<description><![CDATA[Thanks, Felipe for your clarification, it was wondering why for the individual user there wasn’t an “&lt;strong&gt;environment&lt;/strong&gt;” file to set variables for both the remote and console users like there are for system-wide variables. Now I know why it’s unnecessary.

Thanks]]></description>
			<content:encoded><![CDATA[<p>Thanks, Felipe for your clarification, it was wondering why for the individual user there wasn’t an “<strong>environment</strong>” file to set variables for both the remote and console users like there are for system-wide variables. Now I know why it’s unnecessary.</p>
<p>Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Adrian		</title>
		<link>https://www.tecmint.com/set-unset-environment-variables-in-linux/comment-page-1/#comment-1306870</link>

		<dc:creator><![CDATA[Adrian]]></dc:creator>
		<pubDate>Mon, 16 Dec 2019 18:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18368#comment-1306870</guid>

					<description><![CDATA[I installed a new version of the software with the same name as the previous version, and so I wanted to remove the environment variable associated with the old version in order to use the same variable linking the new version. 

The problem I had is that I didn&#039;t find where it was allocated, and didn&#039;t find it in any of the files listed above. Finally, I encountered it in &lt;strong&gt;/etc/alternatives&lt;/strong&gt; (I don&#039;t understand why it was there). 

Anyway, a useful tool to find an environment variable (e.g. var_name) is to open the terminal and type:
&lt;pre&gt;
# grep -R var_name /etc/ (if you think it is in /etc/) or 
# grep -R var_name /home/ (if you think it is in /home/)
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>I installed a new version of the software with the same name as the previous version, and so I wanted to remove the environment variable associated with the old version in order to use the same variable linking the new version. </p>
<p>The problem I had is that I didn&#8217;t find where it was allocated, and didn&#8217;t find it in any of the files listed above. Finally, I encountered it in <strong>/etc/alternatives</strong> (I don&#8217;t understand why it was there). </p>
<p>Anyway, a useful tool to find an environment variable (e.g. var_name) is to open the terminal and type:</p>
<pre>
# grep -R var_name /etc/ (if you think it is in /etc/) or 
# grep -R var_name /home/ (if you think it is in /home/)
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Felipe		</title>
		<link>https://www.tecmint.com/set-unset-environment-variables-in-linux/comment-page-1/#comment-1305220</link>

		<dc:creator><![CDATA[Felipe]]></dc:creator>
		<pubDate>Thu, 12 Dec 2019 19:12:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18368#comment-1305220</guid>

					<description><![CDATA[Learn How to Create, User-Wide and System-Wide Environment Variables in Linux / 1.b Set and Unset Local Variables in Linux.

This is wrong! Using &lt;strong&gt;export&lt;/strong&gt; makes the variable an environment variable. Just setting it to empty does not clear the &lt;strong&gt;env var&lt;/strong&gt; it still exists with an empty value and any checks for its existence would return true. 

You need to use &lt;strong&gt;unset&lt;/strong&gt; to remove the variable in this case.
&lt;pre&gt;
$ export VAR1=1
$ env &#124; grep VAR1
VAR1=1
$ VAR1=&#039;&#039;
$ env &#124; grep VAR1
VAR1=
$ unset VAR1
$ env &#124; grep VAR1
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>Learn How to Create, User-Wide and System-Wide Environment Variables in Linux / 1.b Set and Unset Local Variables in Linux.</p>
<p>This is wrong! Using <strong>export</strong> makes the variable an environment variable. Just setting it to empty does not clear the <strong>env var</strong> it still exists with an empty value and any checks for its existence would return true. </p>
<p>You need to use <strong>unset</strong> to remove the variable in this case.</p>
<pre>
$ export VAR1=1
$ env | grep VAR1
VAR1=1
$ VAR1=''
$ env | grep VAR1
VAR1=
$ unset VAR1
$ env | grep VAR1
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Azad		</title>
		<link>https://www.tecmint.com/set-unset-environment-variables-in-linux/comment-page-1/#comment-1103361</link>

		<dc:creator><![CDATA[Azad]]></dc:creator>
		<pubDate>Wed, 20 Feb 2019 14:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18368#comment-1103361</guid>

					<description><![CDATA[Is there any api to get list of only user defined environment-variables ?]]></description>
			<content:encoded><![CDATA[<p>Is there any api to get list of only user defined environment-variables ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ritesh Vishwakarma		</title>
		<link>https://www.tecmint.com/set-unset-environment-variables-in-linux/comment-page-1/#comment-1079422</link>

		<dc:creator><![CDATA[Ritesh Vishwakarma]]></dc:creator>
		<pubDate>Wed, 05 Dec 2018 06:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.tecmint.com/?p=18368#comment-1079422</guid>

					<description><![CDATA[As mentioned &lt;strong&gt;&quot;.bashrc&lt;/strong&gt;&quot; - This file is user specific file that gets loaded each time user creates a new local session&quot; But, it works from remote session as well.]]></description>
			<content:encoded><![CDATA[<p>As mentioned <strong>&#8220;.bashrc</strong>&#8221; &#8211; This file is user specific file that gets loaded each time user creates a new local session&#8221; But, it works from remote session as well.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
