How to Install Yarn in Ubuntu 22.04 LTS

How to Install Yarn in Ubuntu 22.04 LTS

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!

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 using command line or terminal.

How to Install Yarn on Ubuntu 22.04 LTS

Steps to install and configure yarn in ubuntu 22.04 using terminal or command line:

  • 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

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including 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. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *