Sail


手在键盘敲很轻


cmder在WSL中方向键失灵

今天才知道WIN10已经内置了linux子系统,也就是WSL

Bash on Windows provides developers with a familiar Bash shell and Linux environment in which you can run most Linux command-line tools, directly on Windows, UNMODIFIED, without needing an entire Linux virtual machine!

Bash/WSL allows you to:

Run common command-line utilities such as grep, sed, awk, etc.
Use the Linux-compatible filesystem & hierarchy and access fixed Windows storage mounted under /mnt/…
Run Bash shell scripts and Linux command-line apps. including
Tools: vim, emacs, tmux
Languages: Javascript/node.js, Ruby, Python, C/C++, C# & F#, Rust, Go, etc.
Services: sshd, MySQL, Apache, lighttpd,
Install additional Linux tools using apt
Invoke Windows applications from within Bash
Invoke Linux applications from within Windows!
Bash on Windows runs Ubuntu user-mode binaries provided by Canonical. This means the command-line utilities are the same as those that run within a native Ubuntu environment.


作者向来是用cmder写命令的

中途遇到一个问题

进入WSL后,上下键翻滚命令失效了

由于cmder和bash.exe不兼容,如果你直接输入bash ~,那么进入子系统后将无法使用方向键和Home/PageUp/PageDown等键都无法使用

网上常见的配置

1
%windir%\system32\bash.exe -cur_console:p1

解决办法,进入setting->Startup->Command line,输入

1
%windir%\system32\bash.exe ~ -cur_console:p:n

cmder + WSL,对我来说很是完美,能满足大部分需求了


参考/资料

© 2016-2019. | 由Hexo强力驱动 | 主题Huno | 渝ICP备17002561号 | 不装弱了,我要做大佬