Using Scotty on Windows#

Scotty has been tested on Windows with WSL2.

Installation#

The following will need Administrator permission

  • enable and install Windows subsystem for Linux 2 like described here.

    We recommend to use the Ubuntu virtual machine for WSL2.

    NOTE only version 2 of WSL is supported.

$ sudo apt update
$ sudo apt install openssh-server
  • install pip

$ sudo apt update
$ sudo apt install -y python3-pip

and finally install scotty

$ pip3 install avnet-scotty

Configure WSL2#

It is recommended to disable the /etc/resolv.conf updating. For that run from within the WSL2 VM

$ echo "[network]" >> /etc/wsl.conf
$ echo "generateResolvConf = false" >> /etc/wsl.conf

now close the WSL2 VM window.

Depending on the CPU count and the available RAM of your Windows machine you’ll need to configure the following:

From a cmd.exe on Windows

$ cd %userprofile%
$ notepad .wslconfig

Now add the following to the file

[wsl2]
processors=<Amount of RAM in GB / 4>
swap=<Free disk space in GB - 150>GB

so for a Windows PC with 16 cores, 16GB of RAM and 300GB of free disk space that would be

[wsl2]
processors=4
swap=150GB

save the file, close the window and run

$ wsl --shutdown

after that you can launch your WSL VM and start using scotty.

SSH keys#

For scotty to work properly you’ll need to create and reference SSH keys for Github, like described on this page.

Reusing your SSH keys from Windows#

In case you want to reuse your SSH keys from windows just run

$ mkdir -p ~/.ssh
$ cp /mnt/c/Users/<your Windows username>/.ssh/* ~/.ssh/
$ chmod 0400 ~/.ssh/id_*

Using WSL2 with VSCode#

You’ll need to install this extension in your VSCode and configure it like shown on the website.