Install and use vue js on ubuntu 22.04; Through this tutorial, we will learn how to install and use vue js on linux ubuntu 22.04 system using CLI or command line.
How to Install Vue js CLI in Ubuntu 22.04
Steps to install and use vue js in linux ubuntu 22.04 using terminal or command line(CLI):
- Step 1 – Update System Packages
- Step 2 – Install Node js and NPM
- Step 3 – Install Vue.js Ubuntu 22.04
- Step 4 – Create Vue.js Application
- Step 5 – Start Vue Js App Server
- Step 6 – Test Vue Js App
Step 1 – Update System Packages
First of all, open terminal or cli and execute the following command into it to update system packages before installing vue js on ubuntu 22.04:
sudo apt update sudo apt upgrade sudo apt install build-essential curl
Step 2 – Install Node js and NPM
Once the system packages has been updated, execute the following command on command line to add the Node.JS repository on linux ubuntu system:
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
Then execute the following commands on command line to install node js and npm js on linxu ubuntu 22.04:
sudo apt install nodejs sudo npm install npm@latest -g
Test the npm and node are installed by using the following command:
npm -v node -v
Step 3 – Install Vue.js Ubuntu 22.04
Execute the following command on command line to install vue js on ubuntu 22.4:
npm install vue@next
Or we can install the Vue CLI package using NPM. This package helps to set all tools required to create a new project in VueJS:
sudo npm install -g @vue/cli
Step 4 – Create Vue.js Application
Create Vue.js application by execute the following command on command line:
vue create tuts-project
Step 5 – Start Vue Js App Server
Start Vue.js application, so use the following command on command line:
cd tuts-project npm run serve
Step 6 – Test Vue Js App
Finally, open browser and hit the URL http://192.168.77.20:8080
.
Conclusion
Through this tutorial, we have learned how to install and use vue js on linux ubuntu 22.04 system using CLI or command line.