Munguva yazvino yekombuta, kugarisana kwakawana basa rakakosha Kune vashandisi. With Windows 10 uye Linux Subsystem yayo yeWindows (WSL) chimiro, vagadziri uye vanofarira tekinoroji vava kugona kuisa uye kumhanyisa kugovera kweLinux pamakina avo zviri nyore zvisati zvamboitika. Munyaya ino, tichaongorora nhanho nhanho sei kuisa linux muWindows 10 uchishandisa WSL, ichipa vashandisi mhinduro yakapusa uye ine simba yekutora mukana wezvakanakisa zvepasirese: the operating system inonyanya kufarirwa uye kushanduka uye kugadzikana kwenzvimbo yeLinux.
1. Nhanganyaya kuWindows Subsystem yeLinux (WSL)
Windows Subsystem yeLinux (WSL) chishandiso chakagadzirwa neMicrosoft chinobvumira vashandisi kumhanyisa Linux kugovera zvakananga paWindows system. Izvi zvinopa vanogadzira uye masisitimu maneja kugona kushandisa Linux maturusi nemirairo pasina kuisa yakaparadzana partition kana chaiwo muchina.
Kuisa WSL inzira inokurumidza uye iri nyore. Kutanga, iwe unofanirwa kuve nechokwadi kuti une yakagadziridzwa vhezheni Windows 10 uye gonesa iyo WSL chimiro muWindows maficha. Unogona kusarudza kugovera kwaunoda kushandisa, seUbuntu kana Debian, kubva kuMicrosoft Store. Kana kugoverwa kwaiswa, unogona kuiwana kubva kuWindows kutanga menyu uye tevera matanho ekutanga ekugadzirisa.
Kana yangogadziriswa, WSL inokutendera kuti ushandise huwandu hwakawanda hweLinux maturusi nemirairo pane yako windows system. Iwe unogona kumhanyisa mirairo yeLinux yakakosha, kuisa software mapakeji, kuunganidza zvirongwa, uye kumhanyisa shell zvinyorwa. Pamusoro pezvo, WSL inopa kusanganisa isina musono neWindows faira system, ichikutendera iwe kuti uwane uye kushandura mafaera mune ese ari maviri Linux nharaunda uye Windows nharaunda.
2. Zvinodiwa kuti uise Linux pa Windows 10 neWSL
Usati watanga kuisa Linux pa Windows 10 uchishandisa WSL, zvakakosha kuve nechokwadi chekuti zvimwe zvinodikanwa zvinosangana. Izvi zvinodikanwa zvinovimbisa kuisirwa kwakabudirira uye yakatsetseka mushandisi ruzivo. Pazasi pane zvinodiwa zvinodiwa:
1. Windows 10 kana kupfuura: WSL iripo kubvira Windows 10 gadziridza vhezheni 1607. Ita shuwa kuti sisitimu yako yekushandisa yakagadziridzwa kuita shanduro inotsigirwa.
2. Shandisa WSL: Usati waisa nekushandisa Linux pa Windows 10, unofanira kugonesa Windows Subsystem yeLinux (WSL) ficha. Izvi zvinogona kuitwa kuburikidza neWindows Control Panel kana kushandisa PowerShell. Tevedza mirairo yakapihwa neMicrosoft kuti uvhure WSL pane yako system.
3. Inowanikwa dhisiki nzvimbo: Ita shuwa kuti une nzvimbo yakakwana inowanikwa pane yako hard drive kubata yako Linux yekuisa uye maapplication aunoda kumhanya. Inokurudzirwa kuve neinenge 20 GB yemahara nzvimbo yekushanda kwakaringana.
3. Kudhaunirodha uye kuisa WSL paWindows 10
Kurodha uye kuisa WSL pa Windows 10, tevera matanho aya:
- Vhura menyu yekutanga uye tsvaga "Zvirongwa".
- Dzvanya pa "Update uye chengetedzo".
- Sarudza "Kune Vagadziri" kubva kuruboshwe menyu.
- Tarisa bhokisi rinoti "Programmer mode."
Wobva watevera matanho aya kuti uite WSL:
- Vhura PowerShell semutungamiri.
- Nyora murairo unotevera:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux. - Dzvanya Enter uye mirira kuti maitiro ekuisa apedze.
Chekupedzisira, iwe unofanirwa kutangazve sisitimu kuti shanduko dziite. Mushure mekutangazve, WSL ichave inowanikwa uye yakagadzirira kushandisa.
4. Kuseta WSL yekuisa Linux paWindows 10
Kana iwe uri Windows 10 mushandisi uye uchida kushandisa Linux pane yako yekushandisa system pasina kuisa chikamu chitsva, unogona kutora mukana weWindows Subsystem yeLinux (WSL). Usati watanga, ita shuwa kuti une yazvino vhezheni ye Windows 10 yakaiswa, sezvo WSL iripo kutanga neiyo Windows 10 Vagadziri Vawedzere.
Kugadzirisa WSL, tevera matanho aya:
- Vhura menyu yekutanga uye tsvaga "Windows Features."
- Sarudza "Batidza kana kudzima maitiro eWindows."
- Mune rondedzero yezvinhu, tsvaga "Windows Subsystem yeLinux" uye tarisa bhokisi.
- Dzvanya "OK" uye mirira kuti kugadzwa kupedze.
- Reboot system yako kana wakurudzirwa.
Kana sisitimu yako yatangazve, wagadzirira kuisa WSL-inoenderana Linux kugovera. Unogona kuwana Microsoft Store uye kutsvaga kugoverwa kwakakurumbira seUbuntu, Debian kana Fedora. Dzvanya pakugovera kwaunoda uye wozo "Tora" kuti utange kuisirwa. Kana yangoiswa, iwe unozokwanisa kumhanyisa kugovera kweLinux sehwindo rakasiyana pane rako Windows 10 desktop.
5. Kusarudza uye kudhawunirodha yakakodzera Linux kugovera kweWSL
Iri inhanho yakakosha kuti uwane zvakanyanya kubva pachishandiso ichi. Neraki, kune akati wandei anozivikanwa kugovera anowanikwa kuti ashandiswe muWSL, imwe neimwe iine yayo maficha uye mabhenefiti. Pano isu tinokupa iwe nhanho-ne-nhanho gwara rekubatsira iwe kusarudza uye kurodha chaiyo Linux kugovera kweWSL.
1. Tsvakurudza zvingasarudzwa: Usati wasarudza kugoverwa kweLinux, zvakakosha kuti uite tsvakurudzo yako uye uzvizive iwe nemhando dzakasiyana dziripo. Zvimwe zvakajairika uye zvakakurumbira kugovera zvinosanganisira Ubuntu, Debian, uye Kali Linux. Imwe neimwe yadzo yakagadziridzwa kumakesi akasiyana ekushandisa, saka ive shuwa yekufunga zvaunoda uye zvaunofarira.
2. Tarisa mazano uye zvidzidzo: Kana wasarudza kugoverwa kweLinux, tsvaga mazano uye zvidzidzo zvepaIndaneti zvinokubatsira kuisa nekugadzirisa kugovera paWSL. Izvi zviwanikwa zvinokupa iwe yakadzama-nhanho-nhanho mirairo uye inokubatsira iwe kudzivirira dzingangoitika misungo panguva yekuisa maitiro. Vanogonawo kupa matipi nemano inobatsira kuwana zvakanyanya kubva pakugovera kwako Linux paWSL.
6. Kuisa Linux kugovera pa Windows 10 uchishandisa WSL
Kune avo vanoda kuisa Linux kugovera pa Windows 10 uchishandisa Windows Subsystem yeLinux (WSL), heino nhanho-ne-nhanho dzidziso yekugadzirisa iyi nyaya. WSL chinhu chakasarudzika che Windows 10 izvo zvinokutendera kuti umhanye nharaunda yeLinux zvakananga paWindows pasina kudiwa kwemuchina chaiwo.
Usati watanga, ita shuwa yako Windows 10 system ine WSL maficha anogoneswa. Kuti utarise izvi, enda ku "Start" menyu uye tsvaga "Batidza kana kudzima maWindows maficha." Tevere, wedzera "Windows Subsystem yeLinux" uye ita shuwa kuti bhokisi rakatariswa. Kana zvisiri, sarudza uye tinya "OK."
Kana WSL yagoneswa, enda kuMicrosoft Store uye utsvage kugovera kweLinux yaunoda kuisa. Microsoft inopa akati wandei akakurumbira sarudzo seUbuntu, Debian, uye Kali Linux. Dzvanya pane yaunoda kugovera uye pane peji rechitoro, tinya bhatani rekuti "Tora" kuti utange kurodha uye kuisa maitiro. Iyi nzira inogona kutora nguva zvichienderana nehukuru hwekugovera uye nekumhanyisa kweinternet yako.
7. Kwekutanga kuseta kweLinux kugovera pa Windows 10
Chimwe chezvinhu zvinoyevedza zve Windows 10 ndiko kugona kumhanyisa kugovera kweLinux zvakananga pa Iyo inoshanda sisitimu. Izvi zvinobvumira vashandisi kunakidzwa nemabhenefiti eLinux pasina kuisa imwe yekuwedzera sisitimu yekushandisa. Pano isu tinokuratidza maitiro ekuita yekutanga gadziriso yekugovera Linux pa Windows 10.
1 Step: Usati watanga, ita shuwa vhezheni yako Windows 10 inotsigira iyo Windows Subsystem yeLinux (WSL) chimiro. Kuti uone izvi, unofanirwa kuve uine vhezheni 1607 kana gare gare yakaiswa. Kana iwe uine yekare vhezheni, iwe uchafanirwa gadziridza yako yekushandisa system.
2 Step: Kana kuwirirana kwasimbiswa, unogona kuenderera nekuisa Linux kugovera. Kuti uite izvi, unofanirwa kuvhura Windows Store uye kutsvaga kugovera kwaunoda kushandisa. Dzvanya "Tora" uye mirira kuti kugadzwa kupedze.
3 Step: Kana iyo Linux yekugovera yaiswa, vhura uye iwe uchakumbirwa kuseta zita rekushandisa uye password. Aya data ndiwo auchashandisa kuwana yako Linux kugovera paWindows 10. Uye ndizvozvo! Iye zvino unogona kunakidzwa ese mabhenefiti eLinux pasina kusiya Windows.
8. Linux Command Line Interface pa Windows 10 neWSL
Kushandisa iyo Linux yekuraira mutsara interface pa Windows 10 yave nyore nekuda kweWindows Subsystem yeLinux (WSL). NeWSL, unogona kumhanyisa kugovera kweLinux pakombuta yako yeWindows pasina chikonzero chekuisa muchina chaiwo kana bhutsu mbiri.
Kana iwe uchida kushandisa Linux command line interface pa Windows 10, tevera matanho aya:
- Vhura Windows 10 Zvirongwa uye enda kuchikamu che "Update uye chengetedzo".
- Dzvanya "Kune Vagadziri" mune yekuruboshwe menyu uye shandisa iyo "Developer Mode" sarudzo.
- Mushure mekugonesa Developer Mode, enda kuchikamu che "Windows Features" muhwindo rimwechete rezvirongwa uye shandisa "Windows Subsystem yeLinux."
- Enda kuMicrosoft Store uye utsvage inotsigirwa Linux kugovera, seUbuntu, SUSE, kana Debian. Dhaunirodha woiisa pakombuta yako.
- Kamwe kugovera kweLinux kwaiswa, vhura kubva kumenyu yekutanga. Pano iwe uchakumbirwa kuseta account uye kuseta password.
Mushure mekutevera nhanho idzi, uchawana mukana weLinux command line interface pane yako Windows 10. Izvi zvinokutendera kuti umhanye Linux-inoenderana mirairo nezvirongwa zvakananga. kubva kune yako yekushandisa system Windows. Iwe unogona kushandisa ese eLinux's yekuraira-mutsara maficha uye maturusi, senge apt package maneja kana gcc compiler.
9. Kutungamira nekuvandudzwa kweLinux kugovera kwakaiswa muWSL
Imwe yemabhenefiti ekushandisa Windows Subsystem yeLinux (WSL) kugona kubata zviri nyore uye kugadzirisa yakaiswa Linux kugovera. Heano mamwe nhanho-ne-nhanho mhinduro dzekugadzirisa chero nyaya dzine chekuita nekutungamira uye kugadzirisa.
1. Tarisa uye gadziridza WSL vhezheni: Usati watanga, zvakakosha kuti uve nechokwadi chekuti une yazvino vhezheni yeWSL yakaiswa pane yako system. Izvi zvinogona kuitwa nekumhanyisa kuraira wsl -l -v paWindows command line. Kana paine yekare vhezheni, inogona kuvandudzwa uchishandisa rairo wsl --set-version .
2. Gadzirisa kugoverwa kweLinux: Kana iyo WSL vhezheni yasimbiswa, zvinokwanisika kugadzirisa yakaiswa Linux kugovera. Kuti uite izvi, unogona kushandisa murairo unotevera paWindows command line: wsl --update. Uyu murairo uchavandudza kugoverwa kweLinux yose yakaiswa pane system.
3. Tonga zvigadziriso: Pamusoro pekuita zvakajairwa zvigadziriso, zvakare zvinogoneka kubata zvigadziriso wega kune yega yega Linux kugovera. Kuti uite izvi, unogona kushandisa murairo wsl --set-version . Izvi zvinokutendera kuti uchinje vhezheni yekugovera chaiyo uye uichengete ichiri kuenderana sezvinodiwa.
10. Kuwana mafaera eWindows nemadhairekitori kubva kuLinux kugovera muWSL
Imwe yemabhenefiti ekushandisa Windows Subsystem yeLinux (WSL) kugona kuwana uye kushandura mafaera eWindows uye madhairekitori kubva mukugoverwa kweLinux. Izvi zvinonyanya kubatsira kana uchishanda munzvimbo yaunoda kuwana zvese Windows neLinux zviwanikwa. Ichi chinyorwa chinopa nhanho-ne-nhanho dzidzo yekuwana mafaera eWindows uye madhairekitori kubva kuLinux kugovera paWSL.
Kutanga, zvakakosha kuti uzive kuti WSL inopa inoenderana layer inobvumidza iwe kumhanya Linux binaries zvakananga paWindows. Izvi zvinoreva kuti mafaera eWindows nemadhairekitori anogona kuwanikwa kubva kuLinux CLI muWSL. Imwe yedzakareruka nzira dzekuwana Windows mafaera uye madhairekitori ndeye kushandisa yakakosha nzira / mnt. Iyi nzira ine mapoinzi ekumisikidza eWindows disks muWSL.
Pazasi pane muenzaniso unoshanda wekuti ungawana sei Windows dhairekitori kubva kuWSL. Tomboti une dhairekitori rinonzi C:Zvinyorwa paWindows yaunoda kuwana kubva kuWSL. Kuti uite izvi, ingovhura Linux terminal muWSL uye shandisa iwo murairo cd /mnt/c/Documents kuenda kune yaunoda dhairekitori. Kamwe mune dhairekitori rekufarira, unogona kushandura mafaera uye kuita Linux mirairo kazhinji.
11. Network configuration muWSL yekubatanidza nemamwe machina
Kugadzirisa network muWSL uye kuwana kubatana nemimwe michina, zvakakosha kutevedzera anotevera matanho:
1. Network Adapter Configuration: Kutanga, ita shuwa kuti iyo default network adapta paWSL yako yakagadziriswa nemazvo. Unogona kutarisa izvi nekuvhura iyo Windows Control Panel, kusarudza "Network neInternet," wozo "Network uye Kugovera Center," uye nekudzvanya "Shandura zvigadziriso zveadapter" pane yekuruboshwe. Ita shuwa kuti adapta yauri kushandisa pakubatanidza inogoneswa uye inogadziriswa kuti uwane IP kero otomatiki.
2. Kutarisa IP Kero: Kana iyo network adapta yagadziriswa, unogona kutarisa IP kero yakapihwa kumushini wako weWSL. Kuti uite izvi, vhura mutsara wekuraira wekugovera kwako WSL uye mhanyisa "ipconfig" kuraira. Izvi zvicharatidza IP kero yakapihwa kune yako WSL virtual muchina network adapta. Ita shuwa kuti kero yeIP iyi iri muchikamu chakafanana nenetiweki yaunoda kubatanidza nayo.
3. Kugadzirisa Mitemo yeFirewall: Mune zvimwe zviitiko, ungada kugadzirisa mitemo yefirewall kubvumira kubatana kune mamwe machina pane network. Unogona kuita izvi kuburikidza Windows Firewall kana chero imwe firewall program yauri kushandisa. Ita shuwa yekubvumidza inopinda uye inobuda yekubatanidza pamachiteshi anodiwa pakutaurirana nemichina yakanangwa. Pamusoro pezvo, iwe ungangodawo kugadzirisa nzira yekubvumira traffic kuti ipfuure nepaWSL yako kune mamwe machina panetiweki.
Nekutevera nhanho idzi, iwe unofanirwa kukwanisa kugadzirisa networking muWSL uye kuwana hukama nemimwe michina panetiweki yako yemuno. Rangarira kutarisa network yako adapta, tarisa IP kero yakapihwa kune yako WSL muchina, uye gadzirisa inodiwa firewall mitemo yekubvumira kutaurirana.
12. Kugadzira uye kushandisa bash zvinyorwa paLinux neWSL
Kugadzira uye kumhanyisa bash zvinyorwa paLinux uchishandisa WSL (Windows Subsystem yeLinux) hunyanzvi hwakakosha kune vatariri vehurongwa uye vanogadzira. Bash zvinyorwa zvinyorwa zvinodzokorodza otomatiki mabasa muLinux inoshanda sisitimu. NeWSL, unogona kumhanya Linux shell mirairo uye zvinyorwa zvakananga pamushini wako weWindows, zvichibvumira kushanduka kukuru uye kubudirira mukuvandudza sisitimu uye kutonga.
Kugadzira bash script muWSL, ingovhura terminal yako uye gadzira faira idzva rine .sh yekuwedzera. Iwe unogona kushandisa chero chinyorwa chinyorwa chaunoda, senge Nano kana Vi, kugadzira uye kugadzirisa iyo faira. Zvakakosha kuyeuka kuti bash zvinyorwa zvinofanirwa kutanga nemutsara #!/bin/bash, izvo zvinoratidza kuti muturikiri webash achashandiswa kuita script.
Kana uchinge wagadzira iyo bash script faira, unogona kutanga kutaipa mirairo yaunoda kuita. Mirairo murunyoro ichaitwa muhurongwa hwayakanyorwa. Iwe unogona kusanganisira yakajairwa magomba mirairo, Linux mirairo, tsika mabasa, uye makomendi mune yako script. Kuti umhanye script, ingonyora zita refaira mune terminal uye wodzvanya Enter. Ita shuwa kuti chinyorwa chine mvumo dzinogoneka nekushandisa murairo chmod +x script_name.sh kana zvichidikanwa.
13. Kugadzirisa matambudziko akajairika paunoisa Linux pa Windows 10 uchishandisa WSL
Kana uchiisa Linux pa Windows 10 uchishandisa iyo Windows Subsystem yeLinux (WSL), dzimwe nguva nyaya dzakajairika dzinogona kumuka dzinogona kuita kuti maitiro acho aome. Sezvineiwo, kune akati wandei mhinduro dziripo dzekugadzirisa idzi nyaya uye kuona kuisirwa kwakabudirira.
Chekutanga, zvakakosha kuona kuti vhezheni ye Windows 10 iri kuenderana uye inoenderana neWSL. Iwe unogona kuita izvi nekutarisa Windows updates muSystem Settings. Kana zvigadziriso zviripo, ita shuwa yekuzviisa usati waenderera mberi nekuisa Linux.
Rimwe dambudziko rinowanzoitika rinogona kushaikwa kwedhisiki nzvimbo yekuisa Linux. Kugadzirisa izvi, unogona kusunungura nzvimbo nekudzima mafaera asina kufanira kana kuaendesa kune imwe hard drive. Iwe unogona zvakare kuwedzera dhisiki nzvimbo nekupatsanura kana kushandisa dhisiki manejimendi maturusi.
14. Mhedziso uye kurudziro yekuisa Linux pa Windows 10 uchishandisa WSL
Muchidimbu, kuisa Linux pa Windows 10 kuburikidza neWSL imhinduro inoshanda kune avo vashandisi vanoda kunakidzwa nezvakanakira zvese zviri zviviri. operating systems pachikwata chimwe chete. Muchinyorwa chino chese, takafukidza matanho anodiwa kuti ibudirire kuisirwa, pamwe nekupa kurudziro yekuwedzera kushanda kwayo.
Zvakakosha, kuve nechokwadi chekumisikidza kwakatsetseka uye kusina dambudziko, zvakakosha kuti unyatsotevera zvidzidzo uye matanho anopihwa neMicrosoft. Uyezve, kusarudza iyo chaiyo Linux kugovera kwakakosha kuzadzisa zvinodiwa nemushandisi. Isu tinokurudzira kutsvagisa uye kuedza kugovera kwakasiyana tisati taita sarudzo yekupedzisira.
Kamwe Linux yaiswa pa Windows 10 uchishandisa WSL, vashandisi vanozokwanisa kushandisa maturusi ane simba uye maapplication akapihwa neLinux, uku vachichengeta kujairana uye kuenderana kweWindows. Kutora mukana weaya mabhenefiti, unogona kugadzira mapurojekiti, kuita bvunzo uye kushandisa zvakanyanya kugona kweaviri masisitimu anoshanda.
Muchidimbu, WSL (Windows Subsystem yeLinux) isarudzo yakanaka kwazvo ye Windows 10 vashandisi vanoda kuwana nharaunda yeLinux vasina kusiya yavo huru yekushandisa system. Nekuisirwa kuri nyore uye kurongeka kuri nyore, WSL inopa hunyanzvi mhinduro yekushandisa Linux maapplication uye mirairo paWindows.
Mushure mekutevera matanho atsanangurwa muchinyorwa chino, iwe unenge wakagadzirira kuongorora nyika yeLinux pane yako Windows 10 komputa Nekugona kumhanyisa maLinux application paWindows system yako, unozokwanisa kunakidzwa nekuchinjika uye simba rezvose zviri zviviri.
Izvo zvakakosha kuyeuka kuti WSL haisi yakazara Linux virtual muchina, asi inoenderana layer inobvumira kumhanya Linux application munzvimbo yeWindows. Kana iwe uchida kushanda kwepamberi kana kuti uchida kushanda neLinux chaiyo kugovera, ungangoda kufunga nezvedzimwe sarudzo, sekuisa chaiwo muchina.
Pakazere, kuisa Linux pa Windows 10 kushandisa WSL kunopa vashandisi kuwanda kwekuita uye kugona kutora mukana wemabhenefiti emapuratifomu ese ari maviri. Kana iwe uri mugadziri, sysadmin, kana mumwe munhu anofarira kuongorora nyika yeLinux, usazeze kuyedza WSL uye kuzviedza iwe pachako.
Sezvo nyika yetekinoroji iri kuramba ichishanduka, zvinonakidza kuona zvipingamupinyi pakati pemashandisirwo ekushandisa zvichiwedzera kudzima. Nezvishandiso zvakaita seWSL, vashandisi vanogona kunakidzwa nekunyaradzwa uye kujairana kweWindows uku vachizvinyudza muhupfumi hweLinux ecosystem. Saka usazeza kuongorora uye kushandisa zvakanyanya iyi ine simba musanganiswa wetekinoroji.
Ini ndiri Sebastián Vidal, injiniya wekombuta anofarira nezve tekinoroji uye DIY. Uyezve, ndini musiki we tecnobits.com, kwandinogovera zvidzidzo kuti tekinoroji iwanikwe uye inonzwisisika kumunhu wese.