Hagaaji nidaamka-hoosaadka Windows-ka ee khaladaadka Linux, dhibaatooyinka iyo arrimaha

Sida software-ka oo dhan, Windows Subsystem (WSL2) sidoo kale wuxuu leeyahay saamigiisa arrimaha cadaaladda ah. Tilmaan-bixiyahan, waxaanu ku xalin doonaa nidaamka-hoosaadka Windows-ka ee(Windows Subsystem for Linux) fariimaha iyo koodhadhka khaladaadka Linux.

Hagaaji nidaamka-hoosaadka Windows(Fix Windows Subsystem) ee Khaladaadka Linux(Linux Errors) , Dhibaatooyinka(Problems) & Arrimaha(Issues)

Kuwani waa fariimo aan u doonayno in aan cilad- saarno Windows Subsystem(Windows Subsystem) for Linux Error Messages and Codes .

  1. Ha arkin xulashooyinka WSL 2
  2. Khaladka: 0x1bc
  3. Cilad: 0x80040306 Rakibaadda
  4. Lagama heli karo faylasha WSL ee Windows
  5. Ma bilaabi karo qaybinta WSL 2 oo kaliya arag ' WSL 2 ' ee soosaarka
  6. Taliska lama helin
  7. Cilad: 0x80370102 Mashiinka farsamada lama bilaabi karo sababtoo ah sifada loo baahan yahay lama rakibin
  8. Cilad: 0x80040154 kadib cusboonaysiinta Windows
  9. WSL(WSL Stops) waxay joojisaa ku shaqaynta  cilad 0x80070003(Error 0x80070003)
  10. Ku muuji isbeddelka luqadda WSL
  11. (Installation)Arrimaha rakibidda ka dib soo celinta nidaamka Windows
  12. Ma jiro wax internet ah oo laga galo WSL
  13. Oggolaanshaha waa la diiday marka la isticmaalayo Ping
  14. Aan awoodin in la bootiyo ka dib marka la rakibo WSL 2
  15. Aan awoodin inuu ku socodsiiyo amarrada Windows(Windows Commands) gudaha qaybiyaha
  16. ICS waa naafo
  17. Bash waa la sudhay
  18. FurSSH-Server arrimaha ku xiran
  19. Golaha la tixraacay waa la heli waayay
  20. (Correct)Qaladaadka oggolaanshaha saxda ah ( SSH ee la xidhiidha)(SSH)

Aynu si faahfaahsan uga hadalno iyaga.

1] Ha arkin xulashooyinka WSL 2

Isticmaalayaal badan oo Windows ah ayaa ka cawday in kastoo ay ku jiraan la dhisay 1903, ma awoodaan inay arkaan fursadaha WSL 2 . Tani waxay dhacdaa marka mashiinka kombuyuutarku aanu weli qaadin dhabarka dambe ee WSL 2 .

Si aad tan u xalliso, kaliya waxaad u baahan tahay inaad hubiso wixii ku soo cusboonaado( check for updates) , oo waxaad fiicnaan doontaa inaad tagto.

2] Khalad: 0x1bc

Waxaa laga yaabaa inaad aragto cilada soo socota marka "Luqadda Muujinta" (“Display Language” ) ama  "System Locale"  aan loo dejin  Ingiriisi.(English.)

wsl --set-default-version 2

Error: 0x1bc

For information on key differences with WSL 2 please visit https://aka.ms/wsl2

Si loo saxo qaladka, waxaad u baahan tahay inaad hubiso in Kernel -ku ku rakiban yahay kombuyutarkaaga. Si taas loo sameeyo, adeegso amarkan soo socda.

dir %SystemRoot%\system32\lxss\tools\kernel

Haddii aadan haysan Kernel , ka soo deji aka.ms(aka.ms) . Hubi inaad u soo dejiso maamule ahaan oo ku rakib Kernel mashiinkaaga si aad u xalliso qaladka.

3] Cilad: 0x80040306 Rakibaadda

Hagaaji nidaamka-hoosaadka Windows ee Khaladaadka Linux, Dhibaatooyinka & Arrimaha

