← 返回命令列表

Linux command

acpid 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Start

sudo acpid

Example

sudo acpid -f

Example

sudo acpid -c [/etc/acpi/events]

Example

sudo acpid -d

说明

acpid (ACPI Event Daemon) monitors ACPI events from the kernel and executes corresponding shell scripts or programs. It handles hardware events such as power button presses, lid closing, AC adapter changes, and battery status changes. The daemon reads event configuration files from /etc/acpi/events/ and runs the associated scripts when matching events occur. This enables automatic responses to hardware events like suspending when the laptop lid closes or shutting down when the power button is pressed.

参数

-c _dir_
Configuration directory for event files (default: /etc/acpi/events)
-d
Enable debug mode with increased verbosity
-e _file_
Event source file (default: /proc/acpi/event or /dev/input/event*)
-f
Run in foreground (don't daemonize)
-g _group_
Set socket group ownership
-l _file_
Log file location (default: /var/log/acpid)
-p _file_
PID file location
-s _file_
Socket file for client connections

FAQ

What is the acpid command used for?

acpid (ACPI Event Daemon) monitors ACPI events from the kernel and executes corresponding shell scripts or programs. It handles hardware events such as power button presses, lid closing, AC adapter changes, and battery status changes. The daemon reads event configuration files from /etc/acpi/events/ and runs the associated scripts when matching events occur. This enables automatic responses to hardware events like suspending when the laptop lid closes or shutting down when the power button is pressed.

How do I run a basic acpid example?

Run `sudo acpid` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c _dir_ do in acpid?

Configuration directory for event files (default: /etc/acpi/events)