zoukankan      html  css  js  c++  java
  • linux无线配置

    1. 找 wifi 热点

     sudo iwlist scan

    2. 生成热点的配置(wpa2加密)
     sudo wpa_passphrase "wifi热点名称" "wpa密码" 
    会生成这样格式的配置代码:
     network={
                            ssid="SSID_xxx"
                            #psk="your_pass_here"
                            psk=eb900177d2234487397b54f1fc1d6efc7f30e43b988ad21488ae3eb701a1g3b0
                    }
    将这段代码添加到 /etc/wpa_supplicant/wpa_supplicant.conf 文件中:
                    ctrl_interface=/var/run/wpa_supplicant
                    # ctrl_interface_group=wheel
            

                    network={
                            ssid="SSID_xxx"
                            #psk="your_pass_here"
                            psk=eb900177d2234487397b54f1fc1d6efc7f30e43b988ad21488ae3eb701a1g3b0
                    }
            
            配置就完成了,下面添加启动代码
    3. 在 /etc/rc.local 中添加相应的 wifi 启动代码:
                    pkill wpa_supplicant
                    pkill dhclient
            

                    ifconfig wlan0 down
                    ifconfig wlan0 up
                    iwconfig wlan0 essid "SSID_xxx"
                    wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
            

                    dhclient wlan0


     现在重启系统,无线网络就会配置好了

  • 相关阅读:
    jQuery 往table添加新内容有以下四个方法:
    Postgresql 截取字符串
    如何取得select结果数据集的前10条记录。postgresql
    postgreSQL除法保留小数
    Java面试——微服务
    Vue面试中,经常会被问到的面试题/Vue知识点整理
    Java面试之五大框架的理解
    Session共享的四种方法
    ES6参考---三点运算符实质
    VUE实例课程---40、counter实例
  • 原文地址:https://www.cnblogs.com/tomato2014/p/6057893.html
Copyright © 2011-2022 走看看