How to Install Ionic Framework on Ubuntu 20.04

Ionic provides a set of tools for building native iOS and Android applications, and mobile-ready Progressive Web Apps, using familiar web libraries, frameworks, and languages. Ionic Capacitor is a cross-platform native bridge that allows you to turn any web project into a native iOS or Android mobile application.

In this tutorial, i am going to show you how to install the ionic framework on Ubuntu 20.04 using a terminal or command prompt.

How to Install Ionic Framework on Ubuntu 20.04

Just use the below given steps to install ionic in ubuntu 20.04 using terminal:

  • Step 1 – Open Terminal OR Command Prompt
  • Step 2 – Update APT Package
  • Step 3 – Install Node
  • Step 4 – Install Cordova
  • Step 5 – Install Ionic on Ubuntu 20.04
  • Step 6 – Create Ionic Application

Step 1 – Open Terminal OR Command Prompt

First of all, Open terminal or command line by pressing Ctrl+Alt+T key:

Step 2 – Update APT Package

Then execute the following command on command prompt or terminal to update Apt package list:

sudo apt update

sudo apt upgrade

Step 3 – Install Node

Now execute the following command on command prompt or terminal to install node and it’s package files:

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - 
sudo apt install nodejs

Step 4 – Install Cordova

Execute the following command on terminal to install Cordova on ubuntu:

sudo npm install -g cordova 

Step 5 – Install Ionic on Ubuntu 20.04

Execute the following command on your terminal to install ionic framework on ubuntu 20.04:

sudo npm i -g @ionic/cli

Then execute the following command on terminal to verify ionic framework installation in ubuntu 20.04:

ionic -v

Note that, The easiest way is to install ionic framework on Ubuntu 20.04.

Step 6 – Create Ionic Application

Now, Execute the following command on terminal to create a new Ionic application on your computer:

ionic start 

After that, follow the following steps and create your first ionic application:

  1. Select framework between React or Angular.
  2. Now, enter a name for your new application
  3. Select a starter template. The details of each template is listed on screen.
  4. Then, Integrate your new app with Capacitor to target native iOS and Android?

Now, run the below command from your application directory:

cd ionic-app ionic serve --host 0.0.0.0 --port 8100

Conclusion

In this tutorial, i have shown you how to install ionic framework on Ubuntu 20.04 using a terminal or command prompt.

Leave a Comment