Hello everyone, October a holiday after more than half son, is not feeling the time to live particularly fast? Today I bring you a good thing: several ways to let Linux system restart indefinitely
Applicable system : Centos/rhel (Other systems to try)
User Identity : Must be root
1. Direct modification of source files with sed command for unlimited reboots
[[email protected] ZYJTF 孤云暮雨 ~]# sed -i ‘s/id:[0-9]:initdefault:/id:6:initdefault:/‘g /etc/inittab && reboot
2. use sed command + regular expression to modify the source file for infinite restart
[[email protected] zyjtf Lone Cloud Twilight ~] # sed -i ' s/id:[[:d igit:]]:initdefault:/id:6:initdefault:/' g /etc/inittab && reboot
3. use SED command + extended regular (or relationship) to modify the source file for unlimited restart
[[email protected] zyjtf Lone Cloud Twilight ~] # sed -i -r ' s/id: (3|5): initdefault:/id:6:initdefault:/' g /etc/inittab & & reboot
4. Rewrite "/etc/inittab" file for unlimited reboots
[Email protected] ZYJTF Lone cloud Twilight Rain ~]# cat/dev/null >/etc/inittab && echo ' id:6:initdefault: ' >/etc/inittab &A mp;& reboot
All right, I finished, the above command, for reference only, do not use to do bad things
This article from "ZYJTF Lone Cloud Twilight Rain" blog, declined reprint!
Several methods of infinite Linux restart