ps:oneringr请改为自己的用户名
安装配置添加sudo
# 提权,输入你的root密码
su
# 安装sudo并配置
apt install sudo
nano /etc/sudoers
# 在root ALL=(ALL:ALL) ALL后面添加
oneringr ALL=(ALL:ALL) ALL换源
# 为什么默认只装wget不装curl呢
apt install curl
# 一键换源 爽!
bash <(curl -sSL https://linuxmirrors.cn/main.sh)改静态ip
nano /etc/network/interfaces
# 将要改的网卡原代码(改为你的网卡名字,这里是ens33)
allow-hotplug ens33
iface ens33 inet dhcp
# 改为以下内容(注意address为静态ip,网关别忘改)
auto ens33
iface ens33 inet static
address 192.168.1.168
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 223.5.5.5 114.114.114.114
# 自动DNS更新
apt install resolvconf
# 重启网络
systemctl restart networking开启Xterm.js
在硬件中为虚拟机添加一个串行端口
nano /etc/default/grub
# 在GRUB_CMDLINE_LINUX后面引号内添加
console=tty0 console=ttyS0,115200
# 更新grub
update-grub修改swap分区
# 查swap分区
swapon --show
# 图形化改分区
cfdisk
# 格式为swap分区
mkswap /dev/sda3
# 启用swap
swapon /dev/sda3
# 查uuid
lsblk -f
# 改完步骤1:自动加载
nano /etc/fstab
# 改完步骤2:启动内核修改
nano /etc/initramfs-tools/conf.d/resume
update-initramfs -u
评论