//First, install node.js: https://nodejs.org/
//Run in your terminal
npm install -g @ionic/cli
//If there was a previous installation of the Ionic CLI, it will need to be uninstalled due to a change in package name.
$ npm uninstall -g ionic
$ npm install -g @ionic/cli
//source: https://ionicframework.com/docs/intro/cli