Ubuntu14.04 设置wifi热点

查了一下资料主要有两种方法:

第一种:network manager设置

  这种方法配置比较复杂.并且不能给Android手机和iPhone共享.果断放弃(其实我是尝试过的,真的没有用).

第二种:使用ap-hotspot,亲测可用

  这种方法配置简单,用起来也方便.

  第一步:安装ap-hotspot

 

$ sudo add-apt-repository ppa:nilarimogard/webupd8

$ sudo apt-get update

$ sudo apt-get install hostapd

$ sudo apt-get install ap-hotspot

 

 

 

  第二步:配置ap-hotspot

$ sudo ap-hotspot configure
Detecting configuration...
Detected eth0 as the network interface connected to the Internet. Press ENTER if this is correct or enter the desired interface below (e.g.- eth0, ppp0 etc.):
// 回车确认

Detected wlan0 as your WiFi interface. Press ENTER if this is correct or enter the desired interface (e.g.- wlan1):
// 回车确认

Enter the desired Access Point name or press ENTER to use the default one (myhotspot):
// 输入wifi的名字

Enter the desired WPA Passphrase below or press ENTER to use the default one (qwerty0987):
// 输入wifi的密码

 

  第三步:启动wifi

$ sudo ap-hotspot start

 

大功告成,现在可以再Android设备上查找到自己发散的wifi了

 

另外附上几个常用的命令选项:

Usage:    ap-hotspot [argument]

    start          start wireless hotspot        // 打开wifi
    stop           stop wireless hotspot         // 停止wifi
    restart        restart wireless hotspot      // 重启wifi
    configure      configure hotspot             // 配置wifi
    debug          start with detailed messages  // dubug模式打开wifi,会显示一些详细的信息

 

以前会出现一个一直处于starting...状态的问题,但是,但是尼玛流行的修复方式出了问题了!官网脑残地将hostapd 1.0的deb包删除了,现在的2.x的包尼玛根本不能用。我下载了1.0和2.x版本编译安装还是不行,后来还是用的ubuntu官网的hostapd,居然神奇地可以用了。

解释一下ap-hotspot和hostapd的关系把,其实ap-hostpot是依赖hostapd的,相当于ap-hostpot只是个充当客户端的角色,hostapd才是核心,因此hostapd出了问题ap-hostpot自然也用不了了。

太折腾了。。。。。

需要手动下载源码编译的戳这里 http://w1.fi/cgit/hostap-1/

下载2.x的deb包的戳这里:http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/ 然而这并没有什么卵用。

本文参考了:

http://ubuntuhandbook.org/index.php/2014/02/wifi-hotspot-ubuntu-laptop-android/

http://blog.csdn.net/wdjhzw/article/details/39118651

 

转载于:https://www.cnblogs.com/csulennon/p/4418734.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值