

| # 官方参考:https://docs.microsoft.com/zh-cn/windows/wsl/install-manual |
| # 参考:https://zhuanlan.zhihu.com/p/386590591 |
| # 安装步骤:使用命令安装wsl linux内核,再打开Microsoft Store安装linux分发版 |
| # 分发版安装后输入用户名和密码 |
| # 报错(用户名只能小写):adduser - “Failed to create user” due to regular expression error - Ask Ubuntu |
| |
| |
| wsl --install |
| |
| wsl -l -o |
| wsl --install -d Ubuntu |
| # 参考:https://www.cnblogs.com/aymar/p/14522403.html |
| |
| # 安装内核,下载发行版,双击发行版直接安装 |
| # 安装完成后设置用户名和密码 |
| # 备份配置文件 |
| cp /etc/apt/sources.list /etc/apt/sources.list.bak |
| # 编辑配置文件 |
| vim /etc/apt/sources.list |
| # 配置为如下内容 |
| deb http: |
| deb-src http: |
| |
| deb http: |
| deb-src http: |
| |
| deb http: |
| deb-src http: |
| |
| deb http: |
| deb-src http: |
| |
| deb http: |
| deb-src http: |
| apt update |
| |
| # 更新时报错:Err:1 http://mirrors.aliyun.com/ubuntu xenial InRelease Temporary failure |
| |
| # 更改dns |
| sudo vi /etc/resolv.conf |
| # 将nameserver 127.0.0.53改为如下: |
| nameserver 8.8.8.8 |
| nameserver 8.8.4.4 |
| |
| # 参考:https://www.cnblogs.com/ellen-mylife/p/14681022.html |
| # 安装curl |
| sudo apt-get install \ |
| apt-transport-https \ |
| ca-certificates \ |
| curl \ |
| software-properties-common |
| |
| # 添加docker源 |
| curl -fsSL https: |
| |
| sudo add-apt-repository \ |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |
| $(lsb_release -cs) \ |
| stable" |
| |
| sudo apt-get update |
| |
| # 安装docker |
| sudo apt-get install docker-ce |
| |
| # 验证是否安装成功 |
| docker version |
| docker -v |
| |
| # 启动docker,之后就可以拉取镜像了 |
| sudo service docker start |
| |
| # 参考:https://blog.csdn.net/weixin_36182972/article/details/104898438 |
- 报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
2021-07-22 ubuntu入门