Man page - systemd-inhibit(1)
Packages contas this manual
- systemd-ask-password-wall.path(8)
- journald@.conf(5)
- systemd-rfkill.service(8)
- systemd-pcrlock-secureboot-authority.service(8)
- org.freedesktop.locale1(5)
- systemd-journald-audit.socket(8)
- bootup(7)
- systemd-hostnamed(8)
- system.conf.d(5)
- os-release(5)
- systemd.exec(5)
- networkd.conf(5)
- systemd-hibernate-resume-generator(8)
- systemd-timedated.service(8)
- networkctl(1)
- systemd-fsck@.service(8)
- systemd-tmpfiles(8)
- systemd-inhibit(1)
- systemd.net-naming-scheme(7)
- systemd-tmpfiles-clean.timer(8)
- systemd-ssh-proxy(1)
- systemd-user-sessions(8)
- logind.conf(5)
- org.freedesktop.network1(5)
- systemd-networkd-wait-online.service(8)
- systemd.kill(5)
- systemd.time(7)
- systemd-ask-password(1)
- systemd.journal-fields(7)
- systemd-socket-proxyd(8)
- pstore.conf.d(5)
- systemd-networkd.service(8)
- systemd-pcrlock-firmware-code.service(8)
- systemd-storagetm.service(8)
- systemd-growfs-root.service(8)
- systemd-ask-password-wall.service(8)
- systemd-creds(1)
- systemd-remount-fs.service(8)
- journald.conf(5)
- systemd-confext.service(8)
- systemd-tty-ask-password-agent(1)
- systemd-binfmt(8)
- systemd-pcrlock-make-policy.service(8)
- systemd-timedated(8)
- systemd-journald.service(8)
- systemd-pcrlock-file-system.service(8)
- pam_systemd_loadkey(8)
- systemd-gpt-auto-generator(8)
- daemon(7)
- systemd-tpm2-setup(8)
- hostnamectl(1)
- systemd-sleep(8)
- systemd-pcrmachine.service(8)
- systemd-bsod.service(8)
- systemd.unit(5)
- systemd-sysctl.service(8)
- systemd-pstore(8)
- binfmt.d(5)
- systemd-network-generator(8)
- systemd-poweroff.service(8)
- systemd-umount(1)
- systemd-tpm2-generator(8)
- systemd-rfkill.socket(8)
- systemd-localed.service(8)
- systemd.path(5)
- systemd-cgls(1)
- journald.conf.d(5)
- systemd-journald@.service(8)
- systemd-sysusers.service(8)
- systemd-user.conf(5)
- systemd-pcrfs@.service(8)
- systemd-measure(1)
- systemd.offline-updates(7)
- systemd-logind(8)
- systemd-machine-id-setup(1)
- systemd-volatile-root.service(8)
- systemd.service(5)
- user@.service(5)
- systemd.target(5)
- systemd-udev-settle.service(8)
- systemd-fsck(8)
- systemd-fsck-usr.service(8)
- user-runtime-dir@.service(5)
- systemd-user-runtime-dir(5)
- systemd-binfmt.service(8)
- systemd-initctl.socket(8)
- systemd-fsck-root.service(8)
- systemd-debug-generator(8)
- file-hierarchy(7)
- systemd-networkd-wait-online(8)
- systemd-volatile-root(8)
- systemd-reboot.service(8)
- systemd-hostnamed.service(8)
- networkd.conf.d(5)
- initrd-release(5)
- systemd.index(7)
- systemd-shutdown(8)
- systemd-update-done.service(8)
- systemd-system-update-generator(8)
- localectl(1)
- systemd.v(7)
- systemd-pcrfs-root.service(8)
- systemd.image-policy(7)
- systemd-backlight@.service(8)
- systemd-battery-check(8)
- systemd-rc-local-generator(8)
- systemd-sysctl(8)
- systemd-kexec.service(8)
- extension-release(5)
- systemd-journald.socket(8)
- systemd-random-seed.service(8)
- systemd-tmpfiles-setup-dev-early.service(8)
- systemd-modules-load(8)
- systemd.network(5)
- systemd-getty-generator(8)
- systemd-storagetm(8)
- systemd.generator(7)
- systemd.special(7)
- systemd-tmpfiles-setup-dev.service(8)
- systemd-notify(1)
- systemd-suspend.service(8)
- localtime(5)
- systemd-journald-varlink@.socket(8)
- systemd-pcrphase.service(8)
- systemd-quotacheck.service(8)
- systemd-pcrlock-firmware-config.service(8)
- systemd-journald@.socket(8)
- systemd-halt.service(8)
- systemd-sysext.service(8)
- systemd-delta(1)
- 30-systemd-environment-d-generator(8)
- systemd-ask-password-console.service(8)
- systemd-confext(8)
- systemd-initctl.service(8)
- iocost.conf(5)
- systemd-logind.service(8)
- systemd-mkswap@.service(8)
- hostname(5)
- busctl(1)
- org.freedesktop.portable1(5)
- systemd-localed(8)
- systemd-id128(1)
- systemd-sleep.conf(5)
- systemd.environment-generator(7)
- systemd-growfs(8)
- systemd(1)
- systemd.device(5)
- systemd-firstboot(1)
- systemd-hibernate-clear.service(8)
- systemd.swap(5)
- tmpfiles.d(5)
- systemd-cat(1)
- systemd-random-seed(8)
- locale.conf(5)
- systemd-detect-virt(1)
- systemd-sysext(8)
- systemd.scope(5)
- systemd-growfs@.service(8)
- systemd-fstab-generator(8)
- systemd-escape(1)
- systemd-network-generator.service(8)
- systemd-tmpfiles-setup.service(8)
- systemd-tmpfiles-clean.service(8)
- sleep.conf.d(5)
- systemd-boot-check-no-failures(8)
- org.freedesktop.systemd1(5)
- systemd-suspend-then-hibernate.service(8)
- run0(1)
- systemd-mount(1)
- systemd.slice(5)
- systemd-user-sessions.service(8)
- systemd-makefs@.service(8)
- journalctl(1)
- systemd-makefs(8)
- systemd-stdio-bridge(1)
- systemd-ssh-generator(8)
- systemd-update-done(8)
- systemd-xdg-autostart-generator(8)
- systemd-soft-reboot.service(8)
- systemctl(1)
- org.freedesktop.machine1(5)
- systemd.timer(5)
- systemd-journald(8)
- systemd-bsod(8)
- systemd-tpm2-setup-early.service(8)
- systemd-hybrid-sleep.service(8)
- systemd-analyze(1)
- smbios-type-11(7)
- systemd-environment-d-generator(8)
- systemd-networkd-wait-online@.service(8)
- org.freedesktop.login1(5)
- systemd-rfkill(8)
- timedatectl(1)
- systemd-hibernate-resume(8)
- systemd-sysv-generator(8)
- kernel-install(8)
- systemd-sysusers(8)
- systemd.netdev(5)
- systemd-journald-dev-log.socket(8)
- systemd-vpick(1)
- machine-id(5)
- systemd-pcrphase-initrd.service(8)
- systemd.mount(5)
- systemd-remount-fs(8)
- systemd.socket(5)
- sysusers.d(5)
- systemd.directives(7)
- rc-local.service(8)
- systemd-run-generator(8)
- systemd-battery-check.service(8)
- systemd-pstore.service(8)
- capsule@.service(5)
- logind.conf.d(5)
- systemd-pcrlock-secureboot-policy.service(8)
- environment.d(5)
- systemd-pcrphase-sysinit.service(8)
- org.freedesktop.hostname1(5)
- modules-load.d(5)
- systemd.automount(5)
- systemd-firstboot.service(1)
- systemd-boot-check-no-failures.service(8)
- loginctl(1)
- systemd.syntax(7)
- systemd-initctl(8)
- kernel-command-line(7)
- systemd.preset(5)
- systemd-pcrlock-machine-id.service(8)
- systemd-run(1)
- systemd-system.conf(5)
- systemd-machine-id-commit.service(8)
- user.conf.d(5)
- systemd.system-credentials(7)
- pstore.conf(5)
- systemd-cgtop(1)
- sysctl.d(5)
- systemd-tpm2-setup.service(8)
- systemd-pcrextend(8)
- systemd-modules-load.service(8)
- systemd.pcrlock.d(5)
- systemd-networkd(8)
- systemd-socket-activate(1)
- systemd-path(1)
- systemd-backlight(8)
- org.freedesktop.timedate1(5)
- systemd-quotacheck(8)
- systemd.resource-control(5)
- systemd-ask-password-console.path(8)
- varlinkctl(1)
- systemd-ac-power(1)
- systemd-hibernate-resume.service(8)
- systemd.pcrlock(5)
- machine-info(5)
- systemd-hibernate.service(8)
- systemd-pcrlock(8)
Package: systemd
apt-get install systemd
apt-get install systemd
Manuals in package:
Documentations in package:
Available languages:
en zh_TW zh_CN deManual
| SYSTEMD-INHIBIT(1) | systemd-inhibit | SYSTEMD-INHIBIT(1) |
NAME
systemd-inhibit - 執行一個程式並阻止或延遲系統休眠或關機
SYNOPSIS
systemd-inhibit [OPTIONS...] [COMMAND] [ARGUMENTS...]
systemd-inhibit [OPTIONS...] --list
描述
systemd-inhibit 可用於執行那些必須保持開機狀態的程式, 在 [COMMAND] 程式開始執行的時候, 將獲得一個阻止系統休眠或關機的鎖, 並在執行結束之後才會釋放這個鎖。
這個抑制鎖能夠阻止或延遲系統的休眠或關機, 不管這個休眠或關機的請求是使用者發起的, 還是作業系統自己觸發的。 這個鎖可用於確保例如燒錄光碟之類不能被中斷的任務, 不會被系統休眠或關機動作打斷。
詳見 Inhibitor Lock Developer Documentation[1]
選項
能夠識別的命令列選項如下:
--what=
接收一個冒號分隔的下列值的列表,
表示阻止對應的動作:
"shutdown"(重啟/關機/kexec),
"sleep"(休眠),
"idle"(自動閒置檢測),
"handle-power-key"(按下電源鍵),
"handle-suspend-key"(按下休眠鍵),
"handle-hibernate-key"(按下休眠鍵),
"handle-lid-switch"(合上蓋子)。
預設值是 "idle:sleep:shutdown"
--who=
為獲取阻止鎖的程式設定一個描述性的字串。
若未設定,
則使用被執行的命令列字串。
--why=
為獲取阻止鎖的原因設定一個描述性的字串。
預設值是 "Unknown reason"
--mode=
必須設為 "block"
或 "delay" 之一。 預設值
"block"
表示無限期阻止關機與休眠,
並且只允許超級使用者才能取消阻止鎖。
"delay"
表示將關機與休眠推遲一段時間,
超時之後,即使鎖依然存在,也將關機或休眠。
推遲多長時間取決於
logind.conf(5) 中的設定。
注意, "delay" 僅可用於
"sleep" 與 "shutdown"
--list
列出所有已被啟用的阻止鎖,而不是獲取一個阻止鎖。
-h, --help
顯示簡短的幫助資訊並退出。
--version
顯示簡短的版本資訊並退出。
退出狀態
等於被執行的程式的退出狀態
例子
# systemd-inhibit wodim foobar.iso
將 foobar.iso 映象使用 wodim(1) 寫入光碟中,並在寫入過程中禁止系統休眠與關機。
參見
systemd(1), logind.conf(5)
NOTES
- 1.
- Inhibitor Lock Developer Documentation
http://www.freedesktop.org/wiki/Software/systemd/inhibit
跋
本頁面中文版由中文 man 手冊頁計劃提供。
翻譯人員:金步國
金步國作品集:http://www.jinbuguo.com
中文 man
手冊頁計劃:https://github.com/man-pages-zh/manpages-zh
| systemd 231 |