Haddii aad aragto qalad: 0x80040306 Rakibaadda. Si taas loo hagaajiyo waxaad u baahan tahay inaad damiso  Console Legacy. (Legacy Console. )Si taas loo sameeyo, raac tillaabooyinka la bixiyay.

  1. Fur  Command Prompt  maamule ahaan ka  bilow Menu.(Start Menu.)
  2. Midig ku dhufo(Right-click) summada cmd oo dooro Properties.
  3. Hadda, ka saar " Isticmaal Console dhaxalka ah" (Use legacy console” ) oo dhagsii OK.

Ugu dambeyntii, hubi haddii ay hagaajinayso arrinta.

4] Ma geli karo faylasha WSL ee Windows

Haddii aadan awoodin inaad gasho Windows Subsystem for Linux by \\wsl$ on Windows , tani waxay la macno noqon kartaa in server-ka 9P borotokoolka uu ku guuldareysto inuu bilaabo.

Sida ugu fudud ayaa ah in la cusboonaysiiyo kombayutarka oo aad awood u siiso “cusboonaysiinta alaabta Microsoft ee Cusboonaysiinta Windows”. (“updates for Microsoft products on Windows Update”. )Si taas loo sameeyo, waxaad raaci kartaa tallaabooyinka la siiyey.

  1. Ku bilow  Settings  by  Win + I.
  2. Guji  Update & Security > Advanced options.
  3. Isticmaal toggle si aad u damiso " Hesho cusboonaysiinta alaabta kale ee Microsoft marka aad cusboonaysiiso Windows(Receive updates for other Microsoft products when you update Windows) ".

Tani waxay kuu hagaajin doontaa arrinta.

5] Ma bilaabi karo qaybinta WSL 2 oo kaliya arag ' WSL 2 ' ee soosaarka

Ciladani waa lama huraan haddii luqadaada bandhiga aan loo dhigin Ingiriis. Waxaad arki doontaa wax soo saarka soo socda markaad isku dayeyso inaad bilowdo WSL 2 .

C:\Users\me>wsl

WSL 2

Si loo saxo qaladka, waxaad u baahan tahay inaad soo dejiso oo aad gacanta ku rakibto Kernel -ka . Waxaad ka soo dejisan kartaa faylka aka.ms/wsl2kernel . Ku rakib Kernel -ka si aad si sahal ah u saxdo khaladka.

6] Amar lama helin

Tani waa mid ka mid ah khaladaadka caadiga ah ee la arko marka ay wadaan faylka .exe ee Windows gudaha Linux . Waxa laga yaabaa inaad aragto khaladka soo socda markaad isku dayayso inaad sidaas oo kale samayso.

$ notepad.exe

-bash: notepad.exe: command not found

Tani waxay dhacdaa marka  $PATH ay ku guuldareysato inay hesho faylka .exe . Xalka ugu fiican ee khaladkan waa in lagu socodsiiyo amarka soo socda ee Terminalka(Terminal) .

export PATH=$PATH:/usr/sbin

Tan samee oo hubi haddii ay hagaajinayso qaladka.

7] Cilad: 0x80370102 Mashiinka farsamada lama bilaabi karo sababtoo ah sifada loo baahan yahay lama rakibin

Qaar badan ayaa la kulmay khaladkan markii ay isku dayeen inay rakibaan qaybiyaha Linux . Si ka duwan khaladaadkii hore, qaladkan waxa uu leeyahay in ka badan hal xal. Haddaba, xir oo akhri dhammaan xalalka.

Kuwani waa waxyaabaha aad samayn karto si aad u hagaajiso Khaladka: 0x80370102, Mashiinka farsamada lama bilaabi karo sababtoo ah sifada loo baahan yahay lama rakibin .

  1. Daar Hyper-V
  2. Daar ka-qaadista ka-hortagga Qalabka
  3. Daar ka-qaadista Virtual Nsted

Aynu si faahfaahsan uga hadalno iyaga.

Daar Hyper-V

Hyper-V la'aanteed ma awoodid inaad abuurto deegaan Virtual(Environment) . Markaa, awood u yeelo adigoo kaashanaya tillaabooyinka soo socda.

  1. Ka fur  Control Panel  ee ka  bilow Menu.(Start Menu.)
  2. Guji  Programs and Features > Turn Windows features on or off
  3. Hoos(Scroll) u deg si aad u heshid Hyper-V , hubi, oo guji OK.

