个人工具

“网卡”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(以内容'==基础知识== Ubuntu 中,通常有线网卡为'''eth0''',无线网卡则为'''wlan0''',后续增加的以此类推(可能某些无线网卡型号命名为'''eth1…'创建新页面)
 
第1行: 第1行:
 
==基础知识==
 
==基础知识==
 
Ubuntu 中,通常有线网卡为'''eth0''',无线网卡则为'''wlan0''',后续增加的以此类推(可能某些无线网卡型号命名为'''eth1''',而非'''wlan0''')。
 
Ubuntu 中,通常有线网卡为'''eth0''',无线网卡则为'''wlan0''',后续增加的以此类推(可能某些无线网卡型号命名为'''eth1''',而非'''wlan0''')。
===ifconfig简介===
+
==ifconfig简介==
 
ifconfig 是一个用来查看、配置、启用或禁用网络接口的工具,这个工具极为常用的(说的是喜欢动命令的人……)。
 
ifconfig 是一个用来查看、配置、启用或禁用网络接口的工具,这个工具极为常用的(说的是喜欢动命令的人……)。
====查看系统网卡信息====
+
===查看系统网卡信息===
 
<pre>ifconfig</pre>
 
<pre>ifconfig</pre>
====激活/禁用网卡====
+
===激活/禁用网卡===
 
激活网卡
 
激活网卡
 
<pre>sudo ifconfig 网卡设备名 up</pre>
 
<pre>sudo ifconfig 网卡设备名 up</pre>
第11行: 第11行:
 
<pre>ifconfig 网卡设备名</pre>
 
<pre>ifconfig 网卡设备名</pre>
  
===启用/禁用网络===
+
==启用/禁用网络==
 
<pre>sudo /etc/init.d/networking start</pre>
 
<pre>sudo /etc/init.d/networking start</pre>
  
===iwconfig===
+
==iwconfig==
 
用于查看无线连接情况
 
用于查看无线连接情况
 
<pre>qii@ubuntu:~$ iwconfig
 
<pre>qii@ubuntu:~$ iwconfig
第26行: 第26行:
 
           Power Management:off
 
           Power Management:off
 
</pre>
 
</pre>
===查看网卡设备信息===
+
==查看网卡设备信息==
 
查看网卡生产商,型号。
 
查看网卡生产商,型号。
 
<pre>lspci</pre>
 
<pre>lspci</pre>
第33行: 第33行:
 
04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
 
04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
 
</pre>
 
</pre>
 
+
==修改网卡名==
 
[[Category:联网]]
 
[[Category:联网]]

2010年8月1日 (日) 12:27的版本

基础知识

Ubuntu 中,通常有线网卡为eth0,无线网卡则为wlan0,后续增加的以此类推(可能某些无线网卡型号命名为eth1,而非wlan0)。

ifconfig简介

ifconfig 是一个用来查看、配置、启用或禁用网络接口的工具,这个工具极为常用的(说的是喜欢动命令的人……)。

查看系统网卡信息

ifconfig

激活/禁用网卡

激活网卡

sudo ifconfig 网卡设备名 up

查看网卡信息

ifconfig 网卡设备名

启用/禁用网络

sudo /etc/init.d/networking start

iwconfig

用于查看无线连接情况

qii@ubuntu:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

查看网卡设备信息

查看网卡生产商,型号。

lspci

举例来说,最底部,这样的格式,这里第一行是Realtek的RTL8111/8168B有线网卡,第二行是Atheros的AR9285无线网卡。

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

修改网卡名