← 返回命令列表

Linux command

haveged 命令

安全

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

常用示例

Start

sudo haveged

Example

sudo haveged -F

Example

sudo haveged -f [path/to/file]

Example

sudo haveged -r [runlevel]

Example

sudo haveged -b [buffersizeinKW]

Example

sudo haveged -d [cachesizeinKW]

Example

sudo haveged -n [byteamount]

说明

haveged is a random number generator daemon that feeds the Linux kernel's entropy pool (/dev/random). It uses the HAVEGE (HArdware Volatile Entropy Gathering and Expansion) algorithm, which harvests entropy from CPU timing variations. The daemon is particularly useful for: - Headless servers lacking traditional entropy sources (keyboard, mouse) - Virtual machines with limited hardware entropy - Systems requiring high-throughput random number generation - Preventing /dev/random blocking during cryptographic operations haveged monitors the kernel entropy pool and automatically feeds it when levels drop.

参数

-F, --Foreground
Run in foreground (don't daemonize)
-f, --file _PATH_
Write random data to file instead of /dev/random
-r, --run _LEVEL_
Set run level (0=run as daemon, 1=display results)
-b, --buffer _SIZE_
Collection buffer size in KiB words
-d, --data _SIZE_
Cache size in KiB words
-n, --number _BYTES_
Number of bytes to write to output
-w, --write _BYTES_
Write _BYTES_ to /dev/random at a time
-v, --verbose _LEVEL_
Verbosity level

FAQ

What is the haveged command used for?

haveged is a random number generator daemon that feeds the Linux kernel's entropy pool (/dev/random). It uses the HAVEGE (HArdware Volatile Entropy Gathering and Expansion) algorithm, which harvests entropy from CPU timing variations. The daemon is particularly useful for: - Headless servers lacking traditional entropy sources (keyboard, mouse) - Virtual machines with limited hardware entropy - Systems requiring high-throughput random number generation - Preventing /dev/random blocking during cryptographic operations haveged monitors the kernel entropy pool and automatically feeds it when levels drop.

How do I run a basic haveged example?

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

What does -F, --Foreground do in haveged?

Run in foreground (don't daemonize)