windows 中 debian 使用记录
Ehoac Lv3

国内程序源

兰州大学镜像站

1
2
3
4
5
6
7
8
9
deb http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free

deb-src http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free

ssh

1
2
sudo apt-get install openssh-server #安装ssh
sudo service ssh --full-restart #完整启动 ssh service
  • 配置文件:/etc/ssh/sshd_config
1
2
#PasswordAuthentication yes
#PermitRootLogin yes

网络工具

1
2
sudo apt install net-tools # 安装网络工具
ifconfig #查看ip

子系统 ssh 开机自动启动

1
2
3
4
5
6
1. win+r 输入 shell:startup 进入启动目录
2. 增加startservice.vbs启动程序, 重启或者直接命令行执行测试
```vbs
Set ws = CreateObject("Wscript.Shell")
ws.run "wsl -d debian -u root service ssh --full-restart", vbhide
```
 评论