tac*_*yon 6 terminal powershell command-line windows-11
我使用的是Windows 11。在终端中,常用的Linux命令不可用。因此,诸如chmod和vim之类的命令会返回如下命令行错误:
vim : The term 'vim' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ vim ~/.bashrc
+ ~~~
+ CategoryInfo : ObjectNotFound: (vim:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?我时隔十年才使用 Windows,请多多包涵!
Kel*_*ari 60
Windows 不是 Linux。如果不安装适用于 Linux的 Windows 子系统(WSL)、 MinGW-w64或Cygwin等第三方工具或 Linux虚拟机,则 Windows 上不支持 Linux 命令或实用程序。
根据您的要求,其中一个或另一个第三方工具/套件很可能会满足您的需求。
如果您编辑问题并提供更多详细信息,我们可以为您指出最合适的解决方案。
小智 10
Windows和Linux是有区别的操作系统,默认情况下不支持Linux命令或shell命令。但是您可以安装Windows Subsystem for Linux (WSL)以启用在系统上执行 Linux 命令。
需要注意的是,Windows Subsystem for Linux (WSL)仅适用于Windows 10 及更高版本。它与任何早期版本的 Windows 操作系统都不兼容。
有多种第三方工具可用于在 Windows 系统上运行 Linux 命令,例如
Git Bash
Cygwin
MSYS2
Babun
Gow
UWin
MinGW
PowerShell with Windows Compatibility Pack
Run Code Online (Sandbox Code Playgroud)
用户可以自行决定是安装 WSL 还是使用第三方应用程序在 Windows 系统上执行 Linux 命令。
您还可以使用Oracle VM VirtualBox在一台计算机上同时运行多个操作系统,而无需单独的硬件(包括 Linux)。
| 归档时间: |
|
| 查看次数: |
9865 次 |
| 最近记录: |