In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to shut down, restart and log out of Ubuntu. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1 shutdown command shutdown
It seems that the default in the terminal of ubuntu is the command of the current user, only an ordinary user, so you can use sudo-sh in the terminal to convert to the administrator root user to execute the command.
1) shutdown-help
You can see how the shutdown command is used, or you can use the man shutdown command.
2) shutdown-h now shuts down immediately
3) shutdown-r now now restarts immediately
4) shutdown-r + 3 restart in three minutes
5) shutdown-h + 3 "The System will shutdown after 3 minutes" prompts the user to shut down after three minutes
6) shutdown-r 20:23 will restart the computer at 20: 23:00
7) shutdown-r 20:23 & you can put the task that is restarted at 20: 23:00 in the background, and the user can continue to operate the terminal
2 interrupt command
1) after executing the command (if you do not go to the background), you can use CTRL+C to abort the command
2) kill program coding
The system returns a program code when the command is executed in the background, for example, when using shutdown-r 20:23 & the system returns the system code: 4905
We can use kill 4905 to abort the restart command
3ps aux | grep program number
If we know the program number, we can use the ps aux | grep program number to query what the command corresponding to the program number is.
For example, if the above program number is 4905, we can use ps aux | grep 4905 to find the command of shutdown-r 20:23 &.
The simplest shutdown command for halt--
Halt is actually a call to shutdown-h. When halt executes, it kills the application process, executes the sync system call, and stops the kernel after the file system write operation is complete.
Parameter description:
[- n] prevents sync system calls, which are used after patching the root partition with fsck to prevent the kernel from overwriting the patched super block with an older version of the superblock.
[- w] is not really rebooting or shutting down, just writing wtmp (/ var/log/wtmp) records.
[- d] do not write wtmp records (already included in the option [- n]).
[- f] forced shutdown or restart without calling shutdown.
[- I] turn off all network interfaces before shutting down (or rebooting).
[- p] this option is the default. It is to call poweroff when the computer is turned off.
Init
Init is the ancestor of all processes, and its process number is always 1, so sending TERM signals to init terminates all user processes, daemons, and so on. Shutdown uses this mechanism. Init defines eight runlevels (runlevel), with init 0 as shutdown and init 1 as restart. Init can be a long speech, so I won't talk about it here. There are also telinit commands that can change the running level of init, for example, telinit-iS allows the system to enter single-user mode without getting the information and wait time when using shutdown.
Log out of the system's logout command
Logout logout is a relative operation of login. If you want to leave the system after logging in, you only need to issue the logout command directly:
[root@localhost root] # logout
Red Hat Linuxrelease 9 (Shike)
Kernel 2.4.20.8 on an i686
Login: ← returns to the login screen.
This is the end of the article on "how to shut down, restart and log out of Ubuntu". I hope the above content can be of some help to you so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.