1、添加含有ap-hotspot的資源
whw@Y485:sudo add-apt-repository ppa:nilarimogard/webupd8
2、更新資源
whw@Y485:sudo apt-get update
此時可能會提示你執(zhí)行"sudo dpkg --configure -a"命令,你只需要按照它的指示去安裝就可以。
3、之前如果安裝了ap-hotsopt或者hostapd的你需要首先將其卸載
whw@Y485:sudo apt-get remove hostapd
4、安裝沒有bug的hostapd版本
我的系統(tǒng)是64位,網(wǎng)上很多前輩也介紹了該方法,大家可以借鑒一下,在此向前輩們的付出表示崇高的敬意:
whw@Y485:cd /tmp
whw@Y485:wget *http://archive.ubuntu.com/ubuntu/pool
/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb*
極有可能你執(zhí)行該條命令最后提示你無法鏈接到該鏈接,你可以去
http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb去下載*hostapd_1.0-3ubuntu2.1_amd64.deb*
這個比較古老但非常實用的hotspot文件。
whw@Y485:sudo dpkg -i hostapd*.deb
whw@Y485:sudo apt-mark hold hostapd5、 安裝ap-hotspot
whw@Y485:sudo apt-get install ap-hotspot6、配置 網(wǎng)絡(luò) ap的名字與密碼whw@Y485:sudo ap-hotspot configurewhw@Y485:/tmp$ sudo ap-hotspot configure
Detecting configuration...
Detected ppp0 as the network interface connected to
the Internet. Press ENTER ifthis is correct or enter
the desired interface below (e.g.- eth0, ppp0 etc.):
ppp0是我的撥號寬帶,直接enter
Detected wlan0 as your WiFi interface. Press ENTER ifthis is correct or enter the desired interface (e.g.-
wlan1):
wlan0是我的無線網(wǎng)卡用來做ap的設(shè)備,直接enter
Enter the desired Access Point name or press ENTER to
use the default one (myhotspot):
該處是輸入你分享出去的wifi熱點的名稱:
myhotspot
Enter the desired WPA Passphrase below or press ENTER
to use the default one (qwerty0987):
該處是設(shè)置你分享出去的wifi熱點的密碼:
qwer1234
whw@Y485:/tmp$ 7、關(guān)閉ubuntu的防火墻(如果你啟用了)
whw@Y485:sudo ufw disable8 、啟動無線服務(wù)(安裝好后最好重新啟動操作系統(tǒng))
whw@Y485:sudo ap-hotspot start (關(guān)閉無線:sudo ap-hotspot stop)當終端顯示如下時,恭喜你,你的環(huán)境已經(jīng)大獲成功whw@Y485:/tmp$ sudo ufw disable
Firewall stopped and disabled on system startup
whw@Y485:/tmp$ sudo ap-hotspot start
Please disconnect WiFi before proceeding
whw@Y485:/tmp$ sudo ap-hotspot start
Starting Wireless Hotspot...
Wireless Hotspot active
whw@Y485:/tmp$