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

推荐订阅源

Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Security Affairs
PCI Perspectives
PCI Perspectives
I
Intezer
V2EX - 技术
V2EX - 技术
S
Securelist
O
OpenAI News
S
Secure Thoughts
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
P
Proofpoint News Feed
月光博客
月光博客
博客园 - 叶小钗
Hacker News: Ask HN
Hacker News: Ask HN
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Schneier on Security
Schneier on Security
N
News | PayPal Newsroom
S
Schneier on Security
T
Threatpost
G
Google Developers Blog
P
Palo Alto Networks Blog
P
Privacy & Cybersecurity Law Blog
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cyber Attacks, Cyber Crime and Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
Google Online Security Blog
Google Online Security Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
D
DataBreaches.Net
Cyberwarzone
Cyberwarzone
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Webroot Blog
Webroot Blog
K
Kaspersky official blog
Security Latest
Security Latest
www.infosecurity-magazine.com
www.infosecurity-magazine.com

博客园 - 慕尘

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