feature
usage flow
centos:7.6
1. **choose system, then reset root password**
1. yum install git -y
3. clone dotfiles
4. execute ./centos/zsh-install.sh
5. execute ./centos/docker-install.sh
6. execte install.sh
7. **`notice: please us root account`: reset root password, and use as root**
ubuntu:20.04
1. **choose system, then reset root password**
1. sudo apt-get install git -y
2. clone dotfiles
3. execute ./ubuntu/zsh-install.sh
4. execute ./ubuntu/docker-install.sh
5. execte install.sh
6. **`notice: please us root account`: reset root password, and use as root**
使用 ssh 连接时需要 fira code 字体的支持
install zsh: yum | apt-get
# 1. 查看当前终端
echo $SHELL
# 2. 查看所有可用终端
cat /etc/shells
# 3. 安装终端
yum -y install zsh
echo $ZSH_VERSION
# 4. 切换使用 zsh
chsh -s $(which zsh)
chsh -s /bin/zsh
[centos]version control and version >= 5.0.2
sudo yum update -y
sudo yum install -y git make ncurses-devel gcc autoconf man yodl
git clone -b zsh-5.7.1 https://github.com/zsh-users/zsh.git /tmp/zsh
cd /tmp/zsh
./Util/preconfig
./configure
sudo make -j 20 install
install oh-my-zsh: ./install.sh
core
# 1. install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# 2. un-install
uninstall_oh_my_zsh zsh
切换
exec bash
exec zsh
使用
# 1. 相关环境变量需要配置在 .zshrc | .zshrc_custom
# 2. source ~/.zshrc
plugins: omz plugin info [systemd]
config git
git config --global user.name 'Alice52'
git config --global user.email 'zzhang_xz@163.com'
ssh-keygen -t rsa -C 'zzhang_xz@163.com'
install or upgrade pip3
pip[3] install --upgrade pip
install docker-compose
pip[3] uninstall docker-compose
config python3 as default python
# set python3 default
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
# get list alternatives
update-alternatives --list python
# choose version
update-alternatives --config python