Certainly, when it comes to using Free and open operating systems based in GNU / Linux, the use of the terminal is usually more common than, when it comes to Private and closed operating systemsAs Windows and macOS. However, in both the terminal is present and each with their respective Terminals and Shells.
And, as many will already know from different sources, Microsoft has time betting on him open source and the convergence of many of its Windows applications on GNU/Linux. being one of them, PowerShell. Which is a modern command shell that includes the best features of other popular shells. One, unlike others, which only accept and return text, accepts and returns objects.
And, before starting this post of "PowerShell 7.2.6" and using Linux and Windows commands on a GNU Distro, we recommend exploring the following related contents, at the end of reading it:
Table of Contents
- 1 Using Windows PowerShell 7.2.6 on GNU/Linux Distros
- 2 Your Order
Using Windows PowerShell 7.2.6 on GNU/Linux Distros
Installation of PowerShell on GNU/Linux
sudo dpkg -i ./Descargas/powershell_7.2.6-1.deb_amd64.deb
Linux and Windows Command Examples Using PowerShell on GNU
First, to start PowerShell on GNU/Linux we must execute the pwsh command, as seen in the following image:
And ready! From here we can execute almost any Linux Bash Shell command and Windows PowerShell supported, as we will show below in the following images with the execution of the following 5 command orders:
move between directories
List route contents
Get-ChildItem -Path /home/sysadmin
ls -l /home/sysadmin
Request the route where we are positioned
Find files using search patterns
Get-ChildItem '/opt/milagros/scripts/' -Filter '*milagros*' -Recurse
find /opt/milagros/scripts/ -name *milagros*
Create, copy, move and delete files and folders
New-Item -ItemType File FileUbunlog.txt
New-Item -ItemType Directory 'DirUbunlog'
Copy-Item ./FileUbunlog.txt ./FileUbunlog2.txt
Move-Item ./FileUbunlog2.txt ./FileUbunlog3.txt
mv ./filetemp ./dirtemp/
cp ./dirtemp/filetemp ./dirtemp/filetemp2
In short, we hope that initial look at "PowerShell 7.2.6" and the use of Linux and Windows commands on a GNU Distro, continue to provide value and knowledge to many, on the technical field of managing the GNU/Linux Terminal, either on GNU/Linux or Windows Distros.
If you liked the content, comment and share it. And remember, visit the beginning of our «site», in addition to the official channel of Telegram for more news, tutorials and Linux updates. West group, for more information on today's topic.