安装WSL:
docs.microsoft.com/en-us/windo…
-
安装 就是在powershell里运行
wsl --install -
安装完之后 需要重启机器 才能生效 否则在powershell里运行wsl 都不好使
-
安装rancher desktop不需要对wsl特意安装什么distribution
WSL 基本命令:
docs.microsoft.com/en-us/windo…
Windows 命令
wsl
wsl -- ifconfig eth0
wsl -d rancher-desktop -- ifconfig eth0
//关闭wsl
wsl --shutdown
//启动wsl
wsl
//启动wsl 并 跑rancher-destop这个distribution
wsl -d rancher-desktop
//将默认的distribution设置成rancher-destop
//-s是--set-default 的缩写
wsl -s rancher-desktop
//unregister ubuntu
wsl --unregister Ubuntu-20.04
wsl --list --running
wsl --list --online
wsl --list --verbose
wsl -l -v
//输出:
NAME STATE VERSION
* rancher-desktop Running 2
rancher-desktop-data Stopped 2
Linux 命令
cd /
ls
ps
ifconfig
exit
ping (hostname)
Google Cloud
gcloud init
gcloud auth login
gcloud auth configure-docker
gcloud docker --authorize-only
docker pull [image]:latest