My Env Configures for Ubuntu
account & verify
-
ssh-copy-id for windows
Get-Content ~\.ssh\id_rsa.pub | ssh <user>@<hostname> "mkdir -p .ssh;cat >> .ssh/authorized_keys"
-
new user with sudo perm
sudo useradd -G sudo -m -d /home/newuser newuser
TimeZone, apt
TimeZone
https://askubuntu.com/a/594186
sudo timedatectl set-timezone <timeszone>
sudo timedatectl set-timezone PRC
timedatectl list-timezones
apt
sudo sed -i 's/ubuntu/mirror/g' /etc/apt/sources.list
example:
sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sudo sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
Vim, zsh
oh my zsh
- Install
https://github.com/ohmyzsh/ohmyzsh/wiki
sh -c "$(wget -O- https://raw.githubusercontents.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
raw.githubusercontent.com -> raw.githubusercontents.com
[ s ] - Plugins
plugins=(git zsh-autosuggestions common-aliases z sudo)
git zsh-autosuggestions common-aliases z sudo
https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh
git clone https://ghproxy.net/github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
vim
-
plugin
- vim-plug
https://github.com/junegunn/vim-plug
auto: https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation - install plug & check vim-plug
:PlugInstall
- vim-plug
-
sudoedit
export SUDO_EDITOR=/usr/bin/vim sudoedit() { SUDO_COMMAND="sudoedit $1" command sudoedit "$1" }
pip
- source
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/