In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces to you what are the five shutdown methods of the UNIX system, the content is very detailed, interested friends can refer to, hope to be helpful to you.
UNIX operating system is one of the most widely used operating systems on the network. Using UNIX system, the shutdown process of a machine is much more complicated than that of a single user machine using DOS. If you do not use the correct shutdown command and shutdown method under UNIX, it will destroy the file system and cause great losses. Here are five ways to shut down the UNIX system.
1. Shut down the computer with the haltsys command
The system is shut down as soon as the haltsys command is issued. Its advantage is that the system responds quickly and has a strong compulsion, so this command is only suitable for situations where there is only one user on the system. If there are multiple users working on the system, as soon as they issue a command, they are forced to log out of the system and their processes are lost. The method of operation is to log in as a super user, enter haltsys, enter, and turn off the power when the system displays the shutdown information.
2. Shut down the computer with reboot command
The reboot command is a downtime program executed by the system administrator, and reboot is essentially linked to the haltsys command. The difference between reboot and haltsys is that it automatically boots and restarts the system without pressing any key after a normal shutdown. Reboot is especially suitable for system administrators to debug machines.
3. Shut down the computer with shutdown command
The shutdown command is a program written in the Shell language that resides in the / etc directory. It is run by the super user in the foreground and automatically executes the wall command to inform all users who are working in the system that the system will stop within a specified period of time, please get ready and log out from the system. When all users have logged out of the system or the specified time is up, shutdown executes the kill command to terminate all processes in the system except the console, and then executes the haltsys command to stop the system normally. Use the format: shutdown-g [HH:] mm-f "" Mesg ", where [hh:] mm is the specified shutdown time of the system, and" Mesg "is the information sent by the system to each end user. It is recommended to use the shutdown command for shutdown among network users.
4. Shut down the computer with bye command
The bye command takes shutdown as the core and uses vi to edit the generated shutdown command. The main advantage is that it is easy to remember. The content of the bye file is: shutdown-y-G0 (the parameter can be set according to the actual needs), and the edited bye permission is-rw-r-r-,. At this time, bye cannot be used directly. Release its permission before # chmod uplix bye,bye can exercise the shutdown function.
5. Create a shutdown user bye
Using super users to shut down the computer is not conducive to the management of the system, and there are certain security risks, so it is necessary to establish automatic shutdown users. Below, create the shutdown user bye with the sysadmsh command.
(1) create a bye user. Log in to UNIX as superuser, type sysadmsh, select Account- > User- > Create, and enter: bye in Username, other defaults.
(2) in Account- > User- > Examine, enter bye, select Privilege- > Subsystem- > Specify, enter shutdown, save the modification information and exit sysadmsh.
(3) register to UNIX with bye and edit the .profile file in the current directory. The content of the file is:
Trap exit 2,3
/ tcb/bin/asroot shutdown-y-g0
(4) in the Login: state, simply typing bye will automatically shut down the UNIX operating system.
What are the five shutdown methods of the UNIX system are shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can 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.