This write-up will focus on the tactic to set up Yarn on Ubuntu 22.04. So, let’s begin!
The best way to Set up Yarn on Ubuntu 22.04
To put in Yarn on Ubuntu 22.04, you need to comply with the below-given step-by-step directions.
Step 1: Replace system repositories
Press “CTRL+ALT+T” to open the terminal of the Ubuntu 22.04 and run the below-given command to replace system repositories:
$ sudo apt replace<span id=“more-59779”></span>
Step 2: Set up CURL on Ubuntu 22.04
After updating the Ubuntu 22.04 system repositories, execute the next command for CURL set up:
The given error-free output signifies that we’ve got efficiently put in CURL on our system:
Step 3: Import Yarn GPG key
Within the subsequent step, make the most of the “curl” command for importing the Yarn GPG key to Ubuntu system repositories:
$ curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add –
Step 4: Allow Yarn repository
After importing the GPG key, it’s a must to allow the Yarn repository in your Ubuntu 22.04 system. For this objective, write out the next command within the terminal:
$ echo “deb https://dl.yarnpkg.com/debian/ steady important” | sudo tee /and so on/apt/sources.checklist.d/yarn.checklist
Step 5: Set up Yarn on Ubuntu 22.04
You probably have fastidiously adopted the earlier steps, then at this level, your Ubuntu 22.04 system is all prepared for Yarn set up. To take action, execute the below-given command:
Enter “y” to allow the set up course of to proceed and anticipate a couple of minutes:
Step 6: Test Yarn model
To confirm if Yarn is efficiently put in or not, then test its put in model in your Ubuntu 22.04 system:
As you possibly can see that at present Yarn model “0.32+git” is put in on our system:
The best way to improve Yarn on Ubuntu 22.04
Wish to improve Yarn to the most recent model? If sure, then first set up “npm” in your system; in case you shouldn’t have it already:
Then, obtain the “Yarn” tarball and set up its newest model by writing out the next command within the Ubuntu 22.04 terminal:
$ sudo curl –compressed -o- -L https://yarnpkg.com/set up.sh | bash
As you possibly can see from the highlighted a part of the beneath output, Yarn put in on our system is upgraded to the most recent “1.22.18” model:
Lastly, execute the “yarn” command with the “–model” choice to substantiate that Yarn is upgraded to the most recent model:
We’ve got compiled the only methodology to put in Yarn on Ubuntu 22.04. Furthermore, the process to improve the present Yarn to the most recent model can be supplied to you.
To set up Yarn on Ubuntu 22.04, initially, set up CURL with the “$ sudo apt set up curl” command. After doing so, import the Yarn GPG key and allow its repository in your system. Then, execute the “$ sudo apt set up yarn” for Yarn set up. You may also make the most of the “$ sudo curl –compressed -o- -L https://yarnpkg.com/set up.sh | bash” to improve Yarn. This write-up mentioned the tactic to put in Yarn on Ubuntu 22.04.
Did you want this text?
Share it on any of the next social media channels beneath to provide us your vote. Your suggestions helps us enhance.