Gentoo Archives: gentoo-user

From: Consus <consus@××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Listing kernel modules
Date: Sat, 02 May 2020 13:32:30
Message-Id: 20200502133222.GC985@redacted
In Reply to: Re: [gentoo-user] Listing kernel modules by Consus
1 On Sat, May 02, 2020 at 04:29:38PM +0300, Consus wrote:
2 > On Sat, May 02, 2020 at 02:19:18PM +0100, Peter Humphrey wrote:
3 > > Afternoon all,
4 > >
5 > > Is there a straightforward way of listing kernel modules that exist
6 > > but haven't been loaded?
7 >
8 > This will do I guess:
9 >
10 > # lsmod | awk '{print $1}' > inserted
11 > # find /lib/modules/$(uname -r) -name '*.ko' -printf '%f\n' | sed 's/\.ko$//' > present
12 > # cat inserted present | sort -u
13
14 Wait, no, replace the last line with:
15
16 # cat inserted present | sort | uniq -u

Replies

Subject Author
Re: [gentoo-user] Listing kernel modules Peter Humphrey <peter@××××××××××××.uk>