# Where'd modprobe -l go?

## danomac

Where'd modprobe -l go to? I used to use it all the time (well, until a recent update) and now it's just gone. It's not even referenced in the manpages.

Yes, I know they're in /lib/modules (which I happened to have a brain fart and couldn't remember, it'd been so long since I manually had to look there.)

----------

## kimmie

From man modprobe:

```
-l --list

               List all modules matching the given wildcard (or "*" if no wild‐

               card is given).  This option is provided for backwards  compati‐

               bility  and  may  go away in future: see find(1) and basename(1)

               for a more flexible alternative.
```

I guess you've hit the future! What's it like there?

----------

## VoidMage

Most likely the answer is simple - sys-apps/kmod.

----------

## rhill

Try `lsmod`.

----------

## cach0rr0

 *dirtyepic wrote:*   

> Try `lsmod`.

 

doesnt quite do the same thing 

loaded modules (via /proc/modules) as opposed to listing all modules, or, the same as doing

```

# find /lib/modules/`uname -r` -name '*.ko'

```

i.e.

```

# find /lib/modules/`uname -r` -name '*.ko'

/lib/modules/3.2.11-hardened/kernel/drivers/scsi/scsi_wait_scan.ko

/lib/modules/3.2.11-hardened/kernel/drivers/firmware/dmi-sysfs.ko

/lib/modules/3.2.11-hardened/kernel/drivers/virtio/virtio_mmio.ko

/lib/modules/3.2.11-hardened/kernel/lib/libcrc32c.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc-ccitt.ko

/lib/modules/3.2.11-hardened/kernel/lib/cordic.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc7.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc8.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc16.ko

/lib/modules/3.2.11-hardened/kernel/net/ipv4/netfilter/iptable_raw.ko

/lib/modules/3.2.11-hardened/kernel/net/netfilter/xt_mark.ko

```

```

# modprobe -l

/lib/modules/3.2.11-hardened/kernel/net/netfilter/xt_mark.ko

/lib/modules/3.2.11-hardened/kernel/net/ipv4/netfilter/iptable_raw.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc16.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc8.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc7.ko

/lib/modules/3.2.11-hardened/kernel/lib/cordic.ko

/lib/modules/3.2.11-hardened/kernel/lib/crc-ccitt.ko

/lib/modules/3.2.11-hardened/kernel/lib/libcrc32c.ko

/lib/modules/3.2.11-hardened/kernel/drivers/virtio/virtio_mmio.ko

/lib/modules/3.2.11-hardened/kernel/drivers/firmware/dmi-sysfs.ko

/lib/modules/3.2.11-hardened/kernel/drivers/scsi/scsi_wait_scan.ko

```

VS

```

# lsmod

Module                  Size  Used by

iptable_raw             1391  0 

xt_mark                 1369  0 

```

----------

## danomac

```

 # modprobe -l

modprobe: invalid option -- 'l'

```

No worky.

 *Quote:*   

> 
> 
> OPTIONS
> 
>        -a --all
> ...

 

It's definitely gone.

```

# equery list kmod

 * Searching for kmod ...

[IP-] [  ] sys-apps/kmod-9-r3:0

```

I guess it is kmod. But why would they remove something useful? Lately linux in general has been pissing me off. Imagine a newbie experimenting with a kernel to list all modules... instead of a simple command he has to literally search manually. It's kind of stupid.

As cach0rr0 mentioned, lsmod doesn't work, I want all modules built in the kernel, not just the ones that are loaded. I do know how to find them manually, I'm just pissed that something that used to be a few keystokes is now a couple of dozen. Feh.   :Evil or Very Mad: 

----------

## Logicien

Hello,

reading your posts, I worked on a Bash function that can be include in a Bash configuration file and could do about the same than the command modprobe -l:

```
function fmod() {

[ "$1" = '' ] && find /lib/modules/$(uname -r) -iname *.ko -print | awk -F $(uname -r)/ '{print $NF}'

[ "$1" != '' ] && find /lib/modules/$(uname -r) -iname "$1".ko -print | awk -F $(uname -r)/ '{print $NF}'

}
```

The output of

```
fmod *2800*
```

should be the same as

```
modprobe -l *2800*
```

Both give me

```
kernel/drivers/net/wireless/rt2x00/rt2800lib.ko

kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
```

----------