Kadib markaad awood u siiso Hyper-V(Hyper-V) hubi haddii arintu go'an tahay.

Daar ka-qaadista ka-hortagga Qalabka

Virtualization Hardware(Hardware Virtualization) waa lama huraan marka la isku deyayo in uu socodsiiyo Mishiinka Virtual(Virtual Machine) . Markaa, haddii aad la kulanto Cilad: 0x80370102, isku day inaad karti u siiso Virtualization Hardware(enable Hardware Virtualization) BIOS si loo xalliyo arrinta.

Daar ka-qaadista Virtual Nsted

Nested Virtualization waxay kuu oggolaanaysaa inaad ku socodsiiso Hypervisor gudaha VM. Marka, haddii aad wali wajaheyso cilada, isku day in aad karti u yeelatid Nsted Virtualization . Si taas loo sameeyo, waxaad u baahan tahay inaad ku socodsiiso PowerShell  maamule ahaan oo aad socodsiiso amarkan soo socda.

Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Amarkan ha shaqeeyo oo hubi haddii uu xalinayo arrinta.

8] Cilad: 0x80040154 kadib cusboonaysiinta Windows

cilad-saar nidaamka-hoosaadka Windows-ka ee fariimaha iyo koodhadhka khaladaadka Linux

Waxaa laga yaabaa inaad aragto ciladan haddii Windows Subsystem for Linux uu naafo yahay sababtoo ah Cusbooneysiinta Windows(Windows Update) . Marka, si loo xalliyo arrinta, waxaan u baahanahay inaan awoodno doorashadan. Si taas loo sameeyo, raac tillaabooyinka la bixiyay.

  1. Ka bilow  Xakamaynta (Control ) ka  bilow Menu.(Start Menu.)
  2. Guji  Programs and Features > Turn Windows features on or off
  3. Hoos u dhaadhac si aad u hesho nidaamka-hoosaadka Windows ee Linux(Windows Subsystem for Linux) , hubi, oo guji OK.

Ugu dambeyntii, dib u bilow kombayutarka oo hubi haddii arrintu sii socoto.

9] WSL Joojinta(WSL Stops) ku shaqaynta  Cillad 0x80070003(Error 0x80070003)

Haddii WSL ay ku joogsato summadan qaladka ah 0x80070003(error code 0x80070003) , ku xalliso hagahan.

10] Muuji(Display) luqadda beddeleysa gudaha WSL

WSL waxay si toos ah u beddeshaa deegaanka Ubuntu , si ay ugu habboonaato luqadda kumbuyuutarkaaga Windows . Haddi aanad taageere u ahayn guuritaankan, adeegso amarka soo socda si aad luuqadda bandhiga ugu dejiso hadba baahidaada.

Xusuusin: Amarka soo socda ayaa luqadda u beddeli doona en-US.

sudo update-locale LANG=en_US.UTF8

Tan samee oo hubi haddii ay hagaajinayso arrinta.

11] Arrimaha rakibaadda(Installation) ka dib soo celinta nidaamka Windows

Haddii aad la kulanto arrimaha Rakibaadda ka dib soo celinta nidaamka (Installation)Windows , isku day inaad tirtirto galka Windows-ka ee Linux(Windows Subsystem for Linux ) . Sidan soo socotana waa jidkeedii.

%windir%\System32\Tasks\Microsoft\Windows\Windows Subsystem for Linux

Kumbuyuutarkaaga dib u bilow, dib u rakib Bash(Bash) oo hubi haddii ay xalliso arrinta.

12] Ma jiro wax gal internet ah gudaha WSL

Isticmaalayaal badan ayaa sheegay in aysan awoodin in ay galaan internetka (Internet)WSL . Si kastaba ha ahaatee, xalku wuu ka fududaan karaa sidaad u malaynayso. Tani waxay u dhacdaa sababtoo ah anti-virus-ka koox saddexaad oo laga yaabo inaad haysato. Sida darbigu u xannibo internetka(Internet) . Markaa, si aad tan u xalliso, ka saar anti-virus-ka oo waad fiicnaan doontaa inaad tagto.

13] Ogolaansho(Permission) waa la diiday marka la isticmaalayo Ping

