Files

126 lines
4.5 KiB
Markdown
Raw Permalink Normal View History

2024-02-17 22:52:12 +01:00
[![Crates.io](https://img.shields.io/crates/v/util-linux.svg)](https://crates.io/crates/util-linux)
[![Discord](https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat)](https://discord.gg/wQVJbvJ)
[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/uutils/util-linux/blob/main/LICENSE)
[![dependency status](https://deps.rs/repo/github/uutils/util-linux/status.svg)](https://deps.rs/repo/github/uutils/util-linux)
[![CodeCov](https://codecov.io/gh/uutils/util-linux/branch/master/graph/badge.svg)](https://codecov.io/gh/uutils/util-linux)
2024-01-15 23:25:47 +01:00
# util-linux
2024-01-26 20:11:57 +01:00
This projects aims at doing the same as https://github.com/uutils/coreutils for util-linux.
2024-01-28 22:52:41 +01:00
2024-04-07 21:10:35 -04:00
We are rewriting [these tools](https://github.com/util-linux/util-linux) in Rust as drop-in replacements.
2024-01-28 22:52:41 +01:00
2024-04-07 21:10:35 -04:00
First, reimplement the most important tools from util-linux:
2024-01-28 22:52:41 +01:00
## System Information
2024-03-02 22:55:35 +01:00
- `dmesg`: Displays kernel messages.
- `lscpu`: Shows CPU architecture information.
2024-01-28 22:52:41 +01:00
Started
2024-03-02 22:55:35 +01:00
- `lsipc`: Lists IPC facilities.
- `lslocks`: Lists system locks.
- `lsmem`: Lists memory ranges and status.
- `lsns`: Lists namespaces.
2024-01-15 23:25:47 +01:00
2024-01-28 22:52:41 +01:00
## Hardware Management
2024-03-02 22:55:35 +01:00
- `chcpu`: Manages CPU state.
- `rtcwake`: Manages system sleep states.
- `zramctl`: Manages zram devices.
- `wdctl`: Shows watchdog status.
- `chmem`: Manages kernel memory usage.
2024-01-15 23:25:47 +01:00
2024-01-28 22:52:41 +01:00
## Filesystem Tools
2024-03-02 22:55:35 +01:00
- `findmnt`: Lists mounted filesystems.
- `mountpoint`: Checks if a directory is a mountpoint.
2024-01-28 22:52:41 +01:00
Started
2024-03-02 22:55:35 +01:00
- `fsck`: Checks and repairs filesystems.
- `fsfreeze`: Freezes/unfreezes filesystems.
2025-01-04 14:27:06 +02:00
Done
2024-03-02 22:55:35 +01:00
- `fstrim`: Discards unused blocks on filesystems.
- `wipefs`: Wipes filesystem signatures.
2024-01-28 22:52:41 +01:00
## Partition Management
2024-03-02 22:55:35 +01:00
- `blkdiscard`: Discards sectors on a device.
- `blkid`: Identifies block device attributes.
- `blkzone`: Manages zoned block device parameters.
- `blockdev`: Performs block device operations.
- `mkswap`: Sets up swap space.
- `swaplabel`: Manages swap space labels.
- `addpart`: Adds a partition.
- `delpart`: Deletes a partition.
- `partx`: Manages partition entries.
- `resizepart`: Resizes a partition.
2024-01-28 22:52:41 +01:00
## Process and Resource Management
2024-03-02 22:55:35 +01:00
- `runuser`: Runs a shell with different user/group IDs.
- `sulogin`: Provides single-user mode login.
- `chrt`: Manages real-time process attributes.
- `ionice`: Sets process I/O scheduling class/priority.
- `kill`: Sends signals to processes.
- `renice`: Alters process priority.
- `prlimit`: Sets/gets process resource limits.
- `taskset`: Sets/gets process CPU affinity.
- `uclampset`: Manages process utilization clamping.
2024-01-28 22:52:41 +01:00
## User and Session Management
2024-03-02 22:55:35 +01:00
- `su`: Changes user ID or becomes superuser.
- `agetty`: Manages TTYs for login prompts.
- `ctrlaltdel`: Configures Ctrl-Alt-Del action.
- `pivot_root`: Changes the root filesystem.
- `switch_root`: Switches to a different root filesystem.
- `last`: Lists last logged-in users.
- `lslogins`: Displays user information.
- `mesg`: Controls write access to terminal.
- `setsid`: Runs a program in a new session.
- `setterm`: Sets terminal attributes.
- `getty`: Manages virtual console login prompts.
2024-01-28 22:52:41 +01:00
## Networking and IPC
2024-03-02 22:55:35 +01:00
- `ipcmk`: Creates IPC resources.
- `ipcrm`: Removes IPC resources.
- `ipcs`: Shows IPC facilities status.
- `nsenter`: Enters different namespaces.
2024-01-28 22:52:41 +01:00
## Utility Tools
2024-03-02 22:55:35 +01:00
- `lsblk`: Lists block devices.
- `fallocate`: Preallocates file space.
- `flock`: Manages file locks.
- `getopt`: Parses command options.
- `hardlink`: Creates hard links.
- `mcookie`: Generates random numbers.
- `namei`: Follows a pathname to its endpoint.
2025-04-04 19:31:34 +02:00
- `rename`: Renames files.
2024-03-02 22:55:35 +01:00
- `rev`: Reverses lines in a file.
- `setarch`: Sets architecture emulation.
- `setpriv`: Runs a program with different privileges.
- `unshare`: Runs a program with unshared namespaces.
- `utmpdump`: Dumps UTMP/WTMP files.
- `whereis`: Locates binaries, sources, and manuals.
- `ldattach`: Attaches line discipline to a serial line.
- `readprofile`: Reads kernel profiling info.
- `i386, linux32, linux64, x86_64`: Set personality flags for execution environment.
2025-04-19 23:59:35 +00:00
- `uuidgen`: Generate different types of UUID.
2024-01-15 23:25:47 +01:00
Note:
* /bin/more is already implemented in https://github.com/uutils/coreutils
Project:
http://www.kernel.org/pub/linux/utils/util-linux/
2024-02-17 22:52:12 +01:00
## Installation
Ensure you have Rust installed on your system. You can install Rust through [rustup](https://rustup.rs/).
Clone the repository and build the project using Cargo:
```bash
git clone https://github.com/uutils/util-linux.git
cd util-linux
cargo build --release
cargo run --release
```
## License
util-linux is licensed under the MIT License - see the `LICENSE` file for details