Question
Change order of PATH variable
I upgraded a one-click node.js ubuntu 14.04 image to ubuntu 16.04.
The default node version is v4.2.1 and it is the old one on my 14.04 image. This old node executable is located on /usr/local/bin/. The newer node which comes with Ubuntu 16 is v4.6 and it is located on /usr/bin. I would like v4.6 to be the default node.js.
In my PATH variable, I discover that /usr/local/bin/ comes before /usr/bin. I think the solution would be to move /usr/bin before /usr/local/bin to use v4.6 as default node.js.
How can I modify PATH variable so that /usr/bin comes before /usr/local/bin? The order needs to be changed.
Thank you.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
THis is how my PATH look like.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games