Skip to content

Instantly share code, notes, and snippets.

View traebon's full-sized avatar
🏠
Working from home

Trae traebon

🏠
Working from home
View GitHub Profile
@macvinpinto
macvinpinto / install-docker-wsl2.sh
Created April 29, 2023 07:08
Install docker on wsl2 without docker desktop
# https://nickjanetakis.com/blog/install-docker-in-wsl-2-without-docker-desktop
# Install Docker, you can ignore the warning from Docker about using WSL
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add your user to the Docker group
sudo usermod -aG docker $USER
# Install Docker Compose v2
@jason-bivins
jason-bivins / UbuntuDesktopVM.md
Last active September 30, 2024 17:23
AzureNotes

Ubuntu test machine setup guide

Walks you through:

  • Creating an ubuntu VM in azure
  • Installing a GUI and reconnecting via RDP
  • Installing sys reqs for Docker Desktop
  • Installing Docker Desktop

Install Multiple Instances of WSL2 Linux on Windows 11

Here's an easy method which allows you to install multiple instances of any Linux Distro in any location under WSL2.

** Click on each heading to reveal instructions **

If you HAVEN'T installed WSL2 prior to this, open up a Powershell terminal and execute the following commands:

#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.15.90.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23800
@mbwhite
mbwhite / commands
Last active May 5, 2023 04:58
WSL2 - docker buildx
# start docker - this is a helper script created to start docker as wsl2 doesn't use systemd
docker-start
ping github.com
# why a ping here? emperiically I've determined this has to occur
# otherwise for me the docker daemon messes up dns.
# don't know why, ymmv
wget https://gist.githubusercontent.com/ArturKlauser/0f0293c62f5626df0261ac994d8a46af/raw/d5863dfc22e6d65fd912c9ec760dcdc86ea320cc/check-qemu-binfmt.sh
chmod +x check-qemu-binfmt.sh
@Ragdata
Ragdata / docker-WSL2.md
Last active May 5, 2023 04:55
Docker in Windows 11 using WSL2

Setup Docker to run on Windows 11 & Ubuntu WSL2 AND still be able to use Docker Desktop to monitor the lot!!

The goal here is to set up a container cluster using WSL2, Ubuntu Linux, and other Open Source packages. The secondary goal being to be able to use it from both Linux and Windows AND to be able to still use Docker Desktop under either Windows or Linux to manage things.

To do so, we need to setup WSL2, Ubuntu, dockerd and containterd, then build docker-cli for Windows and finally wire them all together so they can talk to each other.

Prerequisites

First you need to set up Windows so that you can use virtualised containers, as well as WSL2. Type the following in a terminal:

@Jacobboogiebear
Jacobboogiebear / kernel_patch.sh
Last active May 14, 2024 21:09
kernel patch for KVM on Windows WSL2
cp Microsoft/config-wsl .config
sed -i 's/# CONFIG_KVM_GUEST is not set/CONFIG_KVM_GUEST=y/g' .config
sed -i 's/# CONFIG_ARCH_CPUIDLE_HALTPOLL is not set/CONFIG_ARCH_CPUIDLE_HALTPOLL=y/g' .config
sed -i 's/# CONFIG_HYPERV_IOMMU is not set/CONFIG_HYPERV_IOMMU=y/g' .config
sed -i '/^# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set/a CONFIG_PARAVIRT_CLOCK=y' .config
sed -i '/^# CONFIG_CPU_IDLE_GOV_TEO is not set/a CONFIG_CPU_IDLE_GOV_HALTPOLL=y' .config
sed -i '/^CONFIG_CPU_IDLE_GOV_HALTPOLL=y/a CONFIG_HALTPOLL_CPUIDLE=y' .config
sed -i 's/CONFIG_HAVE_ARCH_KCSAN=y/CONFIG_HAVE_ARCH_KCSAN=n/g' .config
sed -i '/^CONFIG_HAVE_ARCH_KCSAN=n/a CONFIG_KCSAN=n' .config
make -j 8
@vittring
vittring / config-wsl-arm64
Last active May 5, 2023 04:46
config-wsl-arm64
#
# Automatically generated file; DO NOT EDIT.
# Linux 5.x Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-msft-linux-gcc (GCC) 9.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90300
CONFIG_LD_VERSION=234000000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@klo2k
klo2k / gist:fe794f107c11292ba47b4d052c547983
Created February 12, 2022 08:01
Install virt-manager in Windows 11 WSL (qemu, Windows Subsystem for Linux)
# Inside WSL...
# Install virt-manager
sudo apt install -y virt-manager
# Add youself to kvm and libvirt group
sudo usermod --append --groups kvm,libvirt "${USER}"
# Fix-up permission to avoid "Could not access KVM kernel module: Permission denied" error
sudo chown root:kvm /dev/kvm
@warifmust
warifmust / RN_first_time_setup.md
Created May 2, 2021 03:27
React Native Setup on new OS(Windows 10 or Linux/WSL)

For Windows

TBC

For Linux/WSL

  1. Install Android Studio

// Windows install
https://developer.android.com/studio/install -> Windows
// Linux CLI
https://developer.android.com/studio/install -> Linux