How to install REACT on Ubuntu 20.04

React (also known as React.js or ReactJS) is an opensource front-end JavaScript library for web applications. It is maintained by the Facebook team and a community of individual developers and companies. It is a great tool for developing beautiful and dynamic UI.


Install React

To create and run a React app we need Node.js in our system. You can be assured if node.js is installed by the following command:

node -v

If the node.js is installed it will show the version. Otherwise node.js can be installed with following steps:

From home directory use curl to retrieve the installation files. Use the following commands:

cd ~
curl -sL -o

You can specify the version changing 14.x to your preferred version. You can learn about the versions from here. Now run the downloaded script with sudo:

sudo bash

The PPA will be added and the cache will be updated automatically. Now run:

sudo apt-get install -y nodejs

These steps will add node.js and npm in the system. You can be confirmed by running node -v. It will show the version of node.js in your system. Now install the create react app with the following command:

sudo npm install -g create-react-app

Check the version with:

create-react-app --version

You are ready to go. Now create a app and start developing!

I'm a Computer Science and Engineering student who loves to learn and spreading what is learnt. Besides I like cooking and photography!

Let me know your thoughts

Scroll to top
Share via
Copy link