Learn How to Set Your $PATH Variables Permanently in Linux

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

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. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  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.

Marin Todorov

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

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

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

16 Responses

  1. Todd says:


    When setting up the Android & Java SDKs on this system I had the same issue when defining the needed PATH variables and adding the library paths. I dug around and found that my current system has both ~/.bashrc and /etc/profile and that no matter what I tried defining them in ~/.bashrc & it wasn’t working, but commenting the lines out in ~/.bashrc and copying them to /etc/profile did exactly as expected.

    I came to the conclusion that perhaps there’s an overwrite happening, but I’ve never had a chance to understand it further.

  2. Ryan says:


    I am trying to change my $PATH and i did a vi on .bash_profile where i added this command:

    export PATH=$PATH:/HOME/scripts

    Then I saved the file and then i did a source ~/.bashrc, but my scripts file did not show up when i ran this command.

    $ echo $PATH

    WHAT did i do wrong? Respectfully request your help.

    Thank you.

  3. Shima says:


    My system is Fedora 28 and the default shell is tcsh. I want to know how can I set permanent PATH? It is necessary to say that I do not have root access.

    Before, I had Ubuntu, the default shell was BASH. So I used to edit .bashrc file.


  4. chk666 says:

    Hello and good days.

    I need help what happened if i run virtualenv in my environment path, what i mean is “[email protected]:$ virtualenv” did the path environment is change on bashrc, profile, or even in the /etc/bash, /etc/profile.

    The problem is, I cannot detect my python and when i try to echo path should get /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/marin/bin
    but I am getting blank, not showing up. Need help I run 16.04 Ubuntu.

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.