← 返回命令列表

Linux command

wpa_passphrase 命令

文本

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

常用示例

Compute

wpa_passphrase [SSID]

Compute

wpa_passphrase [SSID] [passphrase]

Generate and append

wpa_passphrase [SSID] [passphrase] >> /etc/wpa_supplicant/wpa_supplicant.conf

说明

wpa_passphrase generates a WPA-PSK (Pre-Shared Key) configuration from an ASCII passphrase for a given network SSID. The output is in wpa_supplicant.conf format and can be appended to the configuration file. The tool pre-computes the PSK using PBKDF2, which is faster than having wpa_supplicant compute it each time. The output includes both the plain text passphrase (commented) and the computed PSK.

参数

ssid
The network name (SSID) to generate the key for
passphrase
The WiFi password, must be 8 to 63 printable ASCII characters (read from stdin if omitted)

FAQ

What is the wpa_passphrase command used for?

wpa_passphrase generates a WPA-PSK (Pre-Shared Key) configuration from an ASCII passphrase for a given network SSID. The output is in wpa_supplicant.conf format and can be appended to the configuration file. The tool pre-computes the PSK using PBKDF2, which is faster than having wpa_supplicant compute it each time. The output includes both the plain text passphrase (commented) and the computed PSK.

How do I run a basic wpa_passphrase example?

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

What does ssid do in wpa_passphrase?

The network name (SSID) to generate the key for