PowerShell 7.2.6: Kugwiritsa ntchito Linux ndi Windows Commands mu GNU

PowerShell 7.2.6: Kugwiritsa ntchito Linux ndi Windows Commands mu GNU

PowerShell 7.2.6: Kugwiritsa ntchito Linux ndi Windows Commands mu GNU

Zachidziwikire, ikafika pakugwiritsa ntchito Machitidwe aulere ndi otseguka yochokera GNU / Linux, kugwiritsidwa ntchito kwa terminal nthawi zambiri kumakhala kofala kuposa, zikafika Njira Zogwirira Ntchito Zokha komanso zotseka, bwanji Windows ndi macOS. Komabe, m'ma terminal onse alipo ndipo iliyonse ili ndi ma Terminals ndi Shell.

Ndipo, monga ambiri adziwira kale kuchokera kuzinthu zosiyanasiyana, Microsoft ali ndi nthawi kubetcha pa iye gwero lotseguka ndi kukumana kwa ambiri ake Mapulogalamu a Windows pa GNU/Linux. kukhala mmodzi wa iwo, PowerShell. Chomwe ndi chipolopolo chamakono cholamula chomwe chimaphatikizapo zinthu zabwino kwambiri za zipolopolo zina zotchuka. Mmodzi, mosiyana ndi ena, omwe amangovomereza ndi kubwezeretsa malemba, amavomereza ndi kubwezera zinthu.

za PowerShell

Ndipo, musanayambe positi iyi ya PowerShell 7.2.6 " ndi kugwiritsa ntchito Linux ndi Windows commands pamwamba pa imodzi GNU Distro, timalimbikitsa kufufuza zotsatirazi zokhudzana nazo, pamapeto powerenga:

za PowerShell
Nkhani yowonjezera:
PowerShell, ikani chipolopolo cha mzerewu pa Ubuntu 22.04

Powershell
Nkhani yowonjezera:
Microsoft PowerShell Core yafika kale pamtundu wake 6.0

Kugwiritsa ntchito Windows PowerShell 7.2.6 pa GNU/Linux Distros

Kugwiritsa ntchito Windows PowerShell 7.2.6 pa GNU/Linux Distros

Kuyika kwa PowerShell pa GNU/Linux

Kugwiritsa ntchito PowerShellza panopa Njira Yogwiritsira Ntchito ya GNU / Linuxwotchedwa Zozizwitsa (respin ya MX Linux) timayika yake ".deb file" mu mtundu wake 7.2.6, pogwiritsa ntchito lamulo ili:

sudo dpkg -i ./Descargas/powershell_7.2.6-1.deb_amd64.deb

Linux ndi Windows Command Zitsanzo Pogwiritsa Ntchito PowerShell pa GNU

Linux ndi Windows Command Zitsanzo Pogwiritsa Ntchito PowerShell pa GNU

Choyamba, kusankha PowerShell pa GNU/Linux tiyenera kuchita pwsh lamulo, monga zikuwonekera pachithunzichi:

PowerShell: Chithunzithunzi 1

Ndipo mwakonzeka! Kuchokera apa titha kuchita pafupifupi chilichonse Lamulo la Linux Bash Shell ndi Windows PowerShell imathandizidwa, monga momwe tiwonetsera m'munsimu muzithunzi zotsatirazi ndikuchita zotsatirazi 5 malamulo malamulo:

kusuntha pakati pa akalozera

  • Set-Location ./Descargas/
  • cd /home/sysadmin

kusuntha pakati pa akalozera

Lembani zomwe zili mumsewu

  • Get-ChildItem -Path /home/sysadmin
  • ls -l /home/sysadmin

Lembani zomwe zili mumsewu

Funsani njira yomwe tayikira

  • Get-Location
  • pwd

Funsani njira yomwe tayikira

Pezani mafayilo pogwiritsa ntchito njira zosakira

  • Get-ChildItem '/opt/milagros/scripts/' -Filter '*milagros*' -Recurse
  • find /opt/milagros/scripts/ -name *milagros*

Pezani mafayilo pogwiritsa ntchito njira zosakira

Pangani, koperani, sunthani ndi kufufuta mafayilo ndi zikwatu

Pazenera

  • New-Item -ItemType File FileUbunlog.txt
  • New-Item -ItemType Directory 'DirUbunlog'
  • Copy-Item ./FileUbunlog.txt ./FileUbunlog2.txt
  • Move-Item ./FileUbunlog2.txt ./FileUbunlog3.txt
  • Remove-Item *.txt

Pangani, koperani, sunthani ndi kufufuta mafayilo ndi zikwatu mu Windows

Pa Linux

  • mkdir dirtemp
  • touch filetemp
  • mv ./filetemp ./dirtemp/
  • cp ./dirtemp/filetemp ./dirtemp/filetemp2
  • rm ./dirtemp/filetemp2

Pangani, koperani, sunthani ndi kufufuta mafayilo ndi zikwatu mu Linux

Para zambiri za PowerShell ndi malamulo ake, mukhoza kuyamba ndi zotsatirazi ulalo wovomerezeka. Kapena ina iyi, yomwe ili mkati GitHub.

PowerShell 7.2.6: Linux ndi Windows Commands pa GNU - 1

PowerShell 7.2.6: Linux ndi Windows Commands pa GNU - 2

Powershell
Nkhani yowonjezera:
Powershell, Windows console imabwera ku Ubuntu
Shell Scripting - Maphunziro 01: The Shell, Bash Shell ndi Scripts
Nkhani yowonjezera:
Kulemba kwa Shell - Maphunziro 01: Ma terminal, Consoles ndi Zipolopolo

Chikwangwani chachidule cha positi

Chidule

Mwachidule, tikukhulupirira kuti kuyang'ana koyamba PowerShell 7.2.6 " komanso kugwiritsa ntchito Linux ndi Windows commands pamwamba pa imodzi GNU Distro, pitilizani kupereka phindu ndi chidziwitso kwa ambiri, paukadaulo wowongolera GNU/Linux Terminal, mwina pa GNU/Linux kapena Windows Distros.

Ngati mumakonda zomwe zili, ndemanga ndikugawana. Ndipo kumbukirani, pitani ku chiyambi chathu «Website», kuwonjezera pa njira yovomerezeka ya uthengawo kuti mumve zambiri, maphunziro ndi zosintha za Linux. Kumadzulo gulu, kuti mudziwe zambiri pamutu wamakono.


Zomwe zili m'nkhaniyi zikutsatira mfundo zathu za malamulo okonzekera. Kuti mufotokoze cholakwika dinani Apa.

Khalani oyamba kuyankha

Siyani ndemanga yanu

Anu email sati lofalitsidwa.

*

*

  1. Wotsogolera pazosankhazi: Miguel Ángel Gatón
  2. Cholinga cha deta: Control SPAM, kasamalidwe ka ndemanga.
  3. Kukhazikitsa: Kuvomereza kwanu
  4. Kulumikizana kwa zomwe zafotokozedwazo: Zomwezo siziziwululidwa kwa anthu ena kupatula pakukakamizidwa mwalamulo.
  5. Zosunga: Zosungidwa ndi Occentus Networks (EU)
  6. Ufulu: Nthawi iliyonse mutha kuchepetsa, kuchira ndikuchotsa zidziwitso zanu.