wsl

wsl host config

vim /etc/hosts

1
2
3
4
5
6
7
8
9
10
11
12
# This file is automatically generated by WSL based on the Windows hosts file:
# %WINDIR%\System32\drivers\etc\hosts. Modifications to this file will be overwritten.
127.0.0.1 localhost
# 127.0.1.1 ziggle-desk.localdomain ziggle-desk
127.0.1.1 ziggle-desk

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

ssh remote to wsl

sudo apt-get remove openssh-server

sudo apt-get install openssh-server

sudo vim /etc/ssh/sshd_config

修改配置

/etc/ssh/sshd_config

1
2
3
4
Port 2222  #默认的是22,但是windows有自己的ssh服务,也是监听的22端口,所以这里要改一下
UsePrivilegeSeparation no
PasswordAuthentication yes
AllowUsers youusername # 这里改成你登陆WSL用的

reboot ssh

sudo service ssh –full-restart

linux-brew install hisory version

1
2
3
4
5
brew uninstall <package> # Note 0
brew tap-new <yourname>/<package> # Note 1
brew extract --version <version_you_want> composer <yourname>/<package> # Note 2
brew install <package>@<version>
brew pin <package>@<version> # Note 3