Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating Node.JS on Ubuntu 20.04 LTS From 10.x to 12.x+

#1
Hello, I've looked far and wide and couldn't remember the correct way on my ubuntu system so I will explain here for everyone and to have notes for myself lol.

So first off

update/upgrade

sudo apt update
sudo apt upgrade

install node who cares not gonna use it anyways.

sudo apt install nodejs

We NEED npm though, which probably doesn't come stock with nodejs.

sudo apt install npm

Alright check your versions

probably not what you want so continue.

sudo npm cache clean -f
sudo npm install -g n
sudo n stable


these 3 lines will update to the latest stable version. Don't use it if you need a specific version of node.

they say you can just run "n" and it will ask for version from there but that didn't work for me, i had to type this next line exactly as you see.

sudo n 12.13.0

^^^^^^^^^^

doing this put in the correct version of node on output node -v or node --version

Check for yourself now.

For some reason on my version of ubuntu within azure vm, couldn't use the version curling the github script that did the download for you.

Want to undo your changes?

Code:
sudo n rm 12.13.0     # replace number with version of Node that was installed
sudo npm uninstall -g n

Gotchu covered, need anymore help? Comment below. I'm here.

SickProdigy
[Image: RvghcKs.png]
Reply

#2
also how do i check to see what version of ubuntu i have.. i may have downloaded an older version in my haste to rid my machine of windows. also if i am out of date can i just update without having to delete and reinstall the entire OS?
Reply

#3
(11-29-2021, 02:07 PM)WilliamAsymn Wrote: also how do i check to see what version of ubuntu i have.. i may have downloaded an older version in my haste to rid my machine of windows. also if i am out of date can i just update without having to delete and reinstall the entire OS?

Code:
lsb_release -a

this should work for ubuntu

or try

Code:
cat /etc/os-release

or

Code:
hostnamectl
[Image: RvghcKs.png]
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

[-]
Discord

[-]
Active Threads
[Tut] How To Apply A Function To Each El...
Last Post: xSicKxBot
Today 04:46 PM
» Replies: 0
» Views: 0
(Indie Deal) Exotic Riddles Bundle, Dyin...
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 1
Mobile - Pokémon Sword and Shield myster...
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 0
.NET Framework January 2022 Cumulative U...
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 0
AppleInsider - Philips Hue gains trio of...
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 0
Fedora - Quarkus and Mutiny
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 1
News - Pokémon Unite Adjustments Arrive ...
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 1
Xbox Wire - Besiege Console (Game Previe...
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 0
News - Vulkan 1.3 Specification Released
Last Post: xSicKxBot
Today 04:45 PM
» Replies: 0
» Views: 0
(Indie Deal) Start saving early with Gea...
Last Post: xSicKxBot
Yesterday 05:23 PM
» Replies: 0
» Views: 42

[-]
Twitter



Discord Server © SickGaming.net 2012-2021