Haddii aadan awoodin in aad Ping ku gasho WSL markaa tani waxay la macno tahay inaadan haysan mudnaan maamul. Markaa, waxaad u baahan tahay inaad ku socodsiiso Ubuntu iyo Linux oo leh mudnaan maamul ama Bash.exe turjumaanka khadka taliska oo leh mudnaanta maamul.

Waxaan rajeyneynaa, tani waxay si fudud u xallin doontaa arrinta.

14] Aan awoodin in la bootiyo ka dib marka la rakibo WSL 2

Sababta sababta aadan u awoodin inaad kabaha u dhejiso ka dib markaad rakibto WSL 2   ayaa weli ah mid aan qarsoodi ahayn laakiin Microsoft waxay isku dayeysaa inay ka shaqeyso cusbooneysiinta si ay si buuxda u ogaato arrinta. Si kastaba ha ahaatee, waxaa jira laba shay oo aad samayn karto oo aad aragto haddii ay hagaajinayso arrinta.

15] Aan awoodin inuu ku socodsiiyo amarrada Windows(Windows Commands) gudaha qaybiyaha

Waxaa jira qaybiyayaal yar oo ku jira Bakhaarka Daaqadaha(Windows Store) kuwaas oo aan si buuxda loo hagaajin si ay u socodsiiyaan dhammaan amarrada Windows(Windows Commands) . Waxaa laga yaabaa inaad hesho mid ka mid ah khaladaadka soo socda.

-bash: powershell.exe: command not found
powershell.exe /c start

Si loo saxo qaladkan, socodsii amarka soo socda.

echo $PATH

Hadda, hubi haddii wax soo saarka ay ku jiraan " “/mnt/c/Windows/system32”

Hadda, hubi dejimaha boggaga by

cat /etc/profile

Hadda, hubi haddii hawsha Jidku(Path) ay ka bilaabato “#” , haddii ay dhacdo, faallo ka bixi blockka. Sidoo kale, hubi haddii wsl.conf uu joogo oo hubso inaanu lahayn appendWindowsPath=false. Haddii ay dhacdo, faallo ka bixi.

Markaad tan sameyso, waxaad u baahan tahay inaad dib u bilowdo qaybinta. Waxaad isticmaali kartaa amarka soo socda si aad taas u sameyso.

wsl -t <name of the distributor>

ama

wsl --shutdown

Waxaan rajeyneynaa, in arrinta la xalin doono.

16] ICS waa naafo

WSL ma shaqayn karo la'aanteed ICS ama Wadaagga Xidhiidhka Internetka(ICS or Internet Connection Sharing) . Adeegga Shabakadda  Martigelinta (HNS) (Host Network Service (HNS) ) waxay isticmaashaa ICS si ay u dhisto shabakad toosan oo aasaasi ah WSL 2 si ay u abuurto NAT , DNS , DHCP , iyo wadaagista xidhiidhka martigeliyaha.

Si loo saxo qaladka, waxaan u baahanahay inaan awoodno ICS . Markaa, raac tillaabooyinka la bixiyay si aad awood ugu yeelato ICS .

  1. Ka billow  adeegyada (Services ) ka  bilow Menu.(Start Menu.)
  2. Laba-guji Wadaaga Xidhiidhka Internetka (ICS), (Internet Connection Sharing (ICS), ) oo guji  Start  haddi la joojiyo.
  3. Ugu dambeyntii, dhagsii  Apply > Ok.

Waa inaad sidoo kale wax ka beddeshaa siyaasadaha qaarkood. Markaa, billow  Tifaftiraha Siyaasadda Kooxda (Group Policy Editor ) oo u gudub meesha soo socota.

Computer Configuration > Administrative Templates > Network > Network Connections

Oo jooji siyaasadaha soo socda.

  • Mamnuuc(Prohibit) ku rakibida iyo habaynta Network Bridge ee shabakada boggaga DNS(DNS)
  • Mamnuuc isticmaalka Internet Firewall(Internet Connection Firewall) ee ku xidhan shabakadaada DNS
  • Mamnuuc isticmaalka Wadaagga Xidhiidhka Internetka(Internet Connection) ee shabakada boggaga DNS(DNS)
  • Loo baahan(Require) yahay isticmaalayaasha bogga in ay sare u qaadaan marka ay dejinayaan goobta shabakadda

