# lsu [![Rust](https://github.com/l5yth/lsu/actions/workflows/rust.yml/badge.svg)](https://github.com/l5yth/lsu/actions/workflows/rust.yml) [![Codecov](https://codecov.io/gh/l5yth/lsu/graph/badge.svg)](https://codecov.io/gh/l5yth/lsu) [![GitHub Release](https://img.shields.io/github/v/release/l5yth/lsu)](https://github.com/l5yth/lsu/releases) [![Crates.io](https://img.shields.io/crates/v/lsu.svg)](https://crates.io/crates/lsu) [![Top Language](https://img.shields.io/github/languages/top/l5yth/lsu)](https://github.com/l5yth/lsu) [![License: Apache-2.0](https://img.shields.io/github/license/l5yth/lsu)](https://github.com/l5yth/lsu/blob/main/LICENSE) `lsu` is a Rust terminal UI for viewing `systemd` service units and their journal. ![lsu terminal UI screenshot](assets/images/lsu-tui-overview.png) ## Dependencies - any GNU/Linux system with `systemd` obviously - `systemctl` and `journalctl` available in `$PATH` - Some current Rust stable toolchain (Rust 2024 edition, Cargo) Core crates: `ratatui`, `crossterm`, `serde`, `serde_json`, `anyhow`. ## Installation Helpers exist for Arch and Gentoo-based systems but you can install also via crates.io or from source directly. ### Archlinux See [PKGBUILD](./packaging/archlinux/PKGBUILD) ### Gentoo See [lsu-9999.ebuild](./packaging/gentoo/app-misc/lsu/lsu-9999.ebuild) ### Cargo Crates ```bash cargo install lsu ``` ### From Source Build from source: ```bash git clone https://github.com/l5yth/lsu.git cd lsu cargo build --release ``` Run the built binary: ```bash ./target/release/lsu ``` Or run directly in development: ```bash cargo run --release -- ``` ## Usage ```text lsu v0.1.2 apache v2 (c) 2026 l5yth Usage: lsu [OPTIONS] Show systemd services in a terminal UI. By default only loaded and active units are shown. Options: -a, --all Shorthand for --load all --active all --sub all --load Filter by load state (all, loaded, stub, not-found, bad-setting, error, merged, masked) --active Filter by active state (all, active, reloading, inactive, failed, activating, deactivating, maintenance, refreshing) --sub Filter by sub state (all, running, exited, dead, failed, start-pre, start, start-post, auto-restart, auto-restart-queued, dead-before-auto-restart, condition, reload, reload-post, reload-signal, reload-notify, stop, stop-watchdog, stop-sigterm, stop-sigkill, stop-post, final-sigterm, final-sigkill, final-watchdog, cleaning) --sort Sort order for the list view (auto, name, status) auto (default): status when all filters are 'all', name otherwise -u, --user Show units in user instead of system scope -h, --help Show this help text -v, --version Show version and copyright ``` Examples: ```bash lsu lsu --all lsu --user lsu --user --all lsu --load failed lsu --active inactive lsu --sub exited lsu --load loaded --active inactive --sub dead lsu --user --load loaded --active active --sub running ``` In-app keys: - `q`: quit - `r`: refresh now - `↑` / `↓`: move selection in service unit list - `l` or `enter`: open detailed logs for selected service - Log view: `↑` / `↓` scroll logs, `b` or `esc` return to list ## Development ```bash cargo check cargo test --all --all-features --verbose cargo fmt --all cargo clippy --all-targets --all-features -D warnings ```