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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!