← 返回命令列表

Linux command

hostapd 命令

安全

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

常用示例

Start access point

sudo hostapd [/etc/hostapd/hostapd.conf]

Start in foreground

sudo hostapd -d [hostapd.conf]

Start in background

sudo hostapd -B [hostapd.conf]

Start with debug and timestamps

sudo hostapd -dt [hostapd.conf]

说明

hostapd is a user-space daemon for wireless access points and authentication servers. It implements IEEE 802.11 access point management, WPA/WPA2/WPA3 authentication, and IEEE 802.1X authenticator. The tool transforms a wireless interface into an access point, handling client connections, encryption, and authentication protocols.

参数

-B
Run in background (daemon).
-d
Debug output.
-dd
More verbose debug.
-t
Include timestamps in debug output.
-v
Display version information and exit.
-K
Include key data in debug output.
-g _socket_
Global control interface path.
-P _pidfile_
PID file path.
-f _logfile_
Redirect output to log file.
-e _entropy_file_
File for storing entropy (to speed up restart).

FAQ

What is the hostapd command used for?

hostapd is a user-space daemon for wireless access points and authentication servers. It implements IEEE 802.11 access point management, WPA/WPA2/WPA3 authentication, and IEEE 802.1X authenticator. The tool transforms a wireless interface into an access point, handling client connections, encryption, and authentication protocols.

How do I run a basic hostapd example?

Run `sudo hostapd [/etc/hostapd/hostapd.conf]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -B do in hostapd?

Run in background (daemon).