ubuntu初始配置:
1. 设置root密码并使用root登录
sudo passwd root #进入修改root命令
[sudo] password for unhan: # 输入当前用户密码
New password: # 输入root新密码
Retype new password: # 再次输入root密码
passwd: password updated successfully # 密码更新成功
su root #root登录
2. 更新源列表
sudo apt-get update #如果报错就把sudo取消试试
sudo apt-get upgrade
3. 安装常用插件
apt install git #下载
apt install gedit #文件编辑工具
sudo apt install python3-pip #安装pip
# 更改python指向python3、pip指向pip3(建议修改)
echo alias python=python3 >> ~/.bashrc
echo alias pip=pip3 >> ~/.bashrc
source ~/.bashrc
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ #更改pip指向