17] Bash waa la laadlaadiyay

Marka Bash uu soo laadlaadsado ama xidho oo uu joojiyo ka jawaabista gelintaada waxaad dib u bilaabi kartaa mishiinkaga maadaama ay taasi hagaajin doonto khaladka ama soo sheegi doonta kaydka xusuusta. Tan dambe waxay u horseedi kartaa shil nidaam, markaa, badbaadi shaqadaada ka hor intaanad warbixinta soo sheegin.

18] Arrimaha xidhiidhka ee SSH-Server-ka

Haddii aad aragto arin isku xidhka OpenSSF-Server, waxa ugu horeeya ee aad u baahan tahay inaad samayso waa inaad hubiso in OpenSSH-server uu shaqaynayo. Waxaad isticmaali kartaa amarka soo socda si aad taas u sameyso.

sudo service ssh status

Haddii aysan socon, adeegso amarka soo socda si aad u bilowdo adeegga.

sudo service ssh start

Haddii ay socoto, waa inaad dib ugu bilowdaa adeegga amarkan soo socda oo aad hubiso inay hagaajinayso arrinta.

sudo service ssh restart

Haddi ay awoodi waydo in ay xaliso arinta, isku day in aad ku bilawdo SSHD qaabka debug. Intaa ka hor, isticmaal amarka soo socda si aad u joojiso adeegga SSH .

sudo service ssh stop

Hadda, adeegso amarkan soo socda si aad u bilowdo SSDHD(SSHD) qaabka debug.

sudo /usr/sbin/sshd -d

Waxaan rajeyneynaa, tani waxay hagaajineysaa qaladka.

19] Golaha la tixraacay lama helin

Isticmaalayaal badan ayaa la kulmaya "Shirka la tixraacay lama helin"(“The referenced assembly could not be found”) markay isku dayaan inay awood u yeeshaan sifada dheeraadka ah ee WSL . Haddii aad ka mid tahay iyaga, isku day inaad awood u siiso Windows Subsystem for Linux (Windows Subsystem for Linux ) from Control Panel oo aad cusboonaysiiso kombayutarkaga. Waxaan rajeyneynaa(Hopefully) , taasi waxay hagaajin doontaa qaladka.

20] Qaladaadka oggolaanshaha saxda(Correct) ah ( SSH ee la xidhiidha).(SSH)

Haddii aad aragto qaladka soo socda, ku dheji qaybtan xalka.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/home/artur/.ssh/private-key.pem' are too open.

Si arrintan loo xalliyo, Microsoft waxay kuu soo jeedinaysaa inaad tagto faylka /etc/wsl.conf  oo aad ku dhejiso kuwan soo socda:

[automount]
enabled = true
options = metadata,uid=1000,gid=1000,umask=0022

Tani waxay hagaajin doontaa qaladka. Kahor, inaad tan sameyso, hubi inaad haysato ogolaansho kugu filan.

Kuwani waxay ahaayeen qaar ka mid ah nidaamka- hoosaadka Windows(Windows Subsystem) -ka ee Farriimaha Khaladaadka Linux(Linux Error Messages) iyo Koodhadhka(Codes) iyo talooyinkooda cilad-raadinta. Waxaan rajeyneynaa inay kaa caawiyaan hagaajinta Khaladaadka WSL, Dhibaatooyinka(Problems) , iyo Arrimaha(Issues) .



About the author

Waxaan ahay mid aad loogu taliyay Windows 10 khabiir, waxaanan ku takhasusay inaan dadka ka caawiyo inay shakhsiyeeyaan muuqaalkooda kumbuyuutarka oo ay ka dhigaan qalabkooda Xafiis kuwo saaxiibtinimo leh. Waxaan u isticmaalaa xirfadahayga si aan uga caawiyo dadka kale siyaabaha ugu waxtarka badan ee lagula shaqeeyo Microsoft Office, oo ay ku jiraan sida loo qaabeeyo qoraalka iyo sawirada daabacaadda internetka, sida loo abuuro mawduucyo gaar ah oo loogu talagalay Outlook, iyo xitaa sida loo habeeyo muuqaalka shaqada ee miiska kombuyuutar.



Related posts