之前聽說Windows 10上面可以裝Linux了,一時(shí)興起,就搗鼓了起來(lái),長(zhǎng)時(shí)間不用了,結(jié)果又忘記root密碼。哎,老了,記不住事情了。所以就上網(wǎng)查了一下如何卸載Linux子系統(tǒng),再寫一篇筆記吧,免得以后又忘記了。
創(chuàng)新互聯(lián)公司是一家專注于成都做網(wǎng)站、網(wǎng)站制作、成都外貿(mào)網(wǎng)站建設(shè)與策劃設(shè)計(jì),薛城網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)公司做網(wǎng)站,專注于網(wǎng)站建設(shè)10多年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:薛城等地區(qū)。薛城做網(wǎng)站價(jià)格咨詢:13518219792打開CMD,輸入lxrun,就會(huì)提示這條命令的使用方法,見下:
C:\Users\admin>lxrun
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Usage:
/install - Installs the subsystem
Optional arguments:
/y - Do not prompt user to accept or create a subsystem user
/uninstall - Uninstalls the subsystem
Optional arguments:
/full - Perform a full uninstall
/y - Do not prompt user to confirm
/setdefaultuser - Sets the default subsystem user. If the user account does not exist it will be created.
Optional arguments:
username - Supply the username
/y - If username is supplied, do not prompt to create a password
輸入:lxrun /uninstall 就可以開始卸載原來(lái)的Linux子系統(tǒng)了。
C:\Users\admin>lxrun /uninstall
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
This will uninstall Ubuntu on Windows.
This will remove the Ubuntu environment as well as any modifications and new applications with the exception of:
C:\Users\admin\AppData\Local\lxss\home
C:\Users\admin\AppData\Local\lxss\root
Type "y" to continue: y
Uninstalling...
再輸入bash查看一下,驗(yàn)證Ubuntu已經(jīng)被卸載。
C:\Users\admin>bash
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...
接下來(lái)安裝Ubuntu Linux,輸入命令:lxrun /install
C:\Users\admin>lxrun /install
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms available here:
https://aka.ms/uowterms
Type "y" to continue: y
Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Error: 0x800706ba
擦,有Error,本機(jī)電腦沒有權(quán)限?查了一下,我確實(shí)沒有admin權(quán)限。但是我重試了一下,結(jié)果這次成功了。
不過又在網(wǎng)上查了一下,如果你重試了,還是不行,請(qǐng)參考下面的方法有可能解決你的安裝失敗問題:
在下面的啟用或關(guān)閉Windows功能里啟用適用于Linux的Windows子系統(tǒng),然后再試一遍吧。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。