How to Install Angular CLI on Ubuntu 20.04 LTS

Table of Contents

How to Install Angular CLI on Ubuntu 20.04 LTS



Using Angular CLI We can create our Angular JS application through the Command Line Interface (CLI). Besides creating unit tests, it also helps with developing end-to-end tests. With Angular CLI, you are able to use an Angular framework in command line mode very easily to build and scaffold Angular apps on the NG-conference. You can also automate your development process by using this tool. Now let’s look at the installation process




For Ubuntu systems to be registered with VPSie, you need to create a VPSie account if you don’t have one already.

Our example is based on an Ubuntu instance with GUI installed. Here is a link that will guide you to installing Ubuntu’s GUI if you do not already have it installed.

Now open your terminal and run the following commands to update your system.


# apt-get update && apt-get upgrade -y




Step 1: Install Node Js


You can get the latest version of node js from the official website and download it. After downloading it follow the following commands:



VPSie Node js installation




Go to download folder:

# cd Downloads/



Run the following to create a directory with root folder:

# sudo mkdir -p /usr/local/lib/nodejs


Unzip and copy the downloaded file to the folder that we just created:

# sudo tar -xJvf node-v16.14.2-linux-x64.tar.xz -C /usr/local/lib/nodejs



Now open the a file using the following command and add the lines given below.

# sudo nano ~/.profile



Lines to add:

export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH



After saving it run the following command:

# . ~/.profile




Now check the versions:

# node --version
# npm --version


VPSie Angular CLI installation

Step 2: Install Angular CLI

Run the following command to install Angular CLI


# npm install -g @angular/cli
vpsie Angular CLI installation

Check the installation using the following command:

# ng --version




We have successfully installed Angular CLI on your Ubuntu Instance. Thank you for taking the time to read this.



Share on
VPSie Cloud service

Unlock Your

20% Discount

The First 3 orders get 20% discount! Try Sign up on VPSie to get a chance to get the discount.