在Windows上模拟Linux终端和shell命令[关闭]


0

好吧,我习惯了Linux / Unix之类的终端及其命令,现在我正在使用Windows。有谁知道如何模拟Linux终端和bash命令?


1
你看过cygwin吗?您希望获得“终端”的部分内容吗?你是否只想拥有bash和相关的作业控制/ gnu工具,或者你真的喜欢xterms或gnome终端或其他东西的某些功能吗?
— Eric Renouf

Answers:


6

好吧,我不知道一个独特的软件完美地完成它,但是,我知道两个很棒的软件(一个用于终端模拟器,另一个用于shell命令)可以一起工作并完美地完成它。

ConEmu(用于Windows的Linux终端仿真器) 和 WinBash(Linux bash程序到Windows)

预习

ConEmu with win-bash

设置它

  1. 提取 conemu 在目录中( C:/conemu )
  2. 提取 win-bash 目录中的文件( C:/winbash )
  3. 打开 conemu C:/conemu/ConEmu.exe 要么 C:/conemu/ConEmu64.exe

    • 3.1进入菜单,设置(Win + Alt + P)
    • 3.2转到 Startup 菜单
    • 3.3检查 Command Line 项目
    • 3.4放 C:/winbash/sh.exe 路径
      enter image description here
    • 3.5单击 Save Settings...
    • 3.6关闭并重新打开 conemu

其他shell库

您也可以使用您想要的任何其他shell库,我个人使用 Gt Bash 代替 win-bash因为 Git Bash 是win-bash还有更多命令,比如 git 和 curl但是,你可以放入你的自定义 .exe, .dlls etc. 在 C:/winbash 夹。

  • 如果你想用它来设置它 Git Bash 代替 win-bash 安装它并设置 $GIT_INSTALLATION_PATH/bin/sh.exe 在3.4步骤中, C:\Program Files (x86)\Git\bin\sh.exe (例如)改为 C:/winbash/sh.exe

Obs:我不使用 git bash 代替 conemu 因为 conemu 在我看来,互动更好。


这是一个很好的答案,我会投票给Git Bash解决方案而不是Win Bash解决方案。
— Maffelu
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.