← 返回命令列表

Linux command

dh 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Execute debhelper commands

dh [sequence]

Build package

dh build

Clean build artifacts

dh clean

Run with verbose output

dh [sequence] --verbose

List all commands

dh [sequence] --no-act

Skip specific commands

dh [sequence] --until [dh_auto_configure]

说明

dh is the debhelper sequence executor that runs a series of dh_* commands in the correct order for building Debian packages. It simplifies debian/rules files by automatically determining which commands to run. The tool reads debian/rules overrides to customize behavior. Override targets (override_dh_*) in debian/rules let maintainers modify specific steps. Addon support extends functionality for specific packaging scenarios. dh significantly reduces boilerplate in debian/rules, replacing explicit command lists with simple sequence invocations that automatically handle most packaging tasks.

参数

--verbose
Enable verbose mode for all commands.
--no-act, -n
Show what would be done without executing.
--with _ADDON_
Use specified addon (e.g., python3, systemd).
--without _ADDON_
Disable specified addon.
--until _CMD_
Run until specified command.
--after _CMD_
Start after specified command.
--help
Display help information.

FAQ

What is the dh command used for?

dh is the debhelper sequence executor that runs a series of dh_* commands in the correct order for building Debian packages. It simplifies debian/rules files by automatically determining which commands to run. The tool reads debian/rules overrides to customize behavior. Override targets (override_dh_*) in debian/rules let maintainers modify specific steps. Addon support extends functionality for specific packaging scenarios. dh significantly reduces boilerplate in debian/rules, replacing explicit command lists with simple sequence invocations that automatically handle most packaging tasks.

How do I run a basic dh example?

Run `dh [sequence]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --verbose do in dh?

Enable verbose mode for all commands.