ubuntu20.04初始化

ubuntu20.04初始化
Page content

ubuntu20.04的各种配置记录

安装ohmyzsh及其他组件

# 安装必备组件
sudo apt install net-tools openssh-server curl wget git zsh silversearcher-ag fd-find vim python3-pip -y
# 安装ohmyzsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# 添加组件
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
# 更新配置
sed -i 's/plugins=(git/plugins=(git zsh-autosuggestions zsh-syntax-highlighting/g' $HOME/.zshrc
echo 'alias fd=fdfind' >> $HOME/.zshrc
echo 'alias vi=vim' >> $HOME/.zshrc
echo 'alias pip="python3.8 -m pip"'  >> $HOME/.zshrc
echo 'alias venv="python3.8 -m venv"' >> $HOME/.zshrc
echo 'alias activate="source venv/bin/activate"' >> $HOME/.zshrc
source $HOME/.zshrc
# 设定pip全局
mkdir  $HOME/.pip
echo -e  "[global]
timeout = 60
index-url = https://pypi.doubanio.com/simple" >  $HOME/.pip/pip.conf
# 安装必备
pip install httpie

安装ngrok

sudo apt install snapd -y
sudo snap install ngrok

# or

curl -O https://raw.githubusercontent.com/vincenthsu/systemd-ngrok/master/install.sh
chmod +x install.sh
sudo ./install.sh <your_authtoken>