How to Install Angular on Ubuntu (18.04 & 16.04)

Angular is a TypeScript-based, open-source web application framework led by the Angular Team at Google. Angular is a complete rewrite from the team that built AngularJS.


First of all, you need to install node.js on your system. If you don’t have node.js installed use the following set of commands to add node.js PPA in your Ubuntu system and install it.

Step 1 – Install Node.js

In the below commands node 12 version will be installed to know more about other versions refer link

Step 2 – Install Angular/CLI

After installation of node.js and npm on your system, use following commands to install Angular cli tool on your system.

The -g flag will install the Angular CLI tool globally so that it will be accessible to all users and applications on the system.

The latest version of Angular CLI will be installed on your Ubuntu Linux system. You may require older Angular version on your machine. To install specific Angular version run command as following with version number.

Step 3 – Check Angular/CLI version

To verify the installation, check the version of Angular installed in your system using the ng command in Angular CLI:

Step 4 – Create a New Angular Application

Now, create a new application named hello-angular4 using the Angular CLI tools. Execute the commands to do this:

Step 5 – Serve Angular Application

After compilation you can access your angular application on localhost port 4200, Which is the default host and port used by Angular application.


You can change host and port for running Angular application by providing –host and –port command line arguments.