Install Node.js
First, download the latest stable version of Node.js here
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on a JavaScript Engine and executes JavaScript code outside a web browser, which was designed to build scalable network applications.
Source
Double-click the downloaded installer file.
Click on Continue, accept the license, select the destination of installation & enter your password.
After the install runs, you will see a Summary Page of the installation.
To verify the installation start by opening the terminal and type -node v to get the version of node freshly installed, and npm -v to get the version of npm added.
Install Angular Command-line interface
In order to download Angular CLI we can use npm which came with the node installation.
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command shell.
source
Type sudo npm install -g @angular/cli in the terminal window.
You will be asked whether you’d like to enable autocompletion (y/n) and to share anon usage data (y/n). Type your preferences and let the install run.
CLI Command Syntax
ng
[optional-arg] [options]
To see the available commands type ng help in the terminal.