Indlela yokufaka i-Linux ku-Windows 10

Esikhathini sokubuyekezwa kwesikhumbuzo se-Windows 10, i-version 1607, ithuba elisha labathuthukisi livele - igobolondo le-Ubuntu Bash, elikuvumela ukuba ugijime, ufake izinhlelo zokusebenza ze-Linux, sebenzisa izikripthi ze-bash ngqo ku-Windows 10, konke lokhu kubizwa ngokuthi "i-Windows subsystem ye-Linux". Kule nguqulo ye-Windows 10 1709 Abadalwa be-Fall Creators, kukhona kakade ukusabalaliswa kwe-Linux okwamanje okutholakala ukufakwa. Kuzo zonke izimo, uhlelo lwe-64-bit luyadingeka ukuze kufakwe.

Lesi sihloko sichaza indlela yokufaka i-Ubuntu, OpenSUSE, noma i-SUSE Linux Enterprise Server ku-Windows 10 nezinye izibonelo zokusetshenziswa ekupheleni kwalesi sihloko. Kumele futhi kukhunjulwe ukuthi kukhona ukulinganiselwa lapho usebenzisa ibhashi ku-Windows: isibonelo, awukwazi ukuqala izinhlelo zokusebenza ze-GUI (nakuba zibika ukusebenza nge-server ye-X). Ngaphezu kwalokho, ukulahla imiyalo ayikwazi ukuqhuba izinhlelo zeWindows, naphezu kokufinyelela okugcwele ohlelweni lwefayela le-OS.

Ukufaka Ubuntu, OpenSUSE, noma i-SUSE Linux Enterprise Server ku-Windows 10

Kusukela nge-Windows 10 Fall Creators Update (inguqulo 1709), ukufakwa kwesistimu ye-Linux ye-Windows ishintshile ngokuthe xaxa kulokho okwakungezinguqulo ezedlule (izinguqulo zangaphambilini, kusukela ngo-1607, lapho umsebenzi usungulwe ku-beta, imfundo ikhona ingxenye yesibili yalesi sihloko).

Manje izinyathelo ezidingekayo zilandelayo:

  1. Okokuqala, kufanele unike amandla ingxenye "Windows Subsystem for Linux" ku "Iphaneli Yokulawula" - "Izinhlelo Nezici" - "Ukuvula Nokuvala Ama-Windows Components".
  2. Ngemva kokufaka izingxenye bese uvuselela kabusha ikhompyutha, iya esitolo se-Windows 10 sohlelo lokusebenza bese ulanda Ubuntu, OpenSUSE noma i-SUSE Linux ES ukusuka lapho (yebo, manje ukunikezwa kwezintathu kuyatholakala). Uma ukulayisha ama-nuances angenzeka, okunye okunye kumanothi.
  3. Qalisa ukusatshalaliswa okulandiwe njengohlelo olujwayelekile lwe-Windows 10 bese wenza isethaphu sokuqala (igama lomsebenzisi nephasiwedi).

Ukuze unike amandla "i-Windows Subsystem ye-Linux" ingxenye (isinyathelo sokuqala), ungasebenzisa umyalo we-PowerShell:

Nika amandla-I-WindowsOptionalIsigaba -I-Inthanethi -IsigabaNameName Microsoft-Windows-Subsystem-Linux

Manje amanothi ambalwa angasiza ngesikhathi sokufakwa:

  • Ungakwazi ukufaka izimpahla eziningana ze-Linux ngesikhathi esisodwa.
  • Lapho ulanda ukusabalalisa kwe-Ubuntu, i-OpenSUSE ne-SUSE Linux Enterprise Server esitolo se-Windows 10 solimi lwe-Russian, ngiqaphele ukushicilela okulandelayo: uma nje ufake igama bese ucindezela u-Enter, awuwutholi imiphumela edingekayo yokusesha, kodwa uma uqala ukuthayipha bese uchofoza ukusikisela okubonakalayo, uthola ngokuzenzakalelayo ikhasi elifunayo. Uma kwenzeka, ukuxhumanisa okuqondile kokunikezwa esitolo: Ubuntu, vulaSUSE, SUSE LES.
  • Ungase futhi ugijime i-Linux kusuka kumugqa womyalo (hhayi nje kwitheyili kuMenyu yokuqala): ubuntu, opensuse-42 noma ama-sles-12

