How do I add the NodeSource repository to my Ubuntu 22.04 system?

Responsive Ad Header

Question

Grade: Education Subject: Support
How do I add the NodeSource repository to my Ubuntu 22.04 system?
Asked by:
65 Viewed 65 Answers

Answer (65)

Best Answer
(249)
To add the NodeSource repository, you first need to download and execute their setup script. For example, to install Node.js 20 (the current LTS as of this writing), you would run: `curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -`.