≡ Menu

dmesg command

Linux Command To Find SATA Link Speed Such as 1.5 / 3.0 / 6.0 Gbps [ Hard Disk ]

How do I find out my SATA link speed? How do I make sure my sata hard disk is working at 6Gbps speed and how do I verify this on a Linux server running on HP or IBM amd64 hardware?
[click to continue…]

Linux: Find Out The Name Of DVD / CD-ROM / Writer / Blu-ray Device

How do I find out what the name of my CD-ROM or DVD device or Blu-ray device is under Linux operating system without using GUI options?
[click to continue…]

grep Command Tutorial For Ubuntu / Debian Linux

I recently switched from MS-Windows XP to Ubuntu Linux. How do I use the grep command on Ubuntu or Debian Linux? Can you give us some practical examples?
[click to continue…]

Linux Create A Bootable USB Pen

How do I create a bootable USB pen drive to start my CentOS / Fedora Linux? How do I create a bootable USB flash pen for installation of Linux, and for creation of rescue and other special-purpose boot disks using command line options?
[click to continue…]

Ubuntu Linux: View Boot Log

How do I view detailed boot log of my Ubuntu system?
[click to continue…]

FreeBSD Check The Health of Adaptec RAID Array

I've Adaptec RAID 1 set via 5405 PCI card. I know how to get check the health of Adaptec RAID array under Linux, but how do I find information about my RAID card, RAID status, disk failure and other information via command line?
[click to continue…]

FreeBSD Mount CDROM / DVD Drive From The Command Prompt

How do I mount the CDROM from FreeBSD shell or command line?
[click to continue…]

Linux LAN card: Find out full duplex / half speed or mode

Q. How do I find out if my Lan (NIC) card working at full or halt duplex mode / speed under Linux?

A. LAN card or NIC is use to send and receive data. Technically, we use word Duplex for this functionality. Full duplex means you are able to send and receive data (files) simultaneously. In half duplex, you can either send or receive data at a time (i.e. you cannot send receive data (files) simultaneously). Obviously, full duplex gives you best user experience. However, how can I find out whether I am using full duplex/half duplex speed/mode?

Task: Find full or half duplex speed

You can use dmesg command to find out your duplex mode:
# dmesg | grep -i duplex

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

ethtool command

Uss ethtool to display or change ethernet card settings. To display duplex speed, enter:
# ethtool eth1

Settings for eth1:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: umbg
        Wake-on: g
        Current message level: 0x00000007 (7)
        Link detected: yes

mii-tool command

You can also use mii-tool to find out your duplex mode. Type following command at shell prompt:
# mii-tool


eth0: negotiated 100baseTx-FD flow-control, link ok


  1. 100baseTx-FD: 100Mbps full duplex (FD)
  2. 100baseTx-HD: 100Mbps half duplex (HD)
  3. 10baseT-FD: 10Mbps full duplex (FD)
  4. 10baseT-HD: 10Mbps half duplex (HD)

mii-tool utility checks or sets the status of a network interface’s Media Independent Interface (MII) unit. Most fast ethernet adapters use an MII to autonegotiate link speed and duplex setting. If you are using old card then this utility may not work (use dmesg command).

This utility is useful for forcing specific Ethernet speed and duplex settings too, setup 100Mbps full duplex speed under Linux:
# mii-tool -F 100baseTx-FD

Setup 10Mbps half duplex:
# mii-tool -F 10baseT-HD

You can find more information about setting duplex speed here using ethtool command.

Updated for accuracy!

Linux: Find out Ethernet card driver name

Under Linux, you use term called modules for device drivers. The driver can be loaded or unloaded as per your requirement using commands. Each driver or module gives the Linux information on how to control that particular Ethernet card. The name of each module (driver) is listed in the /etc/modules.conf file.

Command to find out Ethernet card driver name

You can try any one of the following command to find out your Ethernet card driver:

# dmesg | grep 'Ethernet driver'


8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

Or search a file called /var/log/dmesg:

# grep 'Ethernet driver' /var/log/dmesg


8139too Fast Ethernet driver 0.9.27
8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)

You can also get driver name from config file:

# grep eth0 /etc/modules.conf


alias eth0 8139too


# vi /etc/modules.conf

Search for eth0 string.

In above example 8139too is driver loaded for eth0. You can find out more information about this driver using modinfo command:

# modinfo 8139too

modinfo program to show information about a Linux Kernel module. You can also find out all loaded modules or drivers using lsmod command:

# lsmod | less

lsmod is a program to show the status of modules in the Linux Kernel.

See also: