How to Set and Unset Local, User and System Wide Environment Variables in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gunjit Khera

Currently a Computer Science student and a geek when it comes to Operating System and its concepts. Have 1+ years of experience in Linux and currently doing a research on its internals along with developing applications for Linux on python and C.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Linux BASH Programming Cookbook
Getting Started with Ubuntu 16.04
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

8 Responses

  1. Edik says:

    I need a tool that will let me to have a variable shared between all sessions.
    I think any of this examples do not provide that functionality.

  2. Piter says:

    Hi, thank you for your post… I didn’t found /etc/bash.bashrc on centos7.
    Thank you for your job

  3. kerny says:

    .bash_profile is sourced by login shell, it has nothing to do with ssh, ssh connection can be login less.

    • Gunjit Khera says:

      Whenever you start a remote ssh session for any user@hostname then the ‘.bash_profile’ file for that user gets sourced.

  4. Jalal Hajigholamali says:

    Thanks a lot…
    very nice article…..

  5. snoozinux says:

    And I comment out all the garbagifar in /etc/profile.d in and…

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?