关于Ubuntu20.4的初始配置
作者:互联网
换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
sudo apt-get update
sudo apt-get upgrade -y
oh-my-zsh
sudo apt-get install zsh
chsh -s /bin/zsh
sudo reboot
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
source .zshrc
安装powerlevel10k
git clone https://gitee.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
ZSH_THEME=powerlevel10k/powerlevel10k
source .zshrc
#当命令正确则高亮绿色,否则为红色
git clone https://gitee.com/jklash1996/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
source ~/.zshrc
#让曾经输入过的命令按下 → 即可补全
git clone https://gitee.com/mattuy/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
修改.zshrc plugins=(zsh-autosuggestions git)
source .zshrc
thefuck
按道理Ubuntu20.4自带了python3和pip3,如果没带,请安装
sudo apt install python3-dev python3-pip python3-setuptools
sudo pip3 install thefuck
vim .zshrce
#在最后加上
eval "$(thefuck --alias fuck)"
source .zshrce
docker docker-compose
#官方脚本安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
#pip3安装docker-compose
sudo pip3 install docker-compose
#如果pip3没有安装成功,请升级或者使用
sudo apt-get install docker-compose && docker-compose
java1.8
wget -O jdk-8u333-linux-x64.tar.gz https://download.oracle.com/otn/java/jdk/8u333-b02/2dee051a5d0647d5be72a7c0abff270e/jdk-8u333-linux-x64.tar.gz?AuthParam=1651546618_cf82b7ef36400800934f10d53a4aae6f
tar -zxvf jdk-8u333-linux-x64.tar.gz
mv jdk1.8.0_333 /usr/java
vim /etc/profile
export JAVA_HOME=/usr/java/
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}
source /etc/profile
java -version
补充Kali中安装pip2
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2 get-pip.py
pip2 --version
标签:main,multiverse,配置,com,aliyun,restricted,Ubuntu20.4,zsh,初始 来源: https://www.cnblogs.com/stayelegance/p/16322670.html