How to reset my $PATH environment variable back to default?Environment variable is set but not accessible on...

How does Leonard in "Memento" remember reading and writing?

use of 4/2 chord more compelling than root position?

Early credit roll before the end of the film

Dilemma of explaining to interviewer that he is the reason for declining second interview

Cat is tipping over bed-side lamps during the night

How to read 火日参拾月参

How to deal with an incendiary email that was recalled

What are "industrial chops"?

What would the chemical name be for C13H8Cl3NO

Why is it that Bernie Sanders is always called a "socialist"?

How did Ancient Greek 'πυρ' become English 'fire?'

Publishing research using outdated methods

Why would space fleets be aligned?

Is a new Boolean field better than a null reference when a value can be meaningfully absent?

Can a hotel cancel a confirmed reservation?

Play Zip, Zap, Zop

Has any human ever had the choice to leave Earth permanently?

Can I make estimated tax payments instead of withholding from my paycheck?

How should I handle players who ignore the session zero agreement?

Is using an 'empty' metaphor considered bad style?

Is it possible to grant users sftp access without shell access? If yes, how is it implemented?

The use of the spellings -zz- vs. -z-

How would an AI self awareness kill switch work?

Can I write a book of my D&D game?



How to reset my $PATH environment variable back to default?


Environment variable is set but not accessible on serverUbuntu adding path/Environment variablesadding directory to path environment variable doesn't remain in pathPATH is not getting exported by default in Ubuntu 12.04Some error messages displayed when I start terminal (both as root and as normal user)Environment Variable seems to be set yet not workingWhy I can't use the CATALINA_HOME environment variable?$PATH variable env variableWhich config file has my path variable?go still run even its path not in environment variable path?













2















I am a noobie. I tried searching the duplicates for answers, but none worked. I accidentally altered my $PATH variable in my terminal when trying to install ghc. Every time I open a terminal window I get:



