开发工具 Windows Subsystem for Linux 简单测试

neutralevil · 2016年04月07日 · 最后由 jasl 回复于 2016年04月07日 · 4005 次阅读

切换到 Insider fast track,终于在今天早上刷到了更新。

  1. 视频中在 cmd 下输入的 bash 命令,其实是个 Windows 程序,相当于进入 Linux 的入口,没有别的功能。不过可以通过命令行参数运行别的 Linux 程序,给 Windows 程序(IDE/text editor)调用 Linux 命令行程序提供了可能。
  2. 安装方法参照微软官方文档:https://msdn.microsoft.com/zh-cn/commandline/wsl/install_guide
  3. 运行的时候遇到Error: 0x80070057,参考这里解决:https://github.com/Microsoft/BashOnWindows/issues/7
  4. 先测试了一下我比较关心的 git 速度,还比较满意,在我的工程目录运行time git status:
  • git for Windows,预热: real 0m56.898s user 0m24.828s sys 0m47.358s
  • git for Windows,预热后: real 0m19.624s user 0m3.015s sys 0m31.155s
  • git on WSL,预热: real 0m21.565s user 0m8.078s sys 0m13.469s
  • git onWSL,预热后: real 0m4.250s user 0m0.203s sys 0m4.031s

而且 Windows 版 git 运行时,其进程 CPU 占用率大概 20-30%,Linux 版只有 10% 左右。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号