win11 使用 WSL2 安裝 linux 子系統(tǒng) ubuntu 出現(xiàn)錯誤:無法解析服務(wù)器的名稱或地址
解決方法:
1、修改 本地 host 文件。
記事本打開 C:\Windows\System32\drivers\etc\hosts 文件,
添加如下解析地址
#raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
2、刷新 DNS 解析緩存。
ifconfig /flushdns
3、再次運行查看或安裝命令
查看可安裝的 WSL
wsl --list --online
列出已安裝版本
wsl -l -v
查看運行 WSL 狀態(tài)
wsl --status
升級 WSL Linux kernel
wsl --update
wsl --install -d
wsl --install -d Ubuntu-20.04
文章來源:http://www.zghlxwxcb.cn/news/detail-860070.html
4、首次啟動新安裝的 Linux 發(fā)行版時,將打開一個控制臺窗口,
文章來源地址http://www.zghlxwxcb.cn/news/detail-860070.html
到了這里,關(guān)于win11 使用 WSL2 安裝 linux 子系統(tǒng) ubuntu 出現(xiàn)錯誤:無法解析服務(wù)器的名稱或地址的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!