---
# System prepended metadata

title: linux创建wifi热点

---

# linux创建wifi热点
#### tags: `linux` `热点` `hostPad` `kali linux`
假设wifi网卡名称是wlan0
可以用`ip addr`命令查看网卡
# 创建2.4G wifi
```
sudo nmcli dev wifi hotspot ifname wlan0 ssid Your_SSID password 
```
Your_SSID替换为wifi名
Your_Password替换为wifi密码

# 创建5G wifi
加一个band a channel 149
```
sudo nmcli dev wifi hotspot ifname wlan0 ssid Your_SSID password Your_Password band a channel 149
```
Your_SSID替换为wifi名
Your_Password替换为wifi密码
## 报错：Error: Connection activation failed: (11) 802.1X supplicant took too long to authenticate.
网卡不支持5G
# 查看已经创建的wifi
## 查看密码
`sudo nmcli dev wifi show-password`
## 查看id
`sudo nmcli connection show`
hostpad那行有id
可以在下面停止
# 停止wifi
在运行wifi时会有
`Device 'wlan0' successfully activated with 'f4bd8e56-e07d-4e8b-baec-6a71905aa420'.`
类似这样的提示，`f4bd8e56-e07d-4e8b-baec-6a71905aa420`就是id

```
sudo nmcli connection down ID
```
ID替换为你的id

