Install dev env on Ubuntu on Windows 10
bash
回车,按提示安装,新建用户,正常使用 Linuxsudo vim /etc/apt/source.list
sudo apt-get update
sudo apt-get upgrade
/etc/apt/source.list
需要更新的内容
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
sudo apt-get install python python-pip
mkdir ~/.pip
vim ~/.pip/pip.conf
sudo pip install --upgrade pip
sudo pip install virtualenv virtualenvwrapper
~/.pip/pip.conf
的内容
[global]
trusted-host = mirrors.aliyun.com
index-url = http://mirrors.aliyun.com/pypi/simple/
参考 https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions ,通过 apt-get
直接获取的 node 和 npm 版本太老
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
npm config set registry https://registry.npm.taobao.org
sudo npm install grunt-cli -g
sudo apt-get install redis-server
sudo service redis-server start
sudo apt-get install mongodb
sudo service mongodb start
sudo apt-get install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
让 cmder 默认启动 zsh
https://gingter.org/2016/11/16/running-windows-10-ubuntu-bash-in-cmder/
vim ~/.tmux.conf
tmux source ~/.tmux.conf
~/.tmux.conf
的内容
set-option -g default-shell /usr/bin/zsh
set -g default-terminal "screen-256color"
bind-key -n F8 new-window
bind-key -n F9 command-prompt 'rename-window %%'
bind-key -n F10 detach
bind-key -n F11 previous-window
bind-key -n F12 next-window
bind-key b send-prefix
set-window-option -g window-status-current-fg brightyellow
set -g status-right "#h %Y-%m-%d %H:%M"