https://github.com/diananites/linux_modules
Tool To Manage Linux Kernel Modules
https://github.com/diananites/linux_modules
kernel-module kmod linux linux-modules rust-lang
Last synced: 10 months ago
JSON representation
Tool To Manage Linux Kernel Modules
- Host: GitHub
- URL: https://github.com/diananites/linux_modules
- Owner: DianaNites
- License: apache-2.0
- Created: 2020-02-16T19:15:09.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-05-25T02:37:01.000Z (over 2 years ago)
- Last Synced: 2025-02-02T09:01:38.672Z (12 months ago)
- Topics: kernel-module, kmod, linux, linux-modules, rust-lang
- Language: Rust
- Homepage:
- Size: 241 KB
- Stars: 25
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Linux Modules
[](https://github.com/RichardLitt/standard-readme)
[](https://crates.io/crates/linux_modules)

[](https://docs.rs/linux_modules)
Tool To Manage Linux Kernel Modules
This is a tool to manage your Linux Kernel Modules.
It is an alternative to `modprobe`, and supports listing, adding, and removing modules,
as well as displaying information on them.
It does not yet support modprobe style dependencies or aliases,
and is not capable of displaying module signature data, except whether one exists or not.
## Install
```shell
cargo install linux_modules
```
## Usage
### CLI
```shell
$ nms info loop
╭───────────────────┬──────────────────────────────────────╮
│ File ┆ /lib/modules/6.3.1-arch2-1/kernel/dr │
│ ┆ ivers/block/loop.ko.zst │
╞═══════════════════╪══════════════════════════════════════╡
│ Authors ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ License ┆ GPL │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Description ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Version ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Firmware ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Alias ┆ devname:loop-control │
│ ┆ char-major-10-237 │
│ ┆ block-major-7-* │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Dependencies ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Soft Dependencies ┆ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ In Tree ┆ true │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Retpoline ┆ true │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Staging ┆ false │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Version Magic ┆ 6.3.1-arch2-1 SMP preempt mod_unload │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Source Checksum ┆ B9EBD1F7F134B1C20C5B09B │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Parameters ┆ ╭────────────┬───────────┬─────────╮ │
│ ┆ │ Name ┆ Descripti ┆ Type │ │
│ ┆ │ ┆ on ┆ │ │
│ ┆ ╞════════════╪═══════════╪═════════╡ │
│ ┆ │ hw_queue_d ┆ Queue ┆ Unknown │ │
│ ┆ │ epth ┆ depth for ┆ │ │
│ ┆ │ ┆ each ┆ │ │
│ ┆ │ ┆ hardware ┆ │ │
│ ┆ │ ┆ queue. ┆ │ │
│ ┆ │ ┆ Default: ┆ │ │
│ ┆ │ ┆ 128 ┆ │ │
│ ┆ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤ │
│ ┆ │ max_loop ┆ Maximum ┆ int │ │
│ ┆ │ ┆ number of ┆ │ │
│ ┆ │ ┆ loop ┆ │ │
│ ┆ │ ┆ devices ┆ │ │
│ ┆ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤ │
│ ┆ │ max_part ┆ Maximum ┆ int │ │
│ ┆ │ ┆ number of ┆ │ │
│ ┆ │ ┆ partition ┆ │ │
│ ┆ │ ┆ s per ┆ │ │
│ ┆ │ ┆ loop ┆ │ │
│ ┆ │ ┆ device ┆ │ │
│ ┆ ╰────────────┴───────────┴─────────╯ │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Signature ┆ true │
╰───────────────────┴──────────────────────────────────────╯
```
Note that the table size will adapt to your terminal.
This example uses size `60`.
### Pager
`nms info` and `nms list` automatically pipe output to a pager,
defaulting to `less`, but this may be customized through environment variables.
See the [`pager`](https://crates.io/crates/pager) crate for details on
how to customize what pager is used.
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for version history
## Contributing
This crate is not looking for contributors at this time.
However, feel free to ask questions and request bindings using github issues,
or suggest/discuss API improvements.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as below, without any additional terms or conditions.
## License
Licensed under either of
- Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or
- MIT license
([LICENSE-MIT](LICENSE-MIT) or
at your option.