wsl管理操作
WSL
Issues found on WSL
项目地址:https://gitcode.com/gh_mirrors/ws/WSL
免费下载资源
·
查看正在运行的虚拟机:
wsl -l --running
设置固定ip地址:
netsh interface ip add address "vEthernet (WSL)" 172.29.108.1 255.255.255.0
wsl -d Debian -u root ip addr add 172.29.108.147/24 broadcast 172.29.108.255 dev eth0 label eth0:1
重启:
wsl环境下reboot和shutdown都是没有作用的,wsl可以通过windows命令行进行重启,使用管理员权限运行下面脚本实现重启:
rem 以管理员权限运行
net stop LxssManager
net start LxssManager
其他脚本(Linux 4.19.104、Debian 10、gcc 8.3.0):
/etc/apt/sources.list:
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
#运行 apt-get update 进行更新
/etc/vim/vimrc.tiny:
" set compatible
set nocompatible
启动sshd:
service ssh status
if [ $? != "0" ]; then
service ssh start
echo "sshd start..."
fi
GitHub 加速计划 / ws / WSL
17.09 K
797
下载
Issues found on WSL
最近提交(Master分支:2 个月前 )
86fa5afa
3 个月前
e899d0b7
3 个月前
更多推荐
已为社区贡献3条内容
所有评论(0)