Ukufaka iBash ku-Windows 10 1607 no-1703

Ukuze ufake i-shell shell, landela lezi zinyathelo ezilula.

  1. Iya kumingcele ye-Windows 10 - Ukuvuselela nokuphepha - Kubathuthukisi. Vula imodi yonjiniyela (Inthanethi kufanele ixhumeke ukulanda izingxenye ezidingekayo).
  2. Yiya kuphaneli yokulawula - Izinhlelo nezinxenye - Nika amandla noma ukhubaza izakhi ze-Windows, thiza "i-Windows subsystem ye-Linux".
  3. Ngemuva kokufaka izingxenye, faka "bash" ekusesheni kwe-Windows 10, uqalise ukuhlukahluka kwesicelo okuhlongozwayo bese wenza ukufakwa. Ungasetha igama lakho lomsebenzisi nephasiwedi ye-bash, noma sebenzisa umsebenzisi wempande ngaphandle kwephasiwedi.

Ngemuva kokuba ukufakwa kuqedile, ungasebenzisa Ubuntu Bash ku-Windows 10 ngokusebenzisa usesho, noma ngokudala isinqamuleli segobolondo lapho udinga khona.

Izibonelo zokusebenzisa Ubuntu Shell ku-Windows

Okokuqala, ngizoqaphela ukuthi umbhali akuyona isazi ku-bash, i-Linux nokuthuthukiswa, futhi izibonelo ezingezansi zibonisa nje ukuthi ku-Windows 10 bash isebenza ngemiphumela ekulindeleke kulabo abayiqonda lokhu.

Izinhlelo ze-Linux

Izicelo ku-Windows 10 Bash zingasetshenziswa, zikhishwe futhi zibuyekezwe ngokusebenzisa ukutholakala kokuthola (sudo-get-get) kusuka ku-Ubuntu repository.

Ukusebenzisa izinhlelo zokusebenza nge-interface interface akufani nalokho ku-Ubuntu, ngokwesibonelo, ungafaka i-Git ku-Bash futhi uyisebenzise ngendlela evamile.

Izikripthi ze-Bash

Ungasebenzisa izikripthi ze-bash ku-Windows 10, ungabakha kumhleli wombhalo we-Nano atholakalayo kugobolondo.

Ama-scripts e-Bash ayikwazi ukucela izinhlelo ze-Windows nemiyalo, kodwa kungenzeka ukuthi ugijime ama-scripts kanye nemilayezo evela kumafayela we-bat nama-scripts we-PowerShell:

bash -c "umyalo"

Ungazama futhi ukwethula izinhlelo zokusebenza nge-interface yobuciko ku-Ubuntu Shell ku-Windows 10, kukhona kakade imiyalo engaphezu kweyodwa kulokhu ku-Inthanethi futhi okuyisisekelo sendlela yehlela ukusebenzisa i-Xming X Server ukubonisa i-GUI yesicelo. Nakuba ngokusemthethweni ithuba lokusebenza nalezi zinhlelo ze-Microsoft azwakaliswa.

Njengoba kubhaliwe ngenhla, angiyena umuntu ongaqonda ngokugcwele ukubaluleka nokusebenza kwezinto ezintsha, kodwa ngibona okungenani isicelo esisodwa kimi: izifundo ezihlukahlukene ku-Udacity, i-edX nabanye okuhlobene nokuthuthukiswa kuyoba lula ukusebenza ngamathuluzi adingekayo kwesokudla ku-bash (futhi kulezi zifundo umsebenzi uvame ukuboniswa ku-terminal ye-MacOS ne-Linux bash).