Linux shutdown, restart, logout & running level analysis
Source: Internet
Author: User
Linux shutdown, restart, logout & amp; running level analysis 1. shutdown restart-shutdownJava code shutdown-hnow // shutdown now-h + 3 // shutdown shutdown-h20 after 3 minutes: 00 // 00 shutdown-rnow // restart sh now...
Linux shutdown, restart, logout & running level analysis 1. shutdown and restart-shutdown Java code shutdown-h now // shutdown immediately-h + 3 // shutdown after 3 minutes-h 20:00 // 00 shutdown-r now // immediately restart shutdown-r + 3 // restart shutdown-r 20:00 // restart shutdown-c // cancel shutdown www.2cto.com 2. shutdown and restart-init Java code init 0 // shutdown init 6 // restart 3. shutdown and restart-telinit Java code telinit 0 // shutdown telinit 6 // restart 4. shutdown-halt Java code halt // pause the System 5. power off-poweroff Java code poweroff // pause the system and try to power off w Ww.2cto.com 6. restart-reboot Java code reboot // pause the system and restart 7. logout-logout Java code logout // log out by the user 8. run-level Java code 0: Shut down System 1: Single User Mode 2: non-network multi-user mode 3: Multi-user mode with network 4: Keep 5: multi-user mode with network and X Window System 6: restart the System www.2cto.com. the default running level is determined by the id: entry under/etc/inittab. Editing this value can change the default running level of the System. Java code grep "^ id:"/etc/inittab id: 5: initdefault: java code runlevel // display the previous and current running level init n // switch the running level telinit n // switch the running level
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service