In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly describes how to force the shutdown of linux kernel module, has a certain reference value, interested friends can refer to the next, I hope you read this article after a great harvest, the following let Xiaobian take you to understand.
Install Kgotobed
Make sure you have dkms installed. It is available in the default repository of most Linux distributions.
For example, on Fedora, you can install it using the following command:
$ sudo dnf install kernel-devel-$(uname -r) dkms
On Debian, Ubuntu, Linux Mint:
$ sudo apt install dkms
After installation, git clone Kgotobed project.
$ git clone https://github.com/nikital/kgotobed.git
This command clones the contents of all Kgotobed repositories in the current working directory into a folder named kgotobed. Go to this directory:
$ cd kgotobed/
Next, install the Kgotobed driver using the command:
$ sudo make install
The above command registers the kgotobed.ko module with DKMS (so it rebuilds for each kernel you run) and installs gotobed in the/usr/local/bin/directory, then registers, enables, and starts the kgotobed service.
how to run
By default, Kgotobed sets bedtime to 1:00 AM. That is, no matter what you are doing, your computer will shut down at 1 a.m.
To see the current bedtime time, run:
$ gotobedCurrent bedtime is 2018-04-10 01:00:00
To go to sleep earlier, for example at 22:00 (10 p.m.), run:
$ sudo gotobed 22:00[sudo] password for sk:Current bedtime is 2018-04-10 00:58:00Setting bedtime to 2018-04-09 22:00:00Bedtime will be in 2 hours 16 minutes
This helps when you want to go to bed earlier!
However, you can't set it later, which is after 1:00 a. M. You can't uninstall modules, and adjusting the system clock won't help. *** The way out is to restart!
To set a different default time, you need to customize kgotobed.service (either by editing or using the systemd tool).
Uninstall Kgotobed
Not happy with Kgotobed? Don't worry! Go to the kgotobed folder we cloned earlier and run the following command to uninstall it.
$ sudo make uninstall
Again, I warn you that even if you are root, there is no way to delay or cancel the shutdown process. Your system will be forced to shut down at the specified time. This is not for everyone! When you're working on an important task, it can drive you crazy. In this case, make sure you have saved your work from time to time, or use some of the advanced tools in the links below to help you automatically shut down, restart, pause, and hibernate the system at specific times.
Automatic shutdown, restart, pause, and hibernation of systems at specific times
Thank you for reading this article carefully. I hope that Xiaobian's "How to forcibly close the kernel module of linux" article will be helpful to everyone. At the same time, I hope that everyone will support it a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!
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.