Ubuntu(Linux)一键开启AP WIFI 热点-折腾笔记

如题,想在Ubuntu系统上开启WIFI热点。百度了一些方法,但是很繁琐,故Git hub。发现了两个类似开源项目。

https://github.com/hotice/AP-Hotspot

https://github.com/oblique/create_ap

经过测试,AP-Hotspot没有在Ubuntu server 系统中开启WIFI 热点,但是create_ap成功开启WIFI 热点。

一、安装依赖

sudo apt-get install bash util-linux  procps   hostapd iproute2 iw iwconfig haveged  dnsmasq  iptables

Tip: 如果提示某个依赖有问题,去掉即可。

二、安装create_ap

2.1 通用方法

git clone https://github.com/oblique/create_ap
cd create_ap
make install

2.2 Archlinux

yaourt -S create_ap

2.3 Gentoo

emerge layman
layman -f -a jorgicio
emerge net-wireless/create_ap

三、开启WIFI

3.1没有密码的公共WIFI热点

create_ap wlan0 eth0 MyAccessPoint

3.2 开启WPA+WPA2加密的WIFI热点

create_ap wlan0 eth0 MyAccessPoint MyPassPhrase

3.2 开启没有共享互联网的WIFI热点

create_ap -n wlan0 MyAccessPoint MyPassPhrase

3.3 其它

请参考:https://github.com/oblique/create_ap

四、开机启动热点

可以在/etc/rc.local 中加入开启热点的命令。