public

Setup

Table of contents :

Introduction

Our programming exercises require a Unix-like OS (operating system), in particular GNU/Linux.

There are several ways to get a working Linux environment :

This document focuses on the latest method : “Windows Subsystem for Linux”. If you want to do it differently, ensure you still do the Configure tools part.

Install Windows 10

Skip this part if Windows 10 is up-to-date.

Prepare

You can check the video.

Install

You can check the video.

Wait for Windows 10 to be idle

Install updates

Install a web browser

You can check the video.

Skip this part if you have a modern & full-featured web browser (e.g. Chrome, Firefox, etc).

We recommend to use Firefox with the extension “uBlock Origin” and the additional filters lists :

Make sure to apply changes.

Install Linux

You can check the video.

Skip this part if you already have Debian (or similar system e.g. Ubuntu).

Install Windows Subsystem for Linux (WSL2)

Follow the guide : Windows Subsystem for Linux Installation Guide for Windows 10

To “Open PowerShell as Administrator”, right-click on the Start menu.

Install Debian

Install VSCode

You can check the video.

If you run Linux natively, go to Configure tools.

Download it from the official website. Run the installer, check all “Additional Tasks”.

Install remote extension

Launch VSCode, once started it should detect WSL and propose you to install the “Remote - WSL” extension, which is needed for the next steps.

Configure Linux

You can check the video.

Connect to remote WSL

Click on the bottom-left green button (overlay says “Open a remote window”), select “Remote-WSL: New Window”.

It will open a new VSCode window then install and run a server program in Linux to help VSCode running in its context.

The bottom-left green button (Remote Host) in the VSCode status bar should now indicate “WSL: Debian”.

You can close the previous VSCode window.

Configure tools

In the Menu Bar of VSCode, click on “Terminal”, then “New Terminal”.

A new panel should appear looking like :

user@DESKTOP-XXXXXXX:~$ █

This is a command-line interface, you can type commands and execute them pressing Enter. You can also complete your command using Tab ↹. For instance type “ec” :

user@DESKTOP-XXXXXXX:~$ ec█

Then press Tab ↹. The command will be completed to “echo” and a space is added, waiting for arguments to be provided, type “Hello World” then Enter :

user@DESKTOP-XXXXXXX:~$ echo Hello World
Hello World
user@DESKTOP-XXXXXXX:~$ █

echo is a program that displays text. Now you will execute commands that will install all the necessary programs you will need, this is the first one :

sudo apt update

Type the password you entered during Linux installation. When it’s over (the command prompt appears again) run the 3 next commands (we hide their output):

sudo apt -y upgrade
sudo apt -y install curl
curl https://raw.githubusercontent.com/01-edu/public/master/docs/setup/configure.sh | bash

Now you are able to push & pull code to Gitea using git.

Close the terminal (by using the shortcut Ctrl+D or typing the exit command)

Configure Go extension