优雅食用WSL
2021/5/18 18:55:38
本文主要是介绍优雅食用WSL,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
目录- 优雅食用WSL
- 效果展示
- 前置条件
- 相关软件安装
- 配置WSL SSH服务
- 配置termius SSH
- 参考文章地址
优雅食用WSL
效果展示
前置条件
windows10且版本支持WSL
相关软件安装
- WSL
在“启用或关闭Windows功能”中 勾选“适用于Linux的Windows子系统”选项,并确认(该操作需要重新启动Windows系统)
- Ubuntu termius
在Windows Microsoft Store中搜索并安装“termius”和“Ubuntu”
配置WSL SSH服务
-
打开linux虚拟机并等待安装成功
-
安装ssh服务
sudo apt-get install openssh-server
- 修改配置文件
编辑文件/etc/ssh/sshd_config并添加如下内容
# 端口配置 Port 6666 UsePrivilegeSeparation no # 密码验证 PasswordAuthentication yes # 允许登陆的用户 AllowUsers name
- 开启并验证SSH服务
# 开启服务 sudo service ssh --full-restart # 验证服务 ps -e | grep sshd
配置termius SSH
创建新的SSH连接并配置host和port为127.0.0.1:6666,并验证是否可以通过SSH正常连接WSL
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Sat May 15 19:55:50 CST 2021 System load: 0.52 Processes: 9 Usage of /home: unknown Users logged in: 0 Memory usage: 64% IPv4 address for wifi0: 192.168.31.63 Swap usage: 0% 26 updates can be installed immediately. 26 of these updates are security updates. To see these additional updates run: apt list --upgradable The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. chiale@LAPTOP-0JIALP82:~$ ls
此时可以看到已经成功配置
参考文章地址
Xshell连接WSL
这篇关于优雅食用WSL的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-07-02springboot项目无法注册到nacos-icode9专业技术文章分享
- 2024-06-26结对编程到底难不难?答案在这里
- 2024-06-19《2023版Java工程师》课程升级公告
- 2024-06-15matplotlib作图不显示3D图,怎么办?
- 2024-06-1503-Loki 日志监控
- 2024-06-1504-让LLM理解知识 -Prompt
- 2024-06-05做软件测试需要懂代码吗?
- 2024-06-0514-ShardingSphere的分布式主键实现
- 2024-06-03为什么以及如何要进行架构设计权衡?
- 2024-05-31全网首发第二弹!软考2024年5月《软件设计师》真题+解析+答案!(11-20题)