All Projects → nicenemo → wsl-debian-boxes

nicenemo / wsl-debian-boxes

Licence: MIT license
Scripts to create multiple personalized WSL machines fast.

Programming Languages

powershell
5483 projects
shell
77523 projects

Projects that are alternatives of or similar to wsl-debian-boxes

idfx
Tool for flash/monitor ESP-IDF and ESP8266_SDK apps on the WSL2 ⚡
Stars: ✭ 71 (+222.73%)
Mutual labels:  debian, wsl2
wsl-distrod
Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
Stars: ✭ 1,637 (+7340.91%)
Mutual labels:  debian, wsl2
sicherboot
Unmaintained systemd-boot integration with secure boot support; consider https://github.com/Foxboron/sbctl instead.
Stars: ✭ 31 (+40.91%)
Mutual labels:  debian
ansible-roles
My Ansible roles for Debian/Ubuntu
Stars: ✭ 57 (+159.09%)
Mutual labels:  debian
ansible-role-backup
Ansible Role - Backup for simple servers
Stars: ✭ 122 (+454.55%)
Mutual labels:  debian
mirotalk
🚀 WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences Up to 4k and 60fps, compatible with all browsers and platforms.
Stars: ✭ 1,593 (+7140.91%)
Mutual labels:  debian
urbit-docker
No description or website provided.
Stars: ✭ 16 (-27.27%)
Mutual labels:  debian
TensorFlow-Raspberry-Pi
TensorFlow installation wheels for Raspberry Pi 32-bit OS
Stars: ✭ 18 (-18.18%)
Mutual labels:  debian
ansible-nodejs
Ansible role to set up the latest version of Node.js and npm in Debian-like systems
Stars: ✭ 14 (-36.36%)
Mutual labels:  debian
Mis-Comandos-Linux
📋 Lista descrita de mis 💯 comandos favoritos ⭐ en GNU/Linux 💻
Stars: ✭ 28 (+27.27%)
Mutual labels:  debian
scarecrow
A Raspberry Pi powered, distributed (edge) computing camera setups that runs a Tensorflow object detection model to determine whether a person is on the camera. A plugin model allows actions based on the detection, such as playing audio, turning on lights, or triggering an Arduino.
Stars: ✭ 87 (+295.45%)
Mutual labels:  debian
Shield
Harden and secure your Debian or Debian based OS, with this simple zero-configuration Debian bash script
Stars: ✭ 16 (-27.27%)
Mutual labels:  debian
mailserver
Simple and full-featured mail server using Docker
Stars: ✭ 88 (+300%)
Mutual labels:  debian
wnpp.debian.net
🌍 Code powering website "Debian Packages that Need Lovin'" created in 2009
Stars: ✭ 38 (+72.73%)
Mutual labels:  debian
kali-my-linux
Install Kali Linux Tools & Others on your Linux.
Stars: ✭ 37 (+68.18%)
Mutual labels:  debian
debianopt-repo
Additional debian repository for awesome open-source projects.
Stars: ✭ 47 (+113.64%)
Mutual labels:  debian
dotfiles
Config files for my linux rice
Stars: ✭ 60 (+172.73%)
Mutual labels:  debian
Pi-Trader
A cryptocurrency day-trading bot for Raspberry Pi.
Stars: ✭ 44 (+100%)
Mutual labels:  debian
Invidious-Updater
Automatic install and update script for Invidious
Stars: ✭ 181 (+722.73%)
Mutual labels:  debian
debiman
debiman generates a static manpage HTML repository out of a Debian archive
Stars: ✭ 145 (+559.09%)
Mutual labels:  debian

Automatically generated WSL Debian development environments

This project enables you to quickly create up to date WSL2 Debian instances for testing and development purposes. For this you need Windows 10 and hardware that is capable of running WSL2. For some background information I wrote this blog post

To use this, create a directory c:\wsl where you have rights to write. This is used to store your machine's disk images.

Next clone or get started download this project. In PowerShell navigate to the project.

PS C:\Users\Hans Kruse> git clone https://github.com/nicenemo/wsl-debian-boxes
PS C:\Users\Hans Kruse> cd wsl-debian-boxes
PS C:\Users\Hans Kruse\wsl-debian-boxes>

It needs to run from its directory. I did not make it more robust yet.

Start bootstrap-debian-images.PS1 to create tar balls for Debian:

  • 9 Stretch
  • 10 Buster
  • 11 BullsEye

Warning! You should not run the script below if you use the Debian distribution from the Windows store directly as your personal WSL environment. It will be destroyed!

 PowerShell.exe -ExecutionPolicy Bypass -File .\bootstrap-debian-images.PS1

When successful:

  • Three tar balls have been created.
  • The Debian machine was deleted.
  • The downloaded Debian Installation package was deleted.
  • The installed Windows store app was uninstalled.

Once you have created the tar balls, creating new machines is quite fast. Faster than installing them from the Windows store. It also allows you to easily create multiple identical machines with the same Linux distribution.

Machines can be created and personalized with the create-machine.PS1 script. This scrip and the related destroy-machine.PS1 will create virtual machines in c:\wsl. Change both scripts if you need it to be anywhere else.

  • A user is created with sudo rights without needing a password.
  • In the user's home directory a soft link winhome to the windows home directory of the user is created.
  • The created machines will start with the created user as default user.
  • An updated Ansible is installed in the user's ~/.local/bin.
  • ~/.local/bin is added to the user's path.
  • No further customization is done yet.

Three user environment variables need to be set before you can create machines with the provided script.

  • LINUX_USER Should be the Linux username of the single user that is created in the machine, e.g. kruse.
  • WIN_HOME Should be a Windows directory as seen from Linux. This will be soft linked as winhome in the Linux user's home directory, e.g. /mnt/c/Users/Hans\ Kruse. Note that spaces need to be escaped!
  • WSL_INSTALL_PATH The path where your Linux distribution should live, e.g. C:\WSL Please do not add an ending backslash

You can then give a name of the machine to be created and the tar ball to use as command line arguments.

In PowerShell:

PowerShell.exe -ExecutionPolicy Bypass -File .\create-machine.PS1 nemolinux debian-bullseye.tar

Cleaning up machines can be done with the destroy-machine.PS1 script.

PowerShell.exe -ExecutionPolicy Bypass -File .\destroy-machine.PS1 nemolinux

In the files directory, you will find the Debian package sources files that are used. You can modify them to use a local mirror. That might be faster than pulling them from the main Debian archives directly.

Beware of smart git on Windows!

Windows on git by default converts line endings to/from Linux/Windows. This will go horribly wrong if you edit the bash files from Windows. Either use git from WSL and edit files from WSL. You can turn off, line ending conversion on git in Windows. Bash files with Windows line endings do not run. This bit me once making small adjustments from Windows in bash files, while I was editing from WSL most of the day.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].