如果你在linux操作系统中有同时开启wifi与热点的需求,请按下面的办法操作。
目前开启热点后会自动关闭wifi

同时开启wifi与热点的办法

1. 准备工作

  1. 查看是否支持AP模式
    iw list
    找到这个,表示支持AP模式
    在这里插入图片描述

2.安装hostapd

sudo apt-get install hostapd


3.安装create_ap

git clone https://github.com/oblique/create_ap

cd create_ap

make install


2. 创建虚拟网卡并设置MAC地址

sudo iw dev wlp0s20f3 interface add wlan1 type __ap  # 注意:这里的wlp0s20f3是我的无线网卡名,通过ifconfig查看自己的无线网卡名

sudo ip link set dev wlan1 address 22:33:44:55:66:00  # MAC地址,随意填写,如果冲突则换一个


3. 使用create_ap创建热点

sudo create_ap -c 11 wlan1 wlp0s20f3 SSID password  # wlp0s20f3 是你的无线网卡的名字,通过ifconfig命令查看,SSID是你想要发射的热点的名字。


后台运行
sudo nohup create_ap -c 11 wlan1 wlp0s20f3 SSID password &

GitHub 加速计划 / li / linux-dash
13
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:3 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