0
点赞
收藏
分享

微信扫一扫

linux回炉第十三天

蓝莲听雨 2023-01-03 阅读 130

systemd
systemctl is-active nginx
systemctl status nginx
systemctl start nginx
systemctl stop nginx
systemctl enable nginx
systemctl disable nginx
systemctl enable --now nginx
systemctl mask nginx
systemctl unmask nginx
systemctl cat nginx
systemctl list-units
systemctl list-units -a
systemctl list-units -t service
systemctl list-unit-files -t service
systemctl list-unit-files -t service --all
sysstemctl daemon-reload
systemctl restart nginx
ll /usr/lib/systemd/system
ll /lib/systemd/system
ll /etc/systemd/system

runlevel
init 3
init 5
systemctl isolate graphical.target
systemctl get-default
systemctl default

任意键----> e -----> linux行添加rd.break ---->  ctrl+x ----> mount -o remount,rw /sysroot -----> chroot /sysroot  ----->   passwd root ------>  touch /.autorelabel  ----> exit ----> reboot

任意键----> e ----> liunx行改为rw init=/sysroot/bin/sh ----> ctrl+x ----> chroot /sysroot ----> passwd root ----> touch /.autorelabel ----> exit ----> reboot

grub2-setpasswd
ls -l /root/grub2


chroot /mnt/sysroot #centos8
chroot /mnt/sysimage #centos7

grub2 install --root-directory=/mnt/sysimage /dev/sda

grub2 install /dev/sda


sync

cat /proc/sys/kernel/hostname
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
cat /proc/sys/vm/drop_caches

sysctl -p
sysctl -w net.ipv4.ip_forword = 1
sysctl -a

举报

相关推荐

0 条评论