Skip to main content
How To

Install Angular on Ubuntu

Angular is a popular JavaScript framework. Learn how to install Angular on Ubuntu.

Sagar Sharma

Angular is a JavaScript framework written in typescript and developed by google for one-page applications.

Yes, it's open-source too!

And in this guide, I will share how you can easily install angular on Ubuntu.

Installing Angular on Ubuntu

To install Angular, you must have node.js installed on your system.

There are two versioning schemes of the node.js:

  • The latest edition
  • The LTS (Long Term Support) edition

And here, I'm going to use the LTS version for installation and if you want to have the most recent one, you can check out our detailed guide for installing the node.js on Ubuntu:

How to Install Node.js on Ubuntu
Learn various ways of installing Node.js on Ubuntu, be it the recent version or the LTS version.

The node.js team provides the download scripts that will take care of adding the repository:

curl -fsSL | sudo -E bash

Once you execute the above command, all you are left to do is install the node.js:

sudo apt install -y nodejs

To verify the installation, you can check the installed version of node.js using the following command:

node --version
check installed version of node.js on ubuntu

npm is installed with node. However, it is recommended to update the npm as I was given the older version of npm by default:

sudo npm install npm@latest -g

Install Angular with npm

Now, you are done with all the prerequisites for Angular, all you are left with is to execute the following command and it will get angular installed on your system:

sudo npm install -g @angular/cli

Here, the -g option is used for global installation so every user on the system can access angular.

You can verify the installation of angular by checking the installed version:

ng version
check installed version of angular on ubuntu

And if things go smoothly, you should get similar output.

Get a $10 credit for Fathom, a privacy-focused website analytics company
Someone has shared a link with you that gives you $10 credit upon sign-up.

Want to update Node.js to the latest version?

If you want to update node.js to the latest version, we have a detailed guide covering multiple methods to do so:

Update Node.js version in Ubuntu Command Line
Learn how to update the Node.js version in Ubuntu command line to get a newer or the latest version.

And if you have any queries related to this guide let me know in the comments.

Sagar Sharma