On Debian or Ubuntu Linux, you can install Yarn via our Debian package
repository. You will first need to configure the repository:
On Ubuntu 16.04 or below and Debian Stable, you will also need to configure the NodeSource repository to get a new enough version of Node.js.
Then you can simply:
sudo apt update && sudo apt install yarn
Note: Ubuntu 17.04 comes with cmdtest installed by default. If you're getting errors from installing yarn, you may want to run sudo apt remove cmdtest first. Refer to this for more information.
If using nvm you can avoid the node installation by doing:
sudo apt update && sudo apt install --no-install-recommends yarn
Note: Due to the use of nodejs instead of node name in some distros, yarn might complain about node not being installed. A workaround for this is to add an alias in your .bashrc file, like so: alias node=nodejs. This will point yarn to whatever version of node you decide to use.
{% include_relative _installations/unix_path_setup.md %}