天天看点

Windows10中的Ubuntu子系统(WSL)安装使用疑问

Windows Subsystem for Linux(WSL)

安装

Windows10开启Ubuntu子系统简易步骤

Win10重置/注销Linux子系统教程

Windows10终端优化方案:Ubuntu子系统+cmder+oh-my-zsh

在wsl中使用oh-my-zsh

windows 10 linux子系统oh-my-zsh与Cmder配置-2018

WSL+cmder+oh-my-zsh美化win10命令工具(terminal)

"https://github.com/powerline/fonts,不过这个实在是有点慢,这里我已经下载下来放在了这里。"安装里面Hack/Hack-Bold.ttf字体,并在cmder里面安装使用即可

使用

WSL与Windows交互实践

win下终端可以直接输入wsl进入,exit退出,或者直接使用wsl+linux命令执行。

使用Brew

Using Brew on Windows 10 with Windows Subsystem for Linux (WSL)

为什么重启shell后,如果要执行相关命令(如hello),要先执行“使环境生效”的代码?

即以下代码

test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
           

怎么才能自动生效?

疑问

自带了git,能看到git目录,但不能cd到cd /usr/bin/git?

$ cd /usr/bin
$ ls
 ginstall-info                        pstree.x11                         whoami
 git                                  ptar                               wifi-status
 git-receive-pack                     ptardiff                           write
 git-shell                            ptargrep                           wslfetch
 git-upload-archive                   ptx                                wslsys
$ cd /usr/bin/git
-bash: cd: /usr/bin/git: Not a directory