Install and use angular CLI with yarn

Install yarn package manager

curl -L https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt remove cmdtest
sudo apt install yarn

Check yarn global bin path

sudo yarn global bin

Install angular CLI

sudo yarn global add @angular/cli

Check ng command

ng --version

Set angular use yarn as default package manager

# angular 5
ng set --global packageManager=yarn
# angular 6
ng config -g cli.packageManager yarn