Linux wrong path exported. How to recover ~./bashrc file

后端 未结 2 1434
温柔的废话
温柔的废话 2020-12-04 00:32

While I try to set java path on ~./bashrc file i exported like:

PATH=/usr/local/jdk1.6.0/bin
export PATH

which I guess makes a

相关标签:
2条回答
  • 2020-12-04 00:43

    Put something like:

    PATH=/your/jdk/bin/path:${PATH}
    export PATH
    

    That way, your path gets prepended to the regular PATH environment.

    And simply log out and log back in to reset your environment. Or type this:

    export PATH=/usr/bin:/usr/local/bin
    

    or this

    . /etc/profile
    

    to reload a basic environment if you can't get an editor to work right now.

    0 讨论(0)
  • 2020-12-04 00:49

    You can always run commands with absolute paths, like

    /bin/cp /etc/skel/.bashrc .bashrc
    
    0 讨论(0)
提交回复
热议问题