This quick tutorial guides you to install Angular 9 on any linux machine with compatible Node version setups.

Pre-requisites

Node 10.13+

  • Find the current Node.js version and if necessary, upgrade it. Install Node.js if Node.js is not available in your environment.
$ node -v

// if (node is not installed) : install node

// if (node version >= 10.13) : do nothing

// if (node version < 10.13)  : upgrade to 10.13 or latest stable node version using n module
$ sudo npm cache clean -f
$ sudo npm install -g n
$ sudo n stable
// alternatively, you can run `n #.#.#` to get a specific node version via n module
$ sudo n 10.15.3

Install

  • if you don’t have a current Angular installation in your environment, use below command to install exactly Angular 9 using npm.
$ npm install --global @angular/cli@9.0.0-rc.14
  • The above command will install angular 9.0.0-rc.14 which is the latest version at the time of writing. But to make sure you have the latest Angular release version in the future, run the below command too.
$ ng update @angular/core@9 @angular/cli@9
  • However, if your intention is to install the latest stable version or latest next release version, you can specify those too.
$ npm install --global @angular/cli
$ npm install --global @angular/cli@stable
$ npm install --global @angular/cli@next

Update

Updating Angular versions in your environment can break the currently-working Angular projects in your environment due to the version mismatches. Therefore, we highly recommend to stick into the official Angular update guide and update your Angular projects one-by-one before updating Angular versions globally in your environment. Once all projects are successfully updated to latest Angular version, you can then update the Angular version globally if you want.


βœ… Tested OS's : RHEL 7+, CentOS 7+, Ubuntu 18.04+, Debian 8+
βœ… Tested Gear : Cloud (AWS EC2), On-Prem (Bare Metal)

Leave a comment