不久前,我在 Microsoft 的网站上阅读了有关 PowerShell 可用于 Ubuntu 的内容。
我将如何安装 PowerShell?我很感激Xenial和Trusty 的指导。
任何安装方法都可以,无论是编译源代码还是依赖包管理器。源代码编译方法应该包含初学者级别的细节。
我正在尝试按照以下步骤在 Ubuntu 17.04 中安装 Powershell:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
sudo apt-get update
sudo apt-get install -y powershell
Run Code Online (Sandbox Code Playgroud)
我知道我正在使用 16.04 包/内置安装。不幸的是我找不到 17.04 的那个。
这是我遇到的错误 sudo apt-get install -y powershell
The following packages have unmet dependencies:
powershell : Depends: libicu55 but it is not installable
Run Code Online (Sandbox Code Playgroud)
然后我尝试:
apt-cache search libicu
Run Code Online (Sandbox Code Playgroud)
我也找不到要安装的 libicu55。有没有办法在 Ubuntu 17.04 中安装 Powershell?
我在 Ubuntu 20.04 上安装PowerShell 7时遇到问题。我使用Ubuntu 软件安装了 powershell 7.0.3,这是可用的最新/稳定版本。无错误安装后,我无法启动 powershell。附上截图。我在桌面文件上找不到应该指定 exec 字段的文档。我注意到 v7 是“PowerShell 预览版”。这是否意味着我应该安装 v6?如果是这样,如何获得版本?
$ uname -r
5.4.0-47-generic
Run Code Online (Sandbox Code Playgroud)
更新:我已经通过 Ubuntu 软件成功安装了 PowerShell 7.1.0。谢谢你,百万美元!
我被分配了一个要在 Windows PowerShell 中完成的项目。我熟悉 shell 脚本,但它是一项新技术。有人告诉我,它类似于 shell,除了很少的语法更改。
我有一周的时间来学习和理解基础知识。
我试图寻找一个模拟器,但找不到。我的笔记本电脑上没有双系统。帮我看看这里。
我是否需要在我的笔记本电脑上安装 Windows 以便我可以在家里练习这些命令,或者在 Ubuntu 中有一个可用的解决方案,而无需更改我的操作系统。
在 Ubuntu 19.04 中sudo apt install powershell
失败
The following packages have unmet dependencies:
powershell : Depends: libssl1.0.0 but it is not installable
Depends: libicu60 but it is not installable
Run Code Online (Sandbox Code Playgroud)
用snap install powershell --classic
作品安装它,但它没有出现,/etc/shells
所以chsh
不起作用。
如何解决这个问题?
微软在 PowerShell 7.3.0 版本中添加了一个名为Predictive IntelliSense的巧妙功能,它会根据历史记录在您键入时自动建议输入命令。只需按(右箭头)键即可接受此类建议\xe2\x86\x92。
\n\n\nUbuntu 的 Bash 也能达到类似的效果吗?我确实知道我可以使用Ctrl+ R,但它似乎不那么方便。
\n