Skip to content

Instantly share code, notes, and snippets.

@Jakiboy
Created April 4, 2023 20:52
Show Gist options
  • Save Jakiboy/308964460d4ae5d54a1d3fbde328e7ab to your computer and use it in GitHub Desktop.
Save Jakiboy/308964460d4ae5d54a1d3fbde328e7ab to your computer and use it in GitHub Desktop.
WSL

WSL

⚡ Network

Host (Windows)

netsh interface ip add address "vEthernet (WSL)" 192.168.100.1 255.255.255.0
Configuration

@ .wslconfig

[wsl2]
memory=4GB
processors=2

@ hosts

192.168.100.2 {domain}
ipconfig /flushdns

Guest (Linux)

ip addr add 192.168.100.2/24 broadcast 192.168.100.255 dev eth0 label eth0:1;

⚡ Server

echo '%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service apache2 start' >> /etc/sudoers
echo '%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service mariadb start' >> /etc/sudoers
wsl sudo service apache2 start
wsl sudo service mariadb start
ln -s /mnt/d/server/www/html /var/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment