UBuntu 安装无线网卡
经过一番努力终于成功,但是不加以大家在不能上网的机器上配置,那样讲非常的麻烦!
切忌 !
本实例采用的ndiswrapper+windows下可驱动的inf进行安装的,具体如下
首先安装ndiswrapper
ubuntu下也就是 ndisgtk (用于安装无线网卡驱动)
sudo apt-get install ndisgtk
安装好了之后,找到你的无线网卡在windows下的驱动文件(含有.inf的目录)(可以从网上下载也可以从驱动盘中获得),将该目录中的文件拷到主目录的新建文件夹中,执行
sudo ndiswrapper -i yourname.inf //yourname是你驱动inf的文件名称
安装以后会在 /etc/ndiswrapper/ 下面建立一个相应的目录youname,
到该目录下(cd /etc/ndiswrapper)执行 sudo ndiswrapper -l //查看驱动安装ok了没 显示driverinstalled
写入配置文件:
sudo ndiswrapper -m (让ndiswrapper在启动时自动加载,
无线网卡会在系统启动初始化hotplug subsysytem时装载(这时卡上的电源灯才会亮))
modprobendiswrapper (让linux加载ndiswrappermodule)
具体命令如下:
\\安装ndiswrapper 如果不能上网的话请自行准ndisgtk、 ndiswrapper、ndiswrapper-1.9
sudo apt-get install ndisgtk
sudo ndiswrapper -i net8192u.inf
cd /etc/ndiswrapper/
sudo ndiswrapper -l
sudo ndiswrapper -m
sudo ndiswrapper -mi \\保证重启之后不再设置
sudo modprobe ndiswrappe
配置wlan0 vi /etc/network/interface
# Thewireless network interface
auto wlan0 # or allow-hotplug wlan0
iface wlan0 inet static # or dhcp
hwaddress ether xx:xx:xx:xx:xx:xx
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
gateway xxx.xxx.xxx.xxx
#WEP
wireless-essid xxxx
wireless-keymode open|restricted
wireless-key 12345|s:ascii
#WPA
wpa-ssid xxxx //essid
wpa-driver wext
wpa-psk plaintext|hexadecimal //密码
实际上我们公司未用web用的是wpa2.中间web那部分可以不要!