PowerShell 7.2.6: Amfani da Linux da Dokokin Windows a GNU

PowerShell 7.2.6: Amfani da Linux da Dokokin Windows a GNU

PowerShell 7.2.6: Amfani da Linux da Dokokin Windows a GNU

Hakika, a lokacin da za a yi amfani da Tsarin aiki kyauta da budewa tushen a GNU / Linux, amfani da tasha yawanci ya fi na kowa fiye da, idan ya zo Tsarin aiki mai zaman kansa da rufewa, ta yaya Windows da macOS. Koyaya, a cikin duka tashar tashoshi tana nan kuma kowannensu yana da tasha da Shells.

Kuma, kamar yadda mutane da yawa za su riga sun sani daga tushe daban-daban. Microsoft yana da lokacin yin fare a kansa bude hanya da haduwar da yawa daga cikinta Aikace-aikacen Windows akan GNU/Linux. kasancewar daya daga cikinsu, PowerShell. Wanne harsashi na umarni na zamani wanda ya haɗa da mafi kyawun fasalulluka na sauran mashahuran harsashi. Daya, sabanin sauran, wanda kawai karba da mayar da rubutu, karba da kuma mayar da abubuwa.

game da PowerShell

Kuma, kafin fara wannan post na "PowerShell 7.2.6" da kuma amfani da Linux da Windows umarni a kan daya GNU Distro, muna ba da shawarar bincika masu zuwa abubuwan da ke da alaƙa, a karshen karanta shi:

game da PowerShell
Labari mai dangantaka:
PowerShell, shigar da wannan harsashi na layin umarni akan Ubuntu 22.04

Powershell
Labari mai dangantaka:
Microsoft PowerShell Core tuni ya kai sigar ta 6.0

Amfani da Windows PowerShell 7.2.6 akan GNU/Linux Distros

Amfani da Windows PowerShell 7.2.6 akan GNU/Linux Distros

Shigar da PowerShell akan GNU/Linux

Don yin amfani da PowerShellgame da halin yanzu GNU / Linux Operating Systemda ake kira Al'ajibai (respin na MX Linux) mun shigar da shi ".deb fayil" a cikin sigar ta 7.2.6, ta amfani da umarni mai zuwa:

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

Misalan Umurnin Linux da Windows Amfani da PowerShell akan GNU

Misalan Umurnin Linux da Windows Amfani da PowerShell akan GNU

Na farko, don farawa PowerShell akan GNU/Linux dole ne mu aiwatar da umarnin pwsh, kamar yadda aka gani a hoto mai zuwa:

PowerShell: Hoton hoto 1

Kuma a shirye! Daga nan za mu iya aiwatar da kusan kowane Linux Bash Shell umurnin da Windows PowerShell yana goyan bayan, kamar yadda za mu nuna a ƙasa a cikin hotuna masu zuwa tare da aiwatar da umarni 5 masu zuwa:

matsa tsakanin kundayen adireshi

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

matsa tsakanin kundayen adireshi

Jerin abubuwan da ke cikin hanya

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

Jerin abubuwan da ke cikin hanya

Nemi hanyar da aka sanya mu

  • Get-Location
  • pwd

Nemi hanyar da aka sanya mu

Nemo fayiloli ta amfani da tsarin bincike

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

Nemo fayiloli ta amfani da tsarin bincike

Ƙirƙiri, kwafi, matsar da share fayiloli da manyan fayiloli

A kan windows

  • 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

Ƙirƙiri, kwafi, matsar da share fayiloli da manyan fayiloli a cikin Windows

A Linux

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

Ƙirƙiri, kwafi, matsar da share fayiloli da manyan fayiloli a cikin Linux

para ƙarin bayani game da PowerShell da umarninsa, za ku iya farawa da wadannan mahada na hukuma. Ko kuma wannan, wanda yake a ciki GitHub.

PowerShell 7.2.6: Linux da Dokokin Windows akan GNU - 1

PowerShell 7.2.6: Linux da Dokokin Windows akan GNU - 2

Powershell
Labari mai dangantaka:
Powershell, na'urar komputa ta Windows tazo Ubuntu
Rubutun Shell - Koyarwa 01: Shell, Bash Shell da Rubutun
Labari mai dangantaka:
Rubutun Shell - Koyawa 01: Tashoshi, Consoles da Shells

Banner Abstract don post

Tsaya

A takaice dai, muna fatan kallon farko "PowerShell 7.2.6" da kuma amfani da Linux da Windows umarni a kan daya GNU Distro, ci gaba da ba da ƙima da ilimi ga mutane da yawa, akan fannin fasaha na sarrafa abubuwan GNU/Linux Terminal, ko dai akan GNU/Linux ko Windows Distros.

Idan kuna son abun ciki, kayi comment da sharing. Kuma ku tuna, ziyarci farkon mu «shafin yanar gizo», ban da official channel na sakon waya don ƙarin labarai, koyawa da sabunta Linux. Yamma rukuni, don ƙarin bayani kan batun yau.


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.