If you don’t already know about Angular CLI, it’s a command-line interface tool that you use to initialize, develop and maintain Angular applications easily on compatible systems. Installing Angular CLI is also easy. Major versions of Angular CLI follow supported major versions. However, minor versions can be scheduled and released separately. A single workspace configuration file, angular.json, is created at the top level of the workspace. This is where you can set per-project defaults for CLI command options, and specify configurations to use when the CLI builds a project for different targets. Below is how to install and use Angular CLI on Ubuntu Linux.

How to install and use Angular CLI on Ubuntu Linux

As mentioned above, Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications. Here’s how to install it on Ubuntu Linux. First, open the Ubuntu command line console and run the commands below to install NVM. Next, run the commands to activate the NVM environment within your profile. Once the environment is activated, run the commands below to install Node.js. As of this writing, Angular v14 is the latest LTS version and supports Node.js 14 and 16 LTS versions. For this post, we’re going to be installing Node.js version 16 LTS. Run the commands below to do so. After installing, you can check the version of Node.js and NPM using the commands below: Once Node.js and NPM are installed, run the commands below to install the latest Angular CLI. If you wish to install individual versions, simply specify the version with the commands. Check the link below to view Angular CLI versions: https://github.com/angular/angular-cli/releases Check the Angular version by running the commands below. That should display an output similar to the lines below: To create, build, and serve a new, basic Angular project on a development server, go to the parent directory of your new workspace and use the following commands: Replace my-first-project with the name of the project folder you wish to use. After a successful build, you should see similar lines as below: In your browser, open http://localhost:4200/ to see the new application run. When you use the ng serve command to build an application and serve it locally, the server automatically rebuilds the application and reloads the page when you change any of the source files. That should do it! Conclusion: This post showed you how to install and use Angular CLI on Ubuntu Linux. If you find any error above or have something to share, please use the comment form below.