haiduo的个人博客分享 http://blog.sciencenet.cn/u/haiduo

博文

WSL使用教程

已有 5192 次阅读 2020-10-10 12:49 |个人分类:软件工具|系统分类:科研笔记

1. 安装wsl2https://docs.microsoft.com/en-us/windows/wsl/install-win10

2. Export and Import WSL Linux Distro in Windows 10https://winaero.com/blog/export-import-wsl-linux-distro-windows-10/

3. 查看windows版本号:win+R  输入:winver

4.查看查看已安装的WSL发行版及其名称列表  wsl --list --all 

5.打开导入的Linux发行版wsl --distribution <DistributionName>

6. 移除导入的 Linux发行版 :wsl.exe --unregister <DistributionName>

5.WSL操作https://docs.microsoft.com/zh-cn/windows/wsl/wsl-config

7.问题:

clipboard.png

参考:https://www.altaro.com/hyper-v/understanding-working-vhdx-files/

解决:直接再磁盘管理新建卷就行。

8.在WSL 2中启用NVIDIA CUDA:https://docs.microsoft.com/zh-cn/windows/win32/direct3d12/gpu-cuda-in-wsl

9. 检查分配给已安装的每个Linux发行版的WSL版本:wsl -l -v

10.设置默认分发版:wsl -s <DistributionName>wsl --setdefault <DistributionName>

11.取消注册分发版:wsl --unregister <DistributionName>

12.以指定用户的身份运行: wsl -u <Username>, wsl --user <Username>

13.运行特定的分发版:wsl -d <DistributionName>, wsl --distribution <DistributionName>

14. GPU 加速机器学:https://docs.microsoft.com/zh-cn/windows/wsl/tutorials/gpu-compute

15. 安装CUDA:https://docs.nvidia.com/cuda/wsl-user-guide/index.html




https://wap.sciencenet.cn/blog-3452308-1253830.html


收藏 IP: 58.206.100.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-27 01:02

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部