惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Application and Cybersecurity Blog
Application and Cybersecurity Blog
The Register - Security
The Register - Security
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
量子位
C
Check Point Blog
博客园 - 【当耐特】
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
The Last Watchdog
The Last Watchdog
博客园 - Franky
N
Netflix TechBlog - Medium
Webroot Blog
Webroot Blog
A
About on SuperTechFans
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
D
Docker
S
Security Affairs
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
V2EX - 技术
V2EX - 技术
Jina AI
Jina AI
Help Net Security
Help Net Security
L
LangChain Blog
P
Proofpoint News Feed
The Cloudflare Blog
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Schneier on Security
Schneier on Security
Recent Announcements
Recent Announcements
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
Microsoft Security Blog
Microsoft Security Blog
H
Heimdal Security Blog
P
Proofpoint News Feed
O
OpenAI News
H
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
爱范儿
爱范儿
Security Archives - TechRepublic
Security Archives - TechRepublic

博客园 - 慕尘

在浏览器跑 Qwen2.5 LangExtract pgvector 向量数据库 Faiss Goose trafilatura unstructured python里使用Playwright python的jieba MinGW nomic-embed-text 解析非结构化数据 LangChain 的 DocumentLoader 能够使用require但不能使用import ChromaDB nvm-windows 使用js实现文字转语音 pyttsx3 Ollama笔记
使用 WSL 在 Windows 上安装 Linux
慕尘 · 2025-11-27 · via 博客园 - 慕尘

WSL(Windows Subsystem for Linux)是微软为 Windows 10/11 推出的“免虚拟机”兼容层,让你直接在 Windows 内核上原生运行 Linux ELF 二进制程序

Windows 11下

在管理员模式下打开 PowerShell

image

重启后会自动安装 Ubuntu

image

 开始下载并安装

image

常用命令

wsl -l -v                    # 查看已装发行版与 WSL 版本
wsl --shutdown               # 立即停掉所有 WSL 虚拟机
wsl -d Ubuntu -u root        # 以 root 身份启动

更新和升级包

sudo apt update && sudo apt upgrade

image

 因为PowerShell打开就是在 C:\WINDOWS\system32,所以挂载到了 Windows 的 C:\WINDOWS\system32目录下

image

安装go

下载

wget https://go.dev/dl/go1.25.4.linux-amd64.tar.gz

安装并设置环境变量

sudo tar -C /usr/local -xzf go1.25.4.linux-amd64.tar.gz
cd ~
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc
go version

image

在vscode里安装插件WSL

使用下面命令打开vscode和所在目录

 编写helloworld

cd ~
mkdir -p ~/projects/go-hello 
cd ~/projects/go-hello
code .

打开vscode

创建main.go

package main
import "fmt"
func main() {
    fmt.Println("🎉 Hello from Go in WSL!")
}

执行

输出 🎉 Hello from Go in WSL!