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

推荐订阅源

C
Check Point Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
T
Troy Hunt's Blog
Project Zero
Project Zero
Security Archives - TechRepublic
Security Archives - TechRepublic
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
T
Tenable Blog
Jina AI
Jina AI
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
N
News | PayPal Newsroom
P
Palo Alto Networks Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
G
GRAHAM CLULEY
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Register - Security
The Register - Security
Last Week in AI
Last Week in AI
P
Privacy & Cybersecurity Law Blog
Microsoft Azure Blog
Microsoft Azure Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
SecWiki News
SecWiki News
S
Schneier on Security
有赞技术团队
有赞技术团队
IT之家
IT之家
美团技术团队
Cisco Talos Blog
Cisco Talos Blog
NISL@THU
NISL@THU
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Hacker News: Ask HN
Hacker News: Ask HN
罗磊的独立博客
博客园_首页
Cyberwarzone
Cyberwarzone
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Webroot Blog
Webroot Blog
Latest news
Latest news
D
DataBreaches.Net
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
宝玉的分享
宝玉的分享
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic

博客园 - 慕尘

在浏览器跑 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!