Linux Dev Environment Setup

Linux Setup

This has links to information on setting up VS Code and Node on a Linux comuter.

laptop on a desk with vs code running
Photo by Clément Hélardot on Unsplash

Total Time Needed: 3 hours (estimate)

Steps to Setup Your Development Environment

Step 0: Disclaimer

I haven’t had a chance to test this out. I don’t have a Linux computer right now. I am also assuming that if you’re running Linux you’re used to Googling things and working out issues. Still, let me know if your’e running into problems.

Step 1: Make sure you have apt-get

VS Code is the code editor we will use in class. It’s made by Microsoft but it’s free, cross platform and integrates well with what we are doing.

  • Open the command prompt
  • Type the following and press return: 
sudo apt-get update

If that works, great. If not, force an install if the update fails by typing:

sudo apt-get -f install

Step 2: Install Visual Studio Code

VS Code is the code editor we will use in class. It’s made by Microsoft but it’s free, cross platform and integrates well with what we are doing.

Step 3: Install NVM

This is the Node Version Manager and will be used to install Node (next step). This page has these instructions in more detail (external link).

  • Open the command prompt.
  • Copy/Paste in this and hit enter (everything from curl to bash):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

It should install NVM and tell you you have to close the terminal or enter a command.

  • Test your install by typing: command -v nvm
  • you should just see: nvm
screenshot of terminal with command -v nvm entered

If not, the install didn’t work. Stop here and look back over the instructions, see the detailed link at the top of this step or ask Prof Stein for help.

Step 4: Install Node

Node is a handy tool that gives you access to a lock of command line developer tools. If you have ever seen a tutorial that started “It’s easy just npm install myThingy” and had no idea what that really meant, this will let you do that. Luckily if NVM is installed properly then installing Node is quick:

  • open Terminal (if it isn’t already open)
  • Copy/paste or type the following and press enter:
nvm install node

Node should install and tell you what version it is.

You can test by typing: node -v
It should show something like v15.7.0

Step 5: Install Git

First it helps to have a GitHub account so you can match your username and email. It makes working with GitHub easier

  • Create an Account on GitHub.com
  • Note your GitHub username and email.

Follow these steps to install Git:

  • Open the command prompt
  • run the following and type Y when it asks to continue
sudo apt-get install git
  • run the following and type Y when it asks to continue
sudo apt-get install libnss3-dev

You can test if git installed by typing this in the terminal:

git --version

It should show something like: git version 2.25.1

Username and Password

Now you need to set up your git username and password.

  • Copy and paste this into the terminal to change your username.
  • CHANGE “Your Actual Name” to be your gitHub username. For example: git config –global user.name “profstein”
  • After you’ve changed the username, Press Return.
git config --global user.name "Your Actual Name"
  • Copy and paste this into the terminal to set your email.
  • CHANGE “Your Actual Email” to be the email you used for GitHub. For example: git config –global user.email “myemail@gmail.com”
  • After you’ve changed the email, Press Return
git config --global user.email "Your Actual Email"

You may need to set up SSH keys to use GitHub:
https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

That’s it, you’re done (finally)!