当然,在使用时 免费和开放的操作系统 基于 GNU / Linux的, 终端的使用通常比 私有和封闭的操作系统如 Windows和macOS. 但是,两个终端都存在,并且每个终端都有各自的终端和外壳。
而且,正如许多人已经从不同的来源知道的那样, 微软 有时间赌他 开放源码 和它的许多收敛 GNU/Linux 上的 Windows 应用程序. 作为其中之一, PowerShell的. 这是一个现代命令 shell,包含其他流行 shell 的最佳功能。 一,与其他只接受和返回文本不同,接受和返回对象。
而且,在开始这篇文章之前 “PowerShell 7.2.6” 和使用 Linux 和 Windows 命令 超过一个 GNU发行版,我们建议探索以下 相关内容,在阅读结束时:
在 GNU/Linux 发行版上使用 Windows PowerShell 7.2.6
在 GNU/Linux 上安装 PowerShell
利用 PowerShell的关于我现在的 GNU / Linux操作系统,叫 奇迹 (MX Linux 的转版)我们安装它 版本 7.2.6 中的“.deb 文件”,使用以下命令:
sudo dpkg -i ./Descargas/powershell_7.2.6-1.deb_amd64.deb
在 GNU 上使用 PowerShell 的 Linux 和 Windows 命令示例
首先,开始 GNU/Linux 上的 PowerShell 我们必须执行 pwsh 命令,如下图所示:
准备好了! 从这里我们可以执行几乎任何 支持 Linux Bash Shell 命令和 Windows PowerShell,如下图所示,执行以下 5 个命令命令:
在目录之间移动
Set-Location ./Descargas/
cd /home/sysadmin
列出路线内容
Get-ChildItem -Path /home/sysadmin
ls -l /home/sysadmin
请求我们所在的路线
Get-Location
pwd
使用搜索模式查找文件
Get-ChildItem '/opt/milagros/scripts/' -Filter '*milagros*' -Recurse
find /opt/milagros/scripts/ -name *milagros*
创建、复制、移动和删除文件和文件夹
在窗户上
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
在Linux上
mkdir dirtemp
touch filetemp
mv ./filetemp ./dirtemp/
cp ./dirtemp/filetemp ./dirtemp/filetemp2
rm ./dirtemp/filetemp2
至 有关 PowerShell 及其命令的更多信息, 你可以从以下开始 官方链接. 或者另一个,它位于 GitHub上.
总结
总之,我们希望初步了解 “PowerShell 7.2.6” 和使用 Linux 和 Windows 命令 超过一个 GNU发行版,继续为许多人提供价值和知识,在管理技术领域 GNU/Linux 终端,在 GNU/Linux 或 Windows 发行版上。
如果你喜欢内容, 评论并分享. 请记住,访问我们的开始 «现场»,除了官方渠道 Telegram 了解更多新闻、教程和 Linux 更新。 西方 组,以获取有关今天主题的更多信息。