How to Install Yarn on Ubuntu 22.04 LTS

How to Install Yarn on Ubuntu 22.04 LTS

Install Yarn on Ubuntu 22.04 system; Through this tutorial, we will learn how to install yarn and configure yarn in ubuntu 22.04 system.

Yarn is an npm-compatible JavaScript package manager that automates the installation, updating, managing, and uninstalling procedure of npm packages. This application manager assists in caching every downloaded package and parallelizing processes to speed up the installation process. Whether you are a business user working on one-shot projects or a hobbyist, Yarn got you covered!

How to Install Yarn on Ubuntu 22.04 LTS

  • Step 1: Update system repositories
  • Step 2: Install CURL on Ubuntu 22.04
  • Step 3: Import Yarn GPG key
  • Step 4: Enable Yarn repository
  • Step 5: Install Yarn on Ubuntu 22.04
  • Step 6: Check Yarn version

Step 1: Update system repositories

Press “CTRL+ALT+T” to open the terminal of the Ubuntu 22.04 then execute the following command to update system repositories:

sudo apt update<span id="more-59779"></span>

Step 2: Install CURL on Ubuntu 22.04

Execute the following command for CURL installation; as follow:

sudo apt install curl

Step 3: Import Yarn GPG key

Execute the following command to importing the Yarn GPG key to Ubuntu system repositories:

curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

Step 4: Enable Yarn repository

Execute the following command to enable the Yarn repository on Ubuntu 22.04 system:

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Step 5: Install Yarn on Ubuntu 22.04

Execute the following command to install Yarn installation; as follow:

sudo apt install yarn

Step 6: Check Yarn version

Execute the following command to check its installed version on your Ubuntu 22.04 system:

yarn --version

Conclusion

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published.