Setting up a frontend dev environment (Debian/Ubuntu)


# install Node
wget -qO- | sudo -E bash -
sudo apt install -y nodejs build-essential

# install Yarn
curl -sS | sudo apt-key add -
echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
  • The install script does apt update so no need to do it separately.
  • build-essential includes gcc, g++ and make as well as other packages.
  • If yarn global packages are not working, add Yarn to the $PATH.
echo -e "

## PATH - Yarn
export PATH=$PATH:`yarn global bin`" >> ~/.bashrc

Setting npm global defaults

# check the entire config
npm config ls -l

# check init related defaults 
npm config ls -l | grep init
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "/home/aamnah/.npm-init.js"
init-version = "1.0.0"
# npm config set <key> <value> -g
npm config set init-author-name 'Aamnah' -g
npm config set init-author-url '' -g
npm config set init-author-email '' -g
npm config set init-license 'CC BY-SA 4.0' -g
npm config set init-version '0.0.1' -g

# yarn config set <key> <value> [-g|--global]
yarn config set -g init-license 'CC BY-SA 4.0'
yarn config set -g init-version '0.0.1'


sudo apt install -y git 

git config --global 'Aamnah'
git config --global ''

Sublime Text

# 1. Install the GPG key:
wget -qO - | sudo apt-key add -

# 2. Ensure apt is set up to work with https sources:
sudo apt-get install apt-transport-https

# 3. Select the channel to use:
## Stable
echo "deb apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

## Dev
# echo "deb apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

# 4. Update apt sources and install Sublime Text
sudo apt update && sudo apt install sublime-text

Frontend tooling

yarn global add parcel-bundler