Ubuntu shutdown, restart, and logout

Source: Internet
Author: User
Ubuntu shutdown, restart, cancel 1 shutdown command shutdown as if the ubuntu terminal is the current user's command by default, just a common user, therefore, you can use sudo-sh in the supervisor to convert it to the administrator root user and execute the command. 1) shutdown & amp; ndash; help to shut down and restart ubuntu. 1. shut down the command. shutdown seems to be the current user's command in the ubuntu terminal by default. it is just a common user, therefore, you can use sudo-sh in the supervisor to convert it to the administrator root user and execute the command. 1) the shutdown-help command can be used to view how to use the shutdown command. of course, the man shutdown command can also be used. 2) shutdown-h now shut down now 3) shutdown-r now restart now 4) shutdown-r + 3 restart in 3 minutes 5) shutdown-h + 3 "The System will shutdown after 3 minutes" prompt The user will shut down in three minutes 6) shutdown-r will restart The computer 7) shutdown-r 20:23 & you can put the task restarted at in the background. you can continue to operate Terminal 2 interrupt Command 1) after executing the command (if it is not transferred to the background ), you can use CTRL + C to abort the command. 2) kill program code. when the command is executed in the background, the system returns a program code. for example, when shutdown-r is used, the system returns the system code: 4905 we can use kill 4905 to abort the Restart command 3 ps aux | grep program number if we know Program Number. we can use ps aux | grep program number to query the command corresponding to the program number. For example, if the program number is 4905, we can use ps aux | grep 4905 to check the shutdown-r 20:23 & Command halt -- the simplest shutdown command in fact, halt is to call shutdown-h. When halt is executed? Killing an application process? Execute sync system call? After the file system writes, the kernel is stopped. Parameter description: [-n] prevents sync system calls? After fsck is used to fix the root partition? To prevent the kernel from overwriting the repaired superblock with the old version of superblock. [-W] isn't it a real restart or shutdown? Write the wtmp (/var/log/wtmp) record. [-D] do not write the wtmp record [included in option [-n 〕. [-F] force shutdown or restart without calling shutdown. Before [-I] shutdown [or restart? Disable all network interfaces. [-P] This option is the default option. It is called poweroff when shutdown. Init is the ancestor of all processes? Its process number is always 1? So sending the TERM signal to init will terminate all user processes? Daemon. Shutdown uses this mechanism. Init defines eight runlevels, and init 0 indicates shutdown? Init 1 indicates restart. Can init be a long story? This is not described here. In addition, can the telinit command change the init running level? For example? Does telinit-iS enable the system to enter single-user mode? The shutdown information and waiting time are not available. The logout command used to log out of the system is a relative logon operation. to log out of the system, you only need to issue the Logout command: [root @ localhost root] # logout Red Hat Linuxrelease 9 (Shike) Kernel 2.4.20.8 on an i686 Login: Login returns to the Login screen
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.