简体   繁体   English

如何从cmder而不是wsl bash运行常规bash?

[英]How to run regular bash from cmder and not wsl bash?

After I install docker on my windows 10, I get a message that I need to install wsl2 also.在我的 windows 10 上安装 docker 后,我收到一条消息,我还需要安装 wsl2。 - So I did. - 所以我做了。

But now my cmder run wsl when I run bash command.但是现在当我运行 bash 命令时,我的cmder运行wsl before it just run the bash command.在它运行bash命令之前。

the problem with bash wsl most of my commands are not avaiable. bash wsl的问题我的大多数命令都不可用。

How to restore the settings to run bash not by wsl ?如何恢复设置以运行bash而不是wsl

In Cmder, open settings: Win + Alt + P在Cmder中,打开设置: Win + Alt + P

  1. Under Startup > Tasks, add a task called {bash} with the following settings:在 Startup > Tasks 下,添加一个名为 {bash} 的任务,其设置如下:

    Task parameters (set icon):任务参数(设置图标):

      For Cmder icon:  /icon "%CMDER_ROOT%\cmder.exe"
      For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"

Commands (open Git's bash shell):命令(打开 Git 的 bash shell):

      "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
  1. Under Startup, set startup options to Specified name task --> {bash}在 Startup 下,将启动选项设置为Specified name task --> {bash}

Please check below couple of articles and should solve an issue.请检查以下几篇文章,应该可以解决问题。

https://gist.github.com/nickautomatic/02ccb76292f7f8d9767e https://gingter.org/2016/11/16/running-windows-10-ubuntu-bash-in-cmder/ https://gist.github.com/nickautomatic/02ccb76292f7f8d9767e https://gingter.org/2016/11/16/running-windows-10-ubuntu-bash-in-cmder/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 WSL (Ubuntu) Bash 运行 Windows 可执行文件 - How can I run a Windows executable from WSL (Ubuntu) Bash Windows 10-Bash(WSL)| 如何在bash上运行Atom构建? - Windows 10 - Bash (WSL) | How to run Atom build on bash? Cmder bash 脚本正在执行 - Cmder bash script executing 如何从现有的 WSL bash window 启动新的 WSL bash window - How to launch a new WSL bash window from an existing WSL bash window WSL(Ubuntu):如何从 bash 终端在浏览器中打开本地主机 - WSL (Ubuntu): how to open localhost in browser from bash terminal 从 python 中使用 WSL bash - Using WSL bash from within python 从 WSL 启动 VS Code Bash - Launch VS Code from WSL Bash “tls:收到长度超过20527的超大记录”试图从Win10 WSL Bash“docker run” - “tls: oversized record received with length 20527” trying to “docker run” from Win10 WSL Bash only fgets 在 Windows 上从 bash 运行时导致 C 程序挂起,但在从 CMD 或 WSL 运行时正常工作 - fgets causes C program to hang when run from bash on Windows, but works correctly when run from CMD or WSL 如何使用cmder设置Intellij idea终端路径但使用git bash.exe启动? - How to setup Intellij idea terminal path with cmder but initiated with git bash.exe?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM