跟阿旺学Linux(第四版)读书笔记1

252 阅读1分钟

`1,硬盘分区
/boot 200M
swap 内存2倍
/ 20G
其余给/data

2,设置IP
查看IP:
ip add

配置IP:
/etc/sysconfig/netowork-scripts/ifcfg-ens33
重启网卡:
nmcli c reload ens33
nmcli d reapply ens33`

3,忘记root密码用紧急模式修改

CentOS7和CentOS8中没有单用户模式,有了紧急模式

启动项第一行:e

将 ro 改成 rw init=/sysroot/bin/sh
按 Ctrl+X
chroot /sysroot
LANG=en
passwd
touch /.autorelabel
4,忘记密码用U盘启动
TroubleShooting
Rescue a CentOS Linux System
Continue
chroot /mnt/sysimage
passwd