Skip to content

Instantly share code, notes, and snippets.

Created October 3, 2023 22:14
Show Gist options
  • Save max06/16cba081924c342dfee19b0326a8c9a2 to your computer and use it in GitHub Desktop.
Save max06/16cba081924c342dfee19b0326a8c9a2 to your computer and use it in GitHub Desktop.
The perfect developer setup for Win 10/11

Perfect Developer Setup for Windows 10/11

(in progress.)


This setup allows:

  • using Windows and Linux at the same time, without visible borders
  • keeping your dev projects separated
  • keeping your windows and linux clean without dependency pollution

Step by Step

Integrated SSH Agent

TODO: Add service config

  • First, ensure that you have OpenSSH installed on your Windows machine. It comes pre-installed with Windows 10 and 11, but you can install it via "Add or Remove Programs" if needed.
  • Next, generate an SSH key pair using ssh-keygen -t ed25519, if you don't have one yet.
  • Add your public SSH key to your GitHub account.
  • Also add the private key to your ssh agent: ssh-add $privatekey (usually in $HOME\.ssh\id_ed25519).

Setting Up Hyper-V

  • Install Hyper-V, a virtualization platform, using Settings -> Apps -> Optional Features -> More Windows Features. image

  • Reboot your machine if prompted.

Creating a Virtual Machine with Ubuntu Server

TODO: Minimal package config missing

  • Download the Ubuntu Server ISO from the official website.
  • Open Hyper-V Manager and create a new virtual machine. Don't use quick create.
  • Use Gen2.
  • Configure the max. dynamic memory and core-count after finishing the assistant.
  • Set the secure boot template to Microsoft UEFI Certificate Authority
  • During setup, provide your github username to the installer, so it can take care about your ssh public keys for you.

DHCP Reservation

  • In your router settings, set up a DHCP reservation for your Ubuntu Server VM's MAC address. This ensures it always gets the same IP address.

Installing Docker on the Virtual Machine

TODO: Replace with official docker repo

  • SSH into your Ubuntu Server VM using your private key.
  • Update the package list: sudo apt update.
  • Install Docker: sudo apt install
  • Start and enable the Docker service: sudo systemctl start docker and sudo systemctl enable docker.

Enabling IPv6 for Docker

TODO: Use private network+nat

  • Edit the Docker daemon configuration: sudo nano /etc/docker/daemon.json.
  • Add the following lines to enable IPv6:
      "ipv6": true,
      "fixed-cidr-v6": "2001:db8:1::/64"
  • Save and exit the file.
  • Restart Docker: sudo systemctl restart docker.

Adding the Virtual Machine to VSCode Remote SSH Extension

TODO: Provide actual ssh config snippet for proxy option

  • Install the "Remote - SSH" extension in Visual Studio Code.
  • Click on the green remote icon in the bottom-left corner of VSCode.
  • Choose "Add SSH Host" and enter the SSH connection details for your Ubuntu Server VM (IP address, username, and private key path).
  • Once connected, you can seamlessly work on your projects inside the VM using VSCode.

TODO: Add part about devcontainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment