-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Embedded Linux Development
By :

Once you have a running Linux system, it is useful to know which device drivers have been loaded and what state they are in. You can find out a lot by reading the files in /proc
and /sys
.
List the character and block device drivers that are currently loaded and active by reading /proc/devices
:
$ cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
<…>
For each driver, you can see the major number and the base name. However, this does not tell you how many devices each driver is attached to. It only shows ttyAMA
but it gives you no clue as to whether it is attached to four real serial ports. I will come back to that later when we look at sysfs
.
Network devices do not appear in this list because they do not have device nodes. Instead, you can use the ip
tool to get a list of network devices:
# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue...