• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

  • 00:43 lsb_release -a
  • 00:57 curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
  • 01:18 apt install nodejs
  • 01:36 node -v
  • 01:44 npm -v
  • 01:56 npm install -g n
  • 02:12 n bin 12.4.0
  • 02:27 vim /etc/profile
  • 02:46 source /etc/profile
  • 02:56 n 12.4.0
  • 03:07 n prune
  • 03:13 node -v
5769

To Install , update and manage Node.js with n Command On Ubuntu 19.04

Check the Ubuntu version by using the following command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 19.04
Release:	19.04
Codename:	disco

Add node.js yum repository and enable it in your system.

root@linuxhelp:~# curl -sL   https://deb.nodesource.com/setup_10.x | sudo -E bash -

## Installing the NodeSource Node.js 10.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://in.archive.ubuntu.com/ubuntu disco InRelease
Hit:2 http://security.ubuntu.com/ubuntu disco-security InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu disco-updates InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu disco-backports InRelease
Reading package lists... Done
.
.
.
## Run `sudo apt-get install -y nodejs` to install Node.js 10.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn

Install the node js by using the following command

root@linuxhelp:~# apt install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libpython-stdlib libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2
  python2-minimal python2.7 python2.7-minimal
Suggested packages:
  python-doc python-tk python2-doc python2.7-doc binfmt-support
The following NEW packages will be installed:
  libpython-stdlib libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib nodejs python python-minimal
  python2 python2-minimal python2.7 python2.7-minimal
0 upgraded, 11 newly installed, 0 to remove and 152 not upgraded.
.
.
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for desktop-file-utils (0.23-4ubuntu1) ...

Check the node js version by using the following command

root@linuxhelp:~# node -v
v10.16.0

Check the npm version by using the following command

root@linuxhelp:~# npm -v
6.9.0

Install the n package using npm command

root@linuxhelp:~# npm install -g n
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
+ n@4.1.0

Check the node js path by using the using the following command

root@linuxhelp:~# n bin 12.4.0
/usr/local/n/versions/node/12.4.0/bin/node

Enter into the etc/profile and edit the following changes

root@linuxhelp:~# vim /etc/profile
# nodejs PATH
export NODE_HOME=/usr/local/n/versions/node/12.4.0/bin/node
export PATH=$NODE_HOME/bin:$PATH
root@linuxhelp:~# source /etc/profile

Select the version of node that you want to keep by executing the following command.

root@linuxhelp:~# n 12.4.0

Run the following command to remove the previous version of node js

root@linuxhelp:~# n prune
node/10.16.0

Now check the version of node js version

root@linuxhelp:~# node -v
v12.4.0

with this the method to install , update and manage nodejs with n command on Ubuntu 19.04 comes to end

Tags:
elijah
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What are the functionalities of NPM in Node.js?

A

NPM (Node Package Manager) provides two functionalities:

-An online repository for Node.js packages
-Command line utility for installing packages, version management and dependency management of Node.js packages

Q

What is the difference between Node.js and Ajax?

A

Node.js and Ajax (Asynchronous JavaScript and XML) are the advanced implementations of JavaScript. They all serve completely different purposes.

Ajax is primarily designed for dynamically updating a particular section of a page’s content, without having to update the entire page.

Node.js is used for developing client-server applications.

Q

What are the features of Node.js?

A

Node.js is a single-threaded but highly scalable system that utilizes JavaScript as its scripting language

Q

Where can you use Node.js?

A

Node.js is used to build scalable programs especially web applications which are computationally simple but are frequently accessed

Q

What is Node.js?

A

Node.js is a server-side scripting based on Google’s V8 JavaScript engine

Related Tutorials in How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

Related Tutorials in How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

Related Forums in How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018

Related News in How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

Related News in How to Install, Update and Manage Node.js with n Command on Ubuntu 19.04

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Docker friendly Alpine Linux gets hardened Node.js
Docker friendly Alpine Linux gets hardened Node.js
Apr 19, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.