Inspect /proc/driver Safely When the Directory Is Empty
You go looking for driver details under /proc/driver and find nothing, which feels like a bug but usually isn't. This guide explains what /proc/driver/ represents, checks whether this host exposes any driver-specific entries, and reads those entries without changing kernel state. Allow about ten minutes. You need a shell and a mounted proc filesystem; the examples are read-only and normally need no elevated privileges.
The route
Jump straight to the step you need, or tick off Done means at the end.
The short version: an empty directory is not an error. The installed proc_driver(5) page describes /proc/driver/ as an empty subdirectory, while the broader proc documentation allows kernel components to expose driver information there. Its contents are therefore host- and kernel-dependent.
1. Check the installed documentation and kernel
Start by recording the local man-pages package and kernel. This matters because procfs is supplied by the running kernel, whereas the man page is a separate documentation package.
$ dpkg-query -W -f='${Package} ${Version}\n' manpages
manpages 6.7-2
$ man -P cat 5 proc_driver | sed -n '1,35p'
$ uname -srvm
Linux 6.8.0-139-generic #139-Ubuntu SMP PREEMPT_DYNAMIC x86_64
Your package and kernel versions will differ. In this environment the page is from Linux man-pages 6.7, dated 15 August 2023, and its NAME and DESCRIPTION identify the path as an empty directory. That's a description of the interface documented by this man page, not a guarantee that every running kernel enumerates no entries at all.
Checkpoint
Keep the kernel version separate from the man-pages version. Updating one doesn't automatically update the other.
2. Confirm that procfs is mounted
Use findmnt to see which filesystem supplies the path. It should normally report a proc filesystem mounted at /proc.
$ findmnt -T /proc/driver -o TARGET,SOURCE,FSTYPE,OPTIONS
TARGET SOURCE FSTYPE OPTIONS
/proc proc proc rw,relatime
Warning
If the command says /proc/driver doesn't exist, do not create a normal directory there as a workaround. Check findmnt -T /proc and ask whoever manages the host whether procfs is intentionally absent or restricted. Mounting procfs is an administrator action and can affect a container or service's view of the kernel; it sits outside this read-only check.
Checkpoint
Proceed only when /proc/driver resolves inside procfs. A directory with the same spelling on another filesystem is not the interface described by proc_driver(5).
3. List entries without following assumptions
List the directory and then inspect its immediate children. The first command shows permissions and ownership; the second reports whether a child is a regular file, directory or another procfs object.
$ ls -la /proc/driver
total 0
dr-xr-xr-x 2 root root 0 Sep 26 11:39 .
dr-xr-xr-x 14 root root 0 Sep 26 11:39 ..
dr-xr-xr-x 2 root root 0 Sep 26 11:39 rtc
$ find /proc/driver -maxdepth 1 -mindepth 1 -printf '%y %p\n' | sort
d /proc/driver/rtc
On a different machine, the listing may contain nothing, which is a valid result matching the local man page's concise description. On this host, the kernel exposes an rtc entry. The Linux kernel proc documentation describes the directory as a place for various driver information and lists rtc as a current example. Don't infer that every driver has an entry here, or that an entry has the same fields across kernels.
4. Read a reported entry
Only read paths that the listing actually returned. For the rtc example, cat displays the kernel's current text representation:
$ cat /proc/driver/rtc
rtc_time : 11:39:55
rtc_date : 2026-09-26
alrm_time : 07:49:03
alarm_IRQ : no
periodic IRQ frequency: 1024
batt_status: okay
Output is time-sensitive and the exact spacing and field set are kernel-dependent. The excerpt shows the shape of the installed host's output, not a portable parsing contract. If you need a particular value in a script, first confirm the entry and field exist on every supported kernel, then handle missing or changing lines as normal conditions.
A read can also fail after a successful directory listing if a driver unloads or the proc entry disappears. Treat that as a transient state change, not permission to retry with sudo.
5. Keep driver information in the right interface
/proc/driver/ is not a catalogue of all loaded drivers.
- Device relationships and driver bindings: inspect sysfs instead.
- Loaded kernel modules: use the module tools or inspect
/proc/modules. - Probe-failure logs: use the system's journal or kernel log policy.
$ find /sys/bus -path '*/drivers/*' -maxdepth 4 -type d 2>/dev/null | head
$ sed -n '1,5p' /proc/modules
$ findmnt -T /sys -o TARGET,SOURCE,FSTYPE,OPTIONS
The sysfs command may produce a host-specific list, and the module file may be empty or restricted in a hardened environment. Neither outcome changes the meaning of /proc/driver/. Avoid treating a missing proc entry as proof that a driver is absent.
6. Avoid writes and unsafe automation
Most procfs entries are read-only, but procfs also contains writable interfaces. The directory's permissions are not a complete safety guarantee, and running a command as root can turn an accidental write into a kernel or device configuration change.
Warning
Do not redirect output into a path under /proc/driver, use tee there, or try to create a missing entry.
$ # Safe: copy a snapshot to a normal, new file if you need one
$ umask 077
$ cat /proc/driver/rtc > /tmp/rtc-snapshot.txt
$ test -s /tmp/rtc-snapshot.txt && echo 'snapshot captured'
snapshot captured
Recovery
The snapshot is disposable and doesn't alter the driver. Remove it later with rm -- /tmp/rtc-snapshot.txt only after checking it contains no information you need, since deletion can't be undone. If you need a persistent record, choose a controlled location and follow its retention policy.
7. Diagnose an unexpected empty result
Work through these checks in order:
- Run
findmnt -T /proc/driverand confirm that procfs supplies the path. - Run
ls -la /proc/driveragain; procfs contents can change while drivers initialise or unload. - Check the running kernel with
uname -r, not only the man-pages package version. - Use sysfs or the kernel log for driver binding and probe questions.
- Ask the platform administrator about container restrictions before changing mounts or privileges.
Do not create a directory, reload a module, remount procfs or reboot merely because the listing is empty. Those actions change system state and don't make a driver-specific proc entry appear unless the kernel component is designed to provide one.
Done means
- Recorded the installed man-pages and running kernel versions.
- Confirmed that
/proc/driveris supplied by procfs. - Accepted an empty listing as a valid host-specific result.
- Read only entries that actually exist and treated their format as kernel-dependent.
- Used sysfs, module information or logs for questions procfs doesn't answer.
- Made no writes, mounts, module changes or service-disrupting changes.