WSL(Windows Subsystem for Linux)の設定
前提
- WSLが利用可能であること
- Ubuntu18.04
Setup
# 日本からミラーするように
sudo sed -i -e 's%http://.*.ubuntu.com%http://ftp.jaist.ac.jp/pub/Linux%g' /etc/apt/sources.list
# アップデート
sudo apt update -y && apt upgrade -y
# fish 準備
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update -y
# install fish
sudo apt install -y fish
# change default shell .bashrc
exec fish
# install fisher
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher
fisher -v
# add theme
fisher add oh-my-fish/theme-agnoster
# font powerline
git clone https://github.com/powerline/fonts.git
# mv c drive
sudo mv fonts /mnt/c/
- C:\fonts\SourceCodePro\Source Code Pro for Powerline.otf
-
ConEmu
- https://www.fosshub.com/ConEmu.html
- Download ConEmu Stable, Installer (32-bit, 64-bit)
-
ConEmu Settings
%windir%¥system32¥bash.exe ~ -new_console:t:"Fish" -cur_console:p -c fish
- 見た目完成
# bashコマンドが使えるように
fisher add edc/bass
# ctrl + R
fisher add jethrokuan/fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
# bd
fisher add 0rax/fish-bd
vim ~/.config/fish/config.fish
## vimで開く
alias vi='/usr/bin/vim'
## for windows explorer (required win10 creators update)
alias open='explorer.exe'
alias e='explorer.exe .'
# cd > ls
function cd
builtin cd $argv
ls -a
end
# lsの色を見やすく変更
if test ! -e ~/.dircolors/dircolors.ansi-dark
git clone https://github.com/seebi/dircolors-solarized.git ~/.dircolors
end
eval (dircolors -c ~/.dircolors/dircolors.ansi-dark)
# aliases for git
alias g="git"
alias gd="git diff"
alias ga="git add"
alias gca="git commit -a -m"
alias gcm="git commit -m"
alias gbd="git branch -D"
alias gp="git push"
alias gb="git branch"
alias gcob="git checkout -b"
alias gco="git checkout"
alias gba="git branch -a"
alias glog="git log --graph --date=iso --pretty='[%ad]%C(auto) %h%d %Cgreen%an%Creset : %s'"
alias gll="git log --pretty=format:'%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]' --decorate --numstat"
# install Home-Brew
sudo apt install build-essential curl file git
curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh | sh
~/.config/fish/config.fish
alias brew='/home/linuxbrew/.linuxbrew/bin/brew'
brew update
# Hugo
- Windowsだとgitsubmoduleがうまく動作出来なかった。(調査中)
wget https://github.com/gohugoio/hugo/releases/download/v0.58.3/hugo_0.58.3_Linux-64bit.deb
sudo dpkg -i hugo_0.58.3_Linux-64bit.deb
hugo version
git clone https://github.com/icck/myblog.git
git submodule add git@github.com:icck/icck.github.io.git public
chmod +x deploy.sh
# set ssh key
ssh-keygen
# ./git/config
url = https://username:password@github.com....