DEV Community

F53
F53

Posted on • Updated on

Environment setup stuff

Intro

A whole bunch of commands for setting up an environment to use Ruby, Node.js, and git on WSL.

node

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

restart

nvm install --lts
Enter fullscreen mode Exit fullscreen mode

ruby/rvm

sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
sudo usermod -a -G rvm $USER
Enter fullscreen mode Exit fullscreen mode

restart

rvm install 3.2.2 --default
gem update --system
Enter fullscreen mode Exit fullscreen mode

git

sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git
Enter fullscreen mode Exit fullscreen mode

Good config defaults

git config --global color.ui true
git config --global init.defaultBranch main
git config --global core. editor "code"
Enter fullscreen mode Exit fullscreen mode

Create an ssh key for github. Don't enter passwords, otherwise you will have to type them every time you try to push code.

ssh-keygen
Enter fullscreen mode Exit fullscreen mode

Copy your SSH key to the clipboard

cat ~/.ssh/id_rsa.pub | clip.exe
Enter fullscreen mode Exit fullscreen mode

Paste into https://github.com/settings/ssh/new

Top comments (0)