Momwe mungayikitsire Linux pa Windows 10

Pin
Send
Share
Send

Pazosintha zokumbukira za Windows 10 version 1607, mwayi watsopano wopanga mapulogalamuwo - chipolopolo cha Ubuntu Bash, chomwe chimakupatsani mwayi wothamanga, kukhazikitsa mapulogalamu a Linux, kugwiritsa ntchito bash script mwachindunji mu Windows 10, onse omwe amatchedwa "Windows Subsystem for Linux". Mu Windows 10 yamasinthidwe a 1709 Fall Designers, magawo atatu a Linux apezeka kale kuti akhazikitsidwe. Pazinthu zonse, dongosolo la-bit-64 likufunika kuti liyike.

Maphunziro awa ndi okhudza momwe mungakhazikitsire Ubuntu, OpenSUSE, kapena SUSE Linux Enterprise Server pa Windows 10 ndi zitsanzo zogwiritsa ntchito kumapeto kwa nkhaniyo. Tiyeneranso kudziwa kuti pali zina zomwe simungathe kugwiritsa ntchito bash pa Windows: mwachitsanzo, simungathe kuyendetsa mapulogalamu a GUI (ngakhale iwo amanenera ma sear a X). Kuphatikiza apo, maofesi a bash sangayendetse mapulogalamu a Windows, ngakhale atakhala ndi mwayi wofikira pa OS file.

Ikani Ubuntu, OpenSUSE, kapena SUSE Linux Enterprise Server pa Windows 10

Kuyambira ndi Windows 10 Fall Creators Update (mtundu wa 1709), kukhazikitsa kwa dongosolo la Linux kwa Windows kwasintha pang'ono kuchokera pazomwe zinali m'mbuyomu (zamankhwala am'mbuyomu, kuyambira 1607, pomwe ntchitoyi idayambitsidwa mu beta, malangizowo ali gawo lachiwiri la nkhaniyi).

Tsopano zofunikira ndi izi:

  1. Choyamba, muyenera kuyambitsa "Windows Subsystem for Linux" mu "Control Panel" - "Mapulogalamu ndi Zinthu" - "Tembenuzani Windows kapena kuyatsa."
  2. Mukayika zofunikirazo ndikuyambiranso kompyuta, pitani ku Windows 10 App Store ndikutsitsa Ubuntu, OpenSUSE kapena SUSE Linux ES kuchokera pamenepo (inde, magawidwe atatu tsopano akupezeka). Mukatsitsa, ma nuances ena ndi otheka, omwe amafotokozedwanso mu zolemba.
  3. Yendetsani kugawidwa komwe mukutsitsa ngati pulogalamu ya Windows 10 ndikuchita zoyambitsa (username and password).

Kuti mupeze Windows Subsystem ya Linux gawo (gawo loyamba), mutha kugwiritsa ntchito lamulo la PowerShell:

Yambitsani-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Tsopano zolemba zochepa zomwe zingakhale zothandiza pa kukhazikitsa:

  • Mutha kukhazikitsa magawo angapo a Linux nthawi imodzi.
  • Mukatsitsa zigawo za Ubuntu, OpenSUSE, ndi SUSE Linux Enterprise Server ku Windows 10 Windows, ndaona mfundo yotsatirayi: mukangolemba dzina ndikanikizani Lowani, ndiye kuti zotsatira zomwe mukufuna sizikupezeka mukusaka, koma mukayamba kulemba ndikudina zomwe zikuwoneka, mumangofika tsamba lokhumba. Mungatero, ulumikizeni magawo ogulitsa: Ubuntu, OpenSUSE, SUSE LES.
  • Mutha kuyambitsanso Linux kuchokera pamzere wamalamulo (osati kuchokera pa tayala menyu Yoyambira): ubuntu, openuse-42 kapena males-12

Kukhazikitsa Bas pa Windows 10 1607 ndi 1703

Kukhazikitsa chipolopolo cha bash, kutsatira njira zosavuta izi.

  1. Pitani ku Windows 10 Zikhazikiko - Kusintha ndi Chitetezo - Kwa Otsatsa. Yatsani makina opanga mapulogalamu (intaneti iyenera kulumikizidwa kuti utsitse zida zofunikira).
  2. Pitani pagawo lolamulira - Mapulogalamu ndi zida zake - Sinthani Windows kapena kuyimitsa, onetsetsani bokosi "Windows Subsystem ya Linux".
  3. Pambuyo kukhazikitsa zigawo, lowetsani "bash" mu kusaka kwa Windows 10, yendetsa pulogalamu yomwe mukufuna ndikuyikhazikitsa. Mutha kukhazikitsa dzina lanu lolowera ndi chinsinsi cha bash, kapena kugwiritsa ntchito wosuta muzu popanda mawu achinsinsi.

Kukhazikitsa kungomalizidwa, mutha kuthamangitsa Ubuntu Bash pa Windows 10 kudzera pakufufuza, kapena kupanga njira yocheperako ku chipolopolo komwe mumafuna.

Ubuntu Shell Windows Zitsanzo

Poyamba, ndikuwona kuti wolemba si katswiri wa bash, Linux, ndi chitukuko, ndipo zitsanzo zomwe zili pansipa ndizongowonetsa kuti mu Windows 10 bash imagwira ntchito ndi zotsatira zomwe zikuyembekezeka kwa iwo omwe akumvetsa izi.

Ntchito za Linux

Mapulogalamu mu Windows 10 Bash amatha kukhazikitsa, kuchotsera, ndikusintha pogwiritsa ntchito apt-Get (sudo apt-Get) kuchokera posungira Ubuntu.

Kugwiritsa ntchito zolemba pamawu sikosiyana ndi Ubuntu, mwachitsanzo, mutha kukhazikitsa Git ku Bash ndikugwiritsa ntchito mwanjira zonse.

Zolemba za Bash

Mutha kuthamangitsa zolemba za Windows mu Windows 10, mutha kuzilemba mu Nano text edit zomwe zimapezeka mu chipolopolo.

Ma script a Bash sangathe kuyitanitsa mapulogalamu a Windows ndi malamulo, koma mutha kuthamangitsa zolemba za bash ndi malangizo kuchokera kumafayilo a bat ndi ma script a PowerShell:

bash -c "lamulo"

Mutha kuyesanso kuyendetsa mapulogalamu ndi mawonekedwe a Ubuntu Shell pa Windows 10, pali malangizo opitilira amodzi pa intaneti pankhaniyi ndipo tanthauzo la njirayi ndikugwiritsa ntchito Xming X Server kuwonetsa pulogalamu ya GUI. Ngakhale mwalamulo mwayi wogwira ntchito ndi Microsoft ntchito sizinatchulidwe.

Monga momwe zidalembedwera pamwambapa, sindine mtundu wa anthu amene angamvetse bwino za kufunika ndi magwiridwe antchito, koma ndikuwona momwe ndingagwiritsire ntchito ndekha: Maphunziro osiyanasiyana a Udacity, edX ndi ena okhudzana ndi chitukuko azikhala osavuta kupitilira, kugwiritsa ntchito zida zofunika mwachindunji mu bash (ndipo maphunziro awa nthawi zambiri amawonetsa kugwira ntchito mu MacOS ndi Linux bash terminal).

Pin
Send
Share
Send