[Ubuntu 14.04] 创建可以用于Android的WIFI热点
Ubuntu的网络管理为创建Wifi热点提供了方便,可是因为它用了ad-hoc网络,所以其创建的Wifi又不能让Android系统使用。这篇文字就是为了解决这个问题
1.Install AP-Hostpot in Ubuntu
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install ap-hotspot
2.Updata for ubuntu 14.04
the hostapd version in Ubuntu 14.04 is buggy and doesn't work properly. To get AP-Hotspot to work with hostapd in Ubuntu 14.04, you need to downgrade hostapd and use apt to hold the package so it's not upgraded(hostapd再14.04上有很多bug,所以要想完美运行就得对hostapd降级…)
64-bit:
cd /tmp wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb sudo dpkg -i hostapd*.deb sudo apt-mark hold hostapd
32-bit:
cd /tmp wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb sudo dpkg -i hostapd*.deb sudo apt-mark hold hostapd
3.Usage
To start AP-Hotspot, use the following command:
sudo ap-hotspot start
依照提示输入a.有线网卡b.无线网卡c.wifi名称d.密码
网卡属性可以用命令
ifconfig
来查询,一般有线网卡Ubuntu上为eth0
如果输入错误可以用如下指令来修改:
sudo ap-hotspot configure
重启指令和结束指令:
#重启 sudo ap-hotspot restart #结束 sudo ap-hotspot stop
如果无法启动,关闭防火墙试试:
sudo ufw disable
GoodLuck. 转自(Here)