WSL → Linuxbrew → fish → fisher → VSCode

h tps : // / b w. sh / 2019/02/02 / 칭찬 브레 w-2.0.0 /

Linuxbrew가 WSL에서 공식 지원 YATTA! YATTA!

그래서 WSL의 개발 환경 구축을 리뉴얼하는 좋은 기회이므로 비망을 하면.

최종 목표는 VSCode의 터미널에서 WSL::fish에서 닌마리. 입니다.

WSL



Windows Subsystem for Linux Installation Guide for Windows 10

위 단계에서 우분투 설치 후 패키지 업데이트
$ sudo apt update
$ sudo apt upgrade

Linuxbrew


$ sudo apt-get install build-essential curl file git
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
$ echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.profile
$ . ~/.profile
brew doctor 를 실행하여 Warning을 지시 내용에 따라 해결
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don\'t worry or file an issue; just ignore this. Thanks!

Warning: The following directories do not exist:
/home/linuxbrew/.linuxbrew/var/homebrew/linked

You should create these directories and change their ownership to your account.
  sudo mkdir -p /home/linuxbrew/.linuxbrew/var/homebrew/linked
  sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/linked

Warning: umask is currently set to 000. Directories created by Homebrew cannot
be world-writable. This issue can be resolved by adding umask 002 to
your ~/.bash_profile
  echo 'umask 002' >> ~/.bash_profile

$ sudo mkdir -p /home/linuxbrew/.linuxbrew/var/homebrew/linked
$ sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/linked
$ echo 'umask 002' >> ~/.bash_profile
$ . ~/.bash_profile
$ brew doctor
Your system is ready to brew.

fish



Friendly interactive shell

디폴트가 너무 최고인 Shell, 엉뚱한 와타시에 딱.
$ brew install fish
$ sudo sh -c "echo /home/linuxbrew/.linuxbrew/bin/fish >> /etc/shells"
$ chsh -s /home/linuxbrew/.linuxbrew/bin/fish

터미널을 다시 시작하고 Linuxbrew의 Path를 통과합니다.
$ echo 'eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.config/fish/config.fish
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don\'t worry or file an issue; just ignore this. Thanks!

Warning: umask is currently set to 000. Directories created by Homebrew cannot
be world-writable. This issue can be resolved by adding umask 002 to
your ~/.config/fish/config.fish
  echo 'umask 002' >> ~/.config/fish/config.fish

$ echo 'umask 002' >> ~/.config/fish/config.fish
$ . ~/.config/fish/config.fish
$ brew doctor
Your system is ready to brew.

fisher



fish의 plugin 관리 도구입니다. 이번에는 fish에 Powerline-style을 도입합니다.
$ curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish

터미널을 다시 시작하고 테마를 설치.
$ fisher add oh-my-fish/theme-agnoster

VSCode



VSCode는 설치되어 있다고 가정합니다.

터미널용 "Source Code Pro for Powerline"을 설치합니다.
# 任意のwindowsのディレクトリにgit clone
$ git clone https://github.com/powerline/fonts

탐색기에서 fonts/SourceCodePro를 열고 Source Code Pro for Powerline.otf 설치

VSCode의 settngs.json에 다음을 설명

settings.json
{
  "terminal.integrated.shell.windows": "C:/WINDOWS/system32/wsl.exe",
  "terminal.integrated.fontFamily": "'Source Code Pro for Powerline'",
}

VSCode 터미널을 다시 시작하여 완료되었습니다.


Linuxbrew에서 개발 환경을 만들게되어 기쁩니다.

좋은 웹페이지 즐겨찾기