Linux ENXIO (errno 6) — No Such Device or Address

ENXIO (errno 6) means the requested device or address does not exist. This error occurs when you attempt to open a special device file that has no corresponding hardware driver, or when a network address cannot be resolved. It is distinct from ENOENT (errno 2) because ENXIO specifically refers to device or address references rather than general file absence.

Common Causes

  • Opening a device file for hardware that is not installed or recognized
  • Attempting to access a serial port or disk device that does not exist
  • Binding to a network address that is not configured on the system
  • Using an invalid minor device number in an open() call

How to Fix ENXIO

1. Verify Device Exists

Check if the device file you are trying to access actually exists:

ls -la /dev/sd* /dev/tty* /dev/video*

2. Check Loaded Kernel Modules

Confirm the kernel module for your device is loaded:

lsmod

Load the appropriate module if missing:

sudo modprobe <module_name>

3. Scan for Hardware Changes

Rescan the PCI bus for newly attached devices:

sudo rescan-scsi-bus

4. Verify Network Address Configuration

Ensure the network interface is up and the address is valid:

ip addr show
ping -c 1 <address>

Verification

After fixing the issue, retry the operation that produced ENXIO. Verify the device is accessible:

ls -la /dev/<device_name>

Comments