Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > L


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


lsdev — list device drivers in the system


/usr/sbin/lsdev [-h] [-d driver | -C class] [-b block_major] [-c char_major] [-e major] [major ...]


The lsdev command lists, one pair per line, the major device numbers and driver names of device drivers configured into the system and available for invocation via special files. A -1 in either the block or character column means that a major number does not exist for that type.

If no arguments are specified, lsdev lists all drivers configured into the system.

If the -h option is specified, lsdev will not print a heading. This option may be useful when the output of lsdev will be used by another program.

The -d, -C, -b, -c, and -e options are used to select specific device drivers for output. If more than one option is specified, all drivers that match the criteria specified by those options will be listed. These search options are divided into two types: name search keys (the -d and -C options) and major number search keys (the -b, -c, and -e options). If both types of options are present, only entries that match both types are printed. The same type of option may appear more than once on the command line with each occurrence providing an ORing effect of that search type. The -d and -C options may not be specified at the same time.

The ability to process major arguments is provided for compatibility and functions like the -e option.


-C class

List device drivers that match class.

-d driver

List device drivers with the name driver.

-b block_major

List device drivers with a block major number of block_major.

-c char_major

List device drivers with a character major number of char_major.

-e major

List device drivers with either a character major number or block major equal to major.


Invalid combination of options

The -d and -C options may not be specified at the same time.

Invalid major number

A major number is malformed or out of range.


To output entries for all drivers in the pseudo class:

lsdev -C pseudo

To output entries that are in the class disk that have either a block or character major number of 0:

lsdev -C disk -e 0

To get the character major number of my_driver into a shell environment variable:

C_MAJOR=$(lsdev -h -d my_driver | awk '{print $1}')


Some device drivers available from the system may be intended for use by other drivers. Attempting to use them directly from a special file may produce unexpected results.

A driver may be listed even when the hardware requiring the driver is not present. Attempts to access a driver without the corresponding hardware will fail.

lsdev only lists drivers that are configured into the currently executing kernel. For a complete list of available drivers, please run sam (see sam(1M).


Since lsdev relies on the device driver information provided in a driver_install routine, lsdev may not list drivers installed by other means.


lsdev was developed by HP.



Section 7 entries related to specific device drivers.

HP-UX System Administrator's Guide.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.