Step by Step Guide on How to Install Angular on Ubuntu


For dynamic web applications, JavaScript open-source Angular is a basic set of the framework. It helps in developing a single-page web application which is an ideal space for mobile, desktop and web. It is a typescript-based application that uses class & objects to make the code more readable.

To build an application that can go live on the web version, desktop or even mobile, installing Angular is important along with other dependencies. In this article, we will help you cover the installation process of Angular on Ubuntu, let’s begin.

Installation procedure:

For Angularjs installation, Node.js and  NPM is required.

Nodejs is an open-source platform taking the charge to implement JavaScript code ahead of the browser. Nodejs allows developers to make good use of the script for developing a variety of applications. Whereas, NPM is a basic dependency manager tool, that allows installing of libraries, and tool that supports angular.

Steps to Follow during the installation:

1. Install Node.js

Before you start with the Angular installation, make sure you have Node.js installed. If you want to know why you need to install it before, since Angular is a JavaScript framework, for this reason, you need Node.js to be installed.

If you don’t it in your system, follow the command given below to add Node.js PPA in your Ubuntu system and further install it.

To test Node.js installation on the terminal, perform the below command to test the node.

After the installation of the Node.js and NPM, only then you can expect further processing and installation of Angular. So, let’s begin with the actual installation from now:

2. Install Angular/CLI

Install Angular after you have installed Node.js as well as NPM in your system. Use the command given below to install the tool in your system

The latest Angular version will be downloaded on your system of Ubuntu. In such instances, you may require on your machine the older Angular version. In order to install a specific version of Angular, make sure you follow the command given below:

Here, NPM is node package manager & g stands for installing the Angular CLI tool globally, which makes it accessible for all users & applications on the system.

Points to remember:

Setting up your Angular development environment will require you to configure tools like web pack, typescript, and other dependencies. This can be complex for a newbie in the Angular works. Several other tools can help you avoid the problem, and it can be through Angular CLI, the quickest, finest & easiest tool to manage development, testing, and building processes. It comes with production configuration pre-built and thus has access to a wide range of commands to manage your system.

To verify the installation, make sure you check the version of the Angular which is installed in your system. The checking can be done by using the ng command in Angular CLI.

3. Create a New Angular Application

You can create a new application and the name is “Hello Angular 4” by using the latest Angular tools. To make it work, follow the command given below:

This will then create a directory that would be named as angular-app in the current directory and then create an application.

4. Server Angular Application

After the successful completion of the above steps, your application is all set. Change the directory to angular-app and then run your application using the ng serve command. Only then you can see the difference.

Congratulations, as you have finally installed the @angular/cli without any discomfort. This Angular tutorial is an easy and fun way to make a quick and safe installation. This how you can install Angular on Ubuntu with the 4 steps given above, which are quick and simple. Now that you know the process, do follow it and see the results by yourself.


Add a Comment

Your email address will not be published. Required fields are marked *