一、网络配置
安装完系统后,会出现这样的界面:
输入之前设定的密码即可。
登录成功。
切换root登录。
sudo -i
输入你的密码即可登录root
修改sshd_config
使其可以使用root直接登录
vim /etc/ssh/sshd_config
PermitRootLogin yes
systemctl restart sshd
修改root密码
修改时区
timedatectl set-timezone Asia/Shanghai
timedatectl -a
timedatectl show
修改域名
hostnamectl hostname 域名
bash
修改网络配置
vim /etc/netplan/*
network:
version: 2
renderer: networkd
ethernets:
ens33:
dhcp4: no
dhcp6: no
addresses: [172.16.1.30/16]
routes:
- to: default
via: 172.16.16.1
nameservers:
addresses: [218.2.135.1, 8.8.8.8]
netplan apply重启网络
二、修改镜像源
vim /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
修改成ali源。
阿里云仓库地址:https://opsx.alibaba.com/mirror https://developer.aliyun.com/mirror/
中科:http://mirrors.ustc.edu.cn/help/ubuntu.html
清华:https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
华为:https://mirrors.huaweicloud.com/
但一定记得要apt update。
基础安装命令:
yum -- apt / apt-get
rpm -- dpkg