bash: export: `/.cabal/bin:/opt/ghc/7.6.3/bin:': not a valid identifier
bash: warning: here-document at line 120 delimited by end-of-file (wanted
EOF')
Command 'cat' is available in '/bin/cat'
The command could not be located because '/bin' is not included in the
PATH environment variable.
cat: command not found


When I type:



echo $PATH


it gives me the following:



/.cabal/bin:/opt/cabal/1.16/bin:/opt/ghc/7.6.3/bin:


I can fix it by typing:



source /etc/environment


But that's only for the current terminal session. If I close the window and open a new one, it goes back to the wrong $PATH.



How can I permanently reset my $PATH back to the default?










share|improve this question




















  • 4





    Did you change your PATH environment variable in ~/.profile or ~/.bashrc?

    – edwinksl
    Sep 21 '16 at 0:40






  • 2





    Please add the contents of ~/.bashrc to your question.

    – Byte Commander
    Sep 21 '16 at 0:46











  • bashrc, the instructions to set up ghc ended with the following: [CODE] cat >> ~/.bashrc <<EOF export PATH="$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3 /bin:$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH [/CODE]

    – A. Bergeron
    Sep 21 '16 at 0:56













  • If you installed some packages also check /etc/profile.d for files that contain changes to the PATH variable - just grep for PATH.

    – FredFoo
    Sep 21 '16 at 0:59






  • 2





    Remember you can always copy unmodified ~/.profile and/or ~/.bashrc files from the /etc/skel directory

    – steeldriver
    Sep 21 '16 at 1:05


















2















I am a noobie. I tried searching the duplicates for answers, but none worked. I accidentally altered my $PATH variable in my terminal when trying to install ghc. Every time I open a terminal window I get:



bash: export: `/.cabal/bin:/opt/ghc/7.6.3/bin:': not a valid identifier
bash: warning: here-document at line 120 delimited by end-of-file (wanted
EOF')
Command 'cat' is available in '/bin/cat'
The command could not be located because '/bin' is not included in the
PATH environment variable.
cat: command not found


When I type:



echo $PATH


it gives me the following:



/.cabal/bin:/opt/cabal/1.16/bin:/opt/ghc/7.6.3/bin:


I can fix it by typing:



source /etc/environment


But that's only for the current terminal session. If I close the window and open a new one, it goes back to the wrong $PATH.



How can I permanently reset my $PATH back to the default?










share|improve this question




















  • 4





    Did you change your PATH environment variable in ~/.profile or ~/.bashrc?

    – edwinksl
    Sep 21 '16 at 0:40






  • 2





    Please add the contents of ~/.bashrc to your question.

    – Byte Commander
    Sep 21 '16 at 0:46











  • bashrc, the instructions to set up ghc ended with the following: [CODE] cat >> ~/.bashrc <<EOF export PATH="$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3 /bin:$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH [/CODE]

    – A. Bergeron
    Sep 21 '16 at 0:56













  • If you installed some packages also check /etc/profile.d for files that contain changes to the PATH variable - just grep for PATH.

    – FredFoo
    Sep 21 '16 at 0:59






  • 2





    Remember you can always copy unmodified ~/.profile and/or ~/.bashrc files from the /etc/skel directory

    – steeldriver
    Sep 21 '16 at 1:05
















2












2








2








I am a noobie. I tried searching the duplicates for answers, but none worked. I accidentally altered my $PATH variable in my terminal when trying to install ghc. Every time I open a terminal window I get:



bash: export: `/.cabal/bin:/opt/ghc/7.6.3/bin:': not a valid identifier
bash: warning: here-document at line 120 delimited by end-of-file (wanted
EOF')
Command 'cat' is available in '/bin/cat'
The command could not be located because '/bin' is not included in the
PATH environment variable.
cat: command not found


When I type:



echo $PATH


it gives me the following:



/.cabal/bin:/opt/cabal/1.16/bin:/opt/ghc/7.6.3/bin:


I can fix it by typing:



source /etc/environment


But that's only for the current terminal session. If I close the window and open a new one, it goes back to the wrong $PATH.



How can I permanently reset my $PATH back to the default?










share|improve this question
















I am a noobie. I tried searching the duplicates for answers, but none worked. I accidentally altered my $PATH variable in my terminal when trying to install ghc. Every time I open a terminal window I get:



bash: export: `/.cabal/bin:/opt/ghc/7.6.3/bin:': not a valid identifier
bash: warning: here-document at line 120 delimited by end-of-file (wanted
EOF')
Command 'cat' is available in '/bin/cat'
The command could not be located because '/bin' is not included in the
PATH environment variable.
cat: command not found


When I type:



echo $PATH


it gives me the following:



/.cabal/bin:/opt/cabal/1.16/bin:/opt/ghc/7.6.3/bin:


I can fix it by typing:



source /etc/environment


But that's only for the current terminal session. If I close the window and open a new one, it goes back to the wrong $PATH.



How can I permanently reset my $PATH back to the default?







bash environment-variables paths






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 21 '16 at 2:18









andrew.46

21.9k1469149




21.9k1469149










asked Sep 21 '16 at 0:39









A. BergeronA. Bergeron

741110




741110








  • 4





    Did you change your PATH environment variable in ~/.profile or ~/.bashrc?

    – edwinksl
    Sep 21 '16 at 0:40






  • 2





    Please add the contents of ~/.bashrc to your question.

    – Byte Commander
    Sep 21 '16 at 0:46











  • bashrc, the instructions to set up ghc ended with the following: [CODE] cat >> ~/.bashrc <<EOF export PATH="$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3 /bin:$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH [/CODE]

    – A. Bergeron
    Sep 21 '16 at 0:56













  • If you installed some packages also check /etc/profile.d for files that contain changes to the PATH variable - just grep for PATH.

    – FredFoo
    Sep 21 '16 at 0:59






  • 2





    Remember you can always copy unmodified ~/.profile and/or ~/.bashrc files from the /etc/skel directory

    – steeldriver
    Sep 21 '16 at 1:05
















  • 4





    Did you change your PATH environment variable in ~/.profile or ~/.bashrc?

    – edwinksl
    Sep 21 '16 at 0:40






  • 2





    Please add the contents of ~/.bashrc to your question.

    – Byte Commander
    Sep 21 '16 at 0:46











  • bashrc, the instructions to set up ghc ended with the following: [CODE] cat >> ~/.bashrc <<EOF export PATH="$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3 /bin:$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH [/CODE]

    – A. Bergeron
    Sep 21 '16 at 0:56













  • If you installed some packages also check /etc/profile.d for files that contain changes to the PATH variable - just grep for PATH.

    – FredFoo
    Sep 21 '16 at 0:59






  • 2





    Remember you can always copy unmodified ~/.profile and/or ~/.bashrc files from the /etc/skel directory

    – steeldriver
    Sep 21 '16 at 1:05










4




4





Did you change your PATH environment variable in ~/.profile or ~/.bashrc?

– edwinksl
Sep 21 '16 at 0:40





Did you change your PATH environment variable in ~/.profile or ~/.bashrc?

– edwinksl
Sep 21 '16 at 0:40




2




2





Please add the contents of ~/.bashrc to your question.

– Byte Commander
Sep 21 '16 at 0:46





Please add the contents of ~/.bashrc to your question.

– Byte Commander
Sep 21 '16 at 0:46













bashrc, the instructions to set up ghc ended with the following: [CODE] cat >> ~/.bashrc <<EOF export PATH="$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3 /bin:$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH [/CODE]

– A. Bergeron
Sep 21 '16 at 0:56







bashrc, the instructions to set up ghc ended with the following: [CODE] cat >> ~/.bashrc <<EOF export PATH="$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3 /bin:$PATH" EOF export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH [/CODE]

– A. Bergeron
Sep 21 '16 at 0:56















If you installed some packages also check /etc/profile.d for files that contain changes to the PATH variable - just grep for PATH.

– FredFoo
Sep 21 '16 at 0:59





If you installed some packages also check /etc/profile.d for files that contain changes to the PATH variable - just grep for PATH.

– FredFoo
Sep 21 '16 at 0:59




2




2





Remember you can always copy unmodified ~/.profile and/or ~/.bashrc files from the /etc/skel directory

– steeldriver
Sep 21 '16 at 1:05







Remember you can always copy unmodified ~/.profile and/or ~/.bashrc files from the /etc/skel directory

– steeldriver
Sep 21 '16 at 1:05












4 Answers
4






active

oldest

votes


















4














Building on the comments made by steeldriver try the following two simple steps:



1. Backup existing config:



mv -v ~/.bashrc ~/.bashrc_bak && mv -v ~/.profile  ~/.profile_bak


2. Create new, safe copies:



cp -v /etc/skel/{.bashrc,.profile} $HOME


Note: This can all be accomplished with a one-liner, demonstrated on my own system:



andrew@athens:~$ cp -v -S _bak /etc/skel/{.bashrc,.profile} $HOME
'/etc/skel/.bashrc' -> '/home/andrew/.bashrc' (backup: '/home/andrew/.bashrc_bak')
'/etc/skel/.profile' -> '/home/andrew/.profile' (backup: '/home/andrew/.profile_bak')
andrew@athens:~$


And finally add any customisations made by yourself previously from the 2 backup files, by 'customisations' I mean such things as:




  1. Alterations to the default $PATH made in these files, I note in your case you have installed to /opt which is not in the default $PATH

  2. Alterations to the default Terminal prompt

  3. Additions to the default aliases


And any other changes that have been made to the safe defaults of both files...






share|improve this answer


























  • Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

    – A. Bergeron
    Sep 21 '16 at 1:27



















1














There are a lot of options.
You can give a look here.



Keep in mind that in the link I sent you they mainly suggest how to set the path in the current session.



However if you change the path to the suggested values in ~/.profile or ~/.bashrc (depending which one you modified) you should be fine.






share|improve this answer


























  • I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

    – A. Bergeron
    Sep 21 '16 at 1:33



















0














I hope this is helpful:



rick@dell:~$ echo "$PATH"
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


I haven't changed my path (that I can recall) I notice "games" is in there but I don't play games so I assume it's a default. You might want to use this as a starting path to get you started on the right path, so to speak.



I'm using Ubuntu 16.04.



To add paths this link might be helpful: unix-linux-adding-path.






share|improve this answer
























  • I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

    – A. Bergeron
    Sep 21 '16 at 1:32











  • I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

    – WinEunuuchs2Unix
    Sep 21 '16 at 1:42













  • Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

    – A. Bergeron
    Sep 21 '16 at 1:51













  • I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

    – WinEunuuchs2Unix
    Sep 21 '16 at 2:25











  • I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

    – A. Bergeron
    Sep 21 '16 at 2:27



















0














Follow these step to recover the PATH environment variable :




  • Delete the culprit file from /etc/profile.d/ (if any)

  • Delete the culprit line from /etc/profile or ~/.bashrc (if any)

  • Execute source /etc/environment to start reseting the path environment variable

  • Execute source /etc/profile followed by source /etc/profile.d/*

  • At last source ~/.bashrc






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f827666%2fhow-to-reset-my-path-environment-variable-back-to-default%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    Building on the comments made by steeldriver try the following two simple steps:



    1. Backup existing config:



    mv -v ~/.bashrc ~/.bashrc_bak && mv -v ~/.profile  ~/.profile_bak


    2. Create new, safe copies:



    cp -v /etc/skel/{.bashrc,.profile} $HOME


    Note: This can all be accomplished with a one-liner, demonstrated on my own system:



    andrew@athens:~$ cp -v -S _bak /etc/skel/{.bashrc,.profile} $HOME
    '/etc/skel/.bashrc' -> '/home/andrew/.bashrc' (backup: '/home/andrew/.bashrc_bak')
    '/etc/skel/.profile' -> '/home/andrew/.profile' (backup: '/home/andrew/.profile_bak')
    andrew@athens:~$


    And finally add any customisations made by yourself previously from the 2 backup files, by 'customisations' I mean such things as:




    1. Alterations to the default $PATH made in these files, I note in your case you have installed to /opt which is not in the default $PATH

    2. Alterations to the default Terminal prompt

    3. Additions to the default aliases


    And any other changes that have been made to the safe defaults of both files...






    share|improve this answer


























    • Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

      – A. Bergeron
      Sep 21 '16 at 1:27
















    4














    Building on the comments made by steeldriver try the following two simple steps:



    1. Backup existing config:



    mv -v ~/.bashrc ~/.bashrc_bak && mv -v ~/.profile  ~/.profile_bak


    2. Create new, safe copies:



    cp -v /etc/skel/{.bashrc,.profile} $HOME


    Note: This can all be accomplished with a one-liner, demonstrated on my own system:



    andrew@athens:~$ cp -v -S _bak /etc/skel/{.bashrc,.profile} $HOME
    '/etc/skel/.bashrc' -> '/home/andrew/.bashrc' (backup: '/home/andrew/.bashrc_bak')
    '/etc/skel/.profile' -> '/home/andrew/.profile' (backup: '/home/andrew/.profile_bak')
    andrew@athens:~$


    And finally add any customisations made by yourself previously from the 2 backup files, by 'customisations' I mean such things as:




    1. Alterations to the default $PATH made in these files, I note in your case you have installed to /opt which is not in the default $PATH

    2. Alterations to the default Terminal prompt

    3. Additions to the default aliases


    And any other changes that have been made to the safe defaults of both files...






    share|improve this answer


























    • Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

      – A. Bergeron
      Sep 21 '16 at 1:27














    4












    4








    4







    Building on the comments made by steeldriver try the following two simple steps:



    1. Backup existing config:



    mv -v ~/.bashrc ~/.bashrc_bak && mv -v ~/.profile  ~/.profile_bak


    2. Create new, safe copies:



    cp -v /etc/skel/{.bashrc,.profile} $HOME


    Note: This can all be accomplished with a one-liner, demonstrated on my own system:



    andrew@athens:~$ cp -v -S _bak /etc/skel/{.bashrc,.profile} $HOME
    '/etc/skel/.bashrc' -> '/home/andrew/.bashrc' (backup: '/home/andrew/.bashrc_bak')
    '/etc/skel/.profile' -> '/home/andrew/.profile' (backup: '/home/andrew/.profile_bak')
    andrew@athens:~$


    And finally add any customisations made by yourself previously from the 2 backup files, by 'customisations' I mean such things as:




    1. Alterations to the default $PATH made in these files, I note in your case you have installed to /opt which is not in the default $PATH

    2. Alterations to the default Terminal prompt

    3. Additions to the default aliases


    And any other changes that have been made to the safe defaults of both files...






    share|improve this answer















    Building on the comments made by steeldriver try the following two simple steps:



    1. Backup existing config:



    mv -v ~/.bashrc ~/.bashrc_bak && mv -v ~/.profile  ~/.profile_bak


    2. Create new, safe copies:



    cp -v /etc/skel/{.bashrc,.profile} $HOME


    Note: This can all be accomplished with a one-liner, demonstrated on my own system:



    andrew@athens:~$ cp -v -S _bak /etc/skel/{.bashrc,.profile} $HOME
    '/etc/skel/.bashrc' -> '/home/andrew/.bashrc' (backup: '/home/andrew/.bashrc_bak')
    '/etc/skel/.profile' -> '/home/andrew/.profile' (backup: '/home/andrew/.profile_bak')
    andrew@athens:~$


    And finally add any customisations made by yourself previously from the 2 backup files, by 'customisations' I mean such things as:




    1. Alterations to the default $PATH made in these files, I note in your case you have installed to /opt which is not in the default $PATH

    2. Alterations to the default Terminal prompt

    3. Additions to the default aliases


    And any other changes that have been made to the safe defaults of both files...







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Sep 21 '16 at 8:11

























    answered Sep 21 '16 at 1:21









    andrew.46andrew.46

    21.9k1469149




    21.9k1469149













    • Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

      – A. Bergeron
      Sep 21 '16 at 1:27



















    • Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

      – A. Bergeron
      Sep 21 '16 at 1:27

















    Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

    – A. Bergeron
    Sep 21 '16 at 1:27





    Okay, I did both of these commands...required extras? Now my Path seems to be set to the following: /home/smaccom_swivel/bin:/home/smaccom_swivel/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin. So it's fixed, right? It seems to be working, should I be worried about that? The previous bash export error message disappeared...

    – A. Bergeron
    Sep 21 '16 at 1:27













    1














    There are a lot of options.
    You can give a look here.



    Keep in mind that in the link I sent you they mainly suggest how to set the path in the current session.



    However if you change the path to the suggested values in ~/.profile or ~/.bashrc (depending which one you modified) you should be fine.






    share|improve this answer


























    • I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

      – A. Bergeron
      Sep 21 '16 at 1:33
















    1














    There are a lot of options.
    You can give a look here.



    Keep in mind that in the link I sent you they mainly suggest how to set the path in the current session.



    However if you change the path to the suggested values in ~/.profile or ~/.bashrc (depending which one you modified) you should be fine.






    share|improve this answer


























    • I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

      – A. Bergeron
      Sep 21 '16 at 1:33














    1












    1








    1







    There are a lot of options.
    You can give a look here.



    Keep in mind that in the link I sent you they mainly suggest how to set the path in the current session.



    However if you change the path to the suggested values in ~/.profile or ~/.bashrc (depending which one you modified) you should be fine.






    share|improve this answer















    There are a lot of options.
    You can give a look here.



    Keep in mind that in the link I sent you they mainly suggest how to set the path in the current session.



    However if you change the path to the suggested values in ~/.profile or ~/.bashrc (depending which one you modified) you should be fine.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 20 '17 at 10:18









    Community

    1




    1










    answered Sep 21 '16 at 0:47









    Fabio MarroniFabio Marroni

    17117




    17117













    • I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

      – A. Bergeron
      Sep 21 '16 at 1:33



















    • I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

      – A. Bergeron
      Sep 21 '16 at 1:33

















    I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

    – A. Bergeron
    Sep 21 '16 at 1:33





    I edited the PATH to the correct value in the bash profile, but that didn't solve the issue. But I'm sure it was a necessary fix to make, so I glad I did it. Thanks! The link was an interesting read, being that I'm a noobie. It's good to know that the PATH is so easily modifiable per individual sessions.

    – A. Bergeron
    Sep 21 '16 at 1:33











    0














    I hope this is helpful:



    rick@dell:~$ echo "$PATH"
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


    I haven't changed my path (that I can recall) I notice "games" is in there but I don't play games so I assume it's a default. You might want to use this as a starting path to get you started on the right path, so to speak.



    I'm using Ubuntu 16.04.



    To add paths this link might be helpful: unix-linux-adding-path.






    share|improve this answer
























    • I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

      – A. Bergeron
      Sep 21 '16 at 1:32











    • I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

      – WinEunuuchs2Unix
      Sep 21 '16 at 1:42













    • Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

      – A. Bergeron
      Sep 21 '16 at 1:51













    • I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

      – WinEunuuchs2Unix
      Sep 21 '16 at 2:25











    • I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

      – A. Bergeron
      Sep 21 '16 at 2:27
















    0














    I hope this is helpful:



    rick@dell:~$ echo "$PATH"
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


    I haven't changed my path (that I can recall) I notice "games" is in there but I don't play games so I assume it's a default. You might want to use this as a starting path to get you started on the right path, so to speak.



    I'm using Ubuntu 16.04.



    To add paths this link might be helpful: unix-linux-adding-path.






    share|improve this answer
























    • I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

      – A. Bergeron
      Sep 21 '16 at 1:32











    • I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

      – WinEunuuchs2Unix
      Sep 21 '16 at 1:42













    • Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

      – A. Bergeron
      Sep 21 '16 at 1:51













    • I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

      – WinEunuuchs2Unix
      Sep 21 '16 at 2:25











    • I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

      – A. Bergeron
      Sep 21 '16 at 2:27














    0












    0








    0







    I hope this is helpful:



    rick@dell:~$ echo "$PATH"
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


    I haven't changed my path (that I can recall) I notice "games" is in there but I don't play games so I assume it's a default. You might want to use this as a starting path to get you started on the right path, so to speak.



    I'm using Ubuntu 16.04.



    To add paths this link might be helpful: unix-linux-adding-path.






    share|improve this answer













    I hope this is helpful:



    rick@dell:~$ echo "$PATH"
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


    I haven't changed my path (that I can recall) I notice "games" is in there but I don't play games so I assume it's a default. You might want to use this as a starting path to get you started on the right path, so to speak.



    I'm using Ubuntu 16.04.



    To add paths this link might be helpful: unix-linux-adding-path.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Sep 21 '16 at 1:12









    WinEunuuchs2UnixWinEunuuchs2Unix

    45.9k1189180




    45.9k1189180













    • I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

      – A. Bergeron
      Sep 21 '16 at 1:32











    • I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

      – WinEunuuchs2Unix
      Sep 21 '16 at 1:42













    • Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

      – A. Bergeron
      Sep 21 '16 at 1:51













    • I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

      – WinEunuuchs2Unix
      Sep 21 '16 at 2:25











    • I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

      – A. Bergeron
      Sep 21 '16 at 2:27



















    • I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

      – A. Bergeron
      Sep 21 '16 at 1:32











    • I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

      – WinEunuuchs2Unix
      Sep 21 '16 at 1:42













    • Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

      – A. Bergeron
      Sep 21 '16 at 1:51













    • I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

      – WinEunuuchs2Unix
      Sep 21 '16 at 2:25











    • I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

      – A. Bergeron
      Sep 21 '16 at 2:27

















    I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

    – A. Bergeron
    Sep 21 '16 at 1:32





    I do know the games part of the PATH is part of the default, I am running 16.04 as well. Echo $PATH has definitely helped me figure out whether or not I was on the right track with every attempt I've made, thanks!

    – A. Bergeron
    Sep 21 '16 at 1:32













    I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

    – WinEunuuchs2Unix
    Sep 21 '16 at 1:42







    I don't understand the games reference in my path, the only ones I played were Mass Effect trilogy under Windows 7 in Origin. My Ubuntu 16.04 was converted from 14.04 and it's possible there were games 2 years ago I forgot about, because sometimes you download things on a whim and never really use them.

    – WinEunuuchs2Unix
    Sep 21 '16 at 1:42















    Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

    – A. Bergeron
    Sep 21 '16 at 1:51







    Totally true with unused downloads. As far as the reference to the games directory, I think it's there simply so that you can reference anything in that directory without needing to write out the full PATH. You have immediate access to a far larger amount of your system that way, making the process of issuing commands to your system far more elegant and concise. Characteristics Windows consistently lacks in my experience. Maybe it was set up that way as a dis to corporate OS's?

    – A. Bergeron
    Sep 21 '16 at 1:51















    I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

    – WinEunuuchs2Unix
    Sep 21 '16 at 2:25





    I just checked the /usr/games directory and there are games there like Majohong (sp?) that I've never played before. Ubuntu must install them by default and setup the path. Anyway reinstalling the path has got to be easier than reinstalling Ubuntu.

    – WinEunuuchs2Unix
    Sep 21 '16 at 2:25













    I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

    – A. Bergeron
    Sep 21 '16 at 2:27





    I succeeded in resetting the PATH is definitely easier. MY OS is on an SSD, so I really don't want to reinstall my OS too many tiomes because of that. I was upset I had to do it to fix the black screen issue I was having after my first install.

    – A. Bergeron
    Sep 21 '16 at 2:27











    0














    Follow these step to recover the PATH environment variable :




    • Delete the culprit file from /etc/profile.d/ (if any)

    • Delete the culprit line from /etc/profile or ~/.bashrc (if any)

    • Execute source /etc/environment to start reseting the path environment variable

    • Execute source /etc/profile followed by source /etc/profile.d/*

    • At last source ~/.bashrc






    share|improve this answer




























      0














      Follow these step to recover the PATH environment variable :




      • Delete the culprit file from /etc/profile.d/ (if any)

      • Delete the culprit line from /etc/profile or ~/.bashrc (if any)

      • Execute source /etc/environment to start reseting the path environment variable

      • Execute source /etc/profile followed by source /etc/profile.d/*

      • At last source ~/.bashrc






      share|improve this answer


























        0












        0








        0







        Follow these step to recover the PATH environment variable :




        • Delete the culprit file from /etc/profile.d/ (if any)

        • Delete the culprit line from /etc/profile or ~/.bashrc (if any)

        • Execute source /etc/environment to start reseting the path environment variable

        • Execute source /etc/profile followed by source /etc/profile.d/*

        • At last source ~/.bashrc






        share|improve this answer













        Follow these step to recover the PATH environment variable :




        • Delete the culprit file from /etc/profile.d/ (if any)

        • Delete the culprit line from /etc/profile or ~/.bashrc (if any)

        • Execute source /etc/environment to start reseting the path environment variable

        • Execute source /etc/profile followed by source /etc/profile.d/*

        • At last source ~/.bashrc







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 26 mins ago









        CodeGeasCodeGeas

        314




        314






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f827666%2fhow-to-reset-my-path-environment-variable-back-to-default%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

            Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

            Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...