新手ubuntu安装后必须做的几件事

简介

刚把我VM里的ubuntu升级到了ubuntu 22,然后需要配置的系统环境还是比较多的,我把配置记录如下,做个

记,方便爱好者和新手入门使用

 

配置

修改ubuntu的apt源

vi /etc/apt/sources.list

这个是我ubuntu 22的apt配置,用的是阿里云的源,速度快,注释部分的是源码

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal universe
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates universe
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

更新源库并更新所有软件

apt update
apt upgrade
apt autoremove

python更换pip源

pip install pip -U
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

Ruby更换国内源

gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem sources -l
# https://gems.ruby-china.com

npm更换国内源

npm config set registry https://registry.npm.taobao.org

gnome插件,下载gnome管理神器,tweak

apt-get update
apt-get install gnome-tweak-tool
apt-get install gnome-shell-extensions

THE END