Ubuntu Install Instructions#

These instructions will walk you through installing the required Computer Science software stack for COSC 123. Before starting, ensure that your laptop meets the minimum requirements:

  • runs one of the following operating systems:

    • Macs:

      • Latest: macOS 12.5

      • Recommended: macOS 10.14.6 or higher

      • Required: macOS 10.11 (El Capitan)

    • Windows:

      • Latest: Windows 11

      • Recommended: Windows 10 (64-bit) or higher

      • Required: Windows 7 or higher

    • Ubuntu:

      • Latest: Ubuntu 21.10

      • Recommended: Ubuntu 20.04 or higher

      • Required: version 18.04

  • can connect to networks via a wireless connection

  • has at least 25 GB disk space available

  • has at least 4 GB of RAM

  • uses English as the default language (if you want TAs or the instructor to help you)

  • student user has full administrative access to the computer

We will do our best to help you if your laptop does not meet the minimum requirements, but there are no guarantees we will be able to get things to work so be warned.

Web browser#

You are welcome to use most modern browsers that have a WebKit or Gecko backend. Safari, Firefox, Vivaldi, Brave, Edge are all recommended. Google Chrome is not recommended because of the well-documented privacy and tracking issues with Google.

Zoom#

We will be using Zoom in this course for the classes, as well as the labs, and student hours. It is very important that you have the most recent version of Zoom installed, as we will be using many of the features that are only available in more recent versions.

The latest version of Zoom as of January 2022 is: 5.9.1 (3506). You can ensure you have the latest version of Zoom by clicking “Check for Updates” as shown in the screenshot below.

Zoom 'Check for Updates' showing the latest version of Zoom is installed.

Important

Please note that if you have been relying on the “web version” of Zoom that works only in a browser, this will not work for this course! Please make sure to download the Zoom desktop client for your operating system to fully participate in the course.

GitHub.com account#

Sign up for a free account at GitHub.com if you don’t have one already. Your GitHub username is important, here’s how to find your username:

Pointing to the top right once you log into GitHub.com to identify your username.

Visual Studio Code#

The open-source text editor Visual Studio Code (VS Code) is both a powerful text editor and a full-blown Integrated Development Environment (IDE). You can download and install the macOS version of VS Code from the VS code website https://code.visualstudio.com/download. Once the download is finished, click “Open with Archive utility”, and move the extracted VS Code application from “Downloads” to “Applications”.

Configure your machine to launch VS Code from the Terminal (aka command line)#

  1. Launch VS Code.

  2. Open the Command Palette (⇧⌘P ; shift+command+P).

  3. Type ‘shell command’ to find the “Shell Command: Install ‘code’ command in PATH” command.

  4. Hit Enter

  5. Restart the terminal for the new $PATH value to take effect.

You can open files in VS Code from the Terminal! Alternatively, just type code . in any folder to start editing files in that folder.

You can test that VS Code is installed and can be opened from Terminal by restarting terminal and typing the following command in a Terminal:

code --version

you should see something like this if you were successful:

1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64

Manual install instructions are here, but remember you’re using the zsh now! steps as well.

Setting VS Code as the default editor#

To make programs run from the terminal (such as git) use VS Code by default, we will modify the bash configuration file ~/.bashrc. First, open it using VS Code:

code ~/.bashrc

Append the following lines:

# Set the default editor for programs launch from terminal
EDITOR="code --wait"
VISUAL=$EDITOR  # Use the same value as for "EDITOR" in the line above

Then save the file and exit VS Code.

Most terminal programs will read the EDITOR environmental variable when determining which editor to use, but some read VISUAL, so we’re setting both to the same value.

VS Code extensions#

The real magic of VS Code is in the extensions that let you add languages, debuggers, and tools to your installation to support your specific workflow. Now that we have installed all our other Data Science tools, we can install the VS Code extensions that work really well with them. From within VS Code you can open up the Extension Marketplace (read more here) to browse and install extensions by clicking on the Extensions icon in the Activity Bar indicated in the figure below.

To install an extension, you simply search for it in the search bar, click the extension you want, and then click “Install”. There are extensions available to make almost any workflow or task you are interested in more efficient! To do this, search for and install the following extensions:

  • Extension Pack for Java (0.25.7) by Microsoft

  • Processing Language (1.4.6) by Avin Zarlez

  • markdownlint (v0.49.0) by David Anson

GitHub.com#

We will use the publicly available GitHub.com. You should have already created a GitHub.com account during the lectures, if you have not, you should do so ASAP.

Git and GitHub#

We will be using the command line version of Git. Some of the Git commands we will use are only available since Git 2.23, so if you’re Git is older than this version, we ask you to update it using the following command:

sudo apt update
sudo apt install git

You can check your git version with the following command:

git --version

Configuring Git user info#

Next, we need to configure Git by telling it your name and email. To do this type the following into the terminal (replacing Jane Doe and janedoe@example.com, with your name and email (the same you used on GitHub), respectively):

git config --global user.name "Jane Doe"
git config --global user.email janedoe@example.com

Note: to ensure that you haven’t made a typo in any of the above, you can view your global Git configurations by either opening the configuration file in a text editor (e.g. via the command code ~/.gitconfig) or by typing git config --list --global.

Create your GitHub “Personal Access Token”#

This is a bit tricky, so please make sure you follow these directions carefully.

  1. Create a Personal Access Token on GitHub.com by clicking this link: settings/tokens; make sure to COPY the token that they give you, it is basically a special password that you can use in the Terminal. Detailed steps are:

  • Log in to GitHub.com,

  • Click your picture in the top right,

  • Click Settings,

  • Click Developer Settings

  • Click “Personal access tokens”, set the appropriate permissions at the “repo” level (see gif below):

../../_images/GitHubcreatePAT.gif
  • Set the Expiration to “No Expiration”

  • Click “Generate new token”

  • Save this token somewhere on your computer, you will need it when you clone a repository to your computer.

  • Don’t share your token with anyone and protect it like it’s your password! You will not be able to come back to this page to get your token. If you forget it, or lose it, you can just delete the token and create another one.

Warning

Please make sure you set the expiration date of the personal access token to be “No Expiration”, otherwise you will lose access to GitHub at the WORST possible time and have to do this again.

../../_images/github_PAT_expiration.png

Processing#

To install the Processing Development Environment (PDE), you should follow these steps:

  1. Visit the download page.

  2. Download the installer for the latest version (v4.0 beta 2) your operating system (Windows, macOS, or Linux)

  3. See the installation instructions for your operating system (adapted from here):

    • On Windows, you’ll have a .zip file. Double-click it, and drag the folder inside to a location on your hard disk. I suggest a location where your other programs are stored. Once it’s moved out of the unzipped folder, you can double-click processing.exe to start.

    • On macOS, the installer is also a .zip file. Double-click it and drag the Processing icon to the Applications folder. Then double-click the Processing icon to start.

    • The Linux version is a .tar.gz file. Download the file to your home directory, then open a Terminal window, and type: tar xvfz processing-4.0b2-linux64.tgz. This will create a folder. Then change to that directory: cd processing-4.0b2 and then run it by typing ./processing.

That’s it!#

You have completed the installation instructions, well done 🙌! Remember to add a screenshot as instructed in your lab!

Attributions#

Important

This guide has been (lightly) adapted from the UBC-Vancouver MDS Install stack under a CC-BY-SA 4.0 license.