Skip to content
项目

关于

graphical ways to manage system services and docker containers

系统与基础设施

这些数字如何统计

可以做什么

  • Containers: live CPU/memory/PIDs, start/stop/restart, logs, inspect, change resource limits in place, open a shell (bash or sh)
  • Compose: containers grouped by project; start/stop/restart, up -d, build, pull, down; flags changed compose files
  • Docker or Podman, picked automatically (see Podman)
  • Services: list, filter, start/stop/restart, follow journalctl logs, edit unit files

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

g-systemctl

Test Status Build Status Podman License: MIT

A terminal UI for Docker or Podman containers and system services (systemctl on Linux, launchctl on macOS).

g-systemctl containers tab

Features

  • Containers: live CPU/memory/PIDs, start/stop/restart, logs, inspect, change resource limits in place, open a shell (bash or sh)
  • Compose: containers grouped by project; start/stop/restart, up -d, build, pull, down; flags changed compose files
  • Docker or Podman, picked automatically (see Podman)
  • Services: list, filter, start/stop/restart, follow journalctl logs, edit unit files
  • Detail page with summary, graphs and live logs
  • Keyboard and mouse

Install

Debian / Ubuntu (22.04+ / 12+), use arm64 instead of amd64 for ARM:

curl -LO https://github.com/shakg/g-systemctl/releases/latest/download/g-systemctl-linux-amd64.deb
sudo apt install ./g-systemctl-linux-amd64.deb

Other Linux (glibc 2.34+):

curl -LO https://github.com/shakg/g-systemctl/releases/latest/download/g-systemctl-linux-$(uname -m).tar.gz
tar -xzf g-systemctl-linux-$(uname -m).tar.gz
sudo install -m 755 g-systemctl-*/g-systemctl /usr/local/bin/g-systemctl

macOS:

curl -LO https://github.com/shakg/g-systemctl/releases/latest/download/g-systemctl.rb
brew install ./g-systemctl.rb

From source (CMake 3.14+, C++17 compiler):

git clone https://github.com/shakg/g-systemctl.git
cd g-systemctl && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(nproc)
sudo make install

Usage

g-systemctl              # Containers tab, or Services if no container runtime is available
g-systemctl -s           # Services tab
g-systemctl -c           # Containers tab
g-systemctl --user       # User services
g-systemctl -f nginx     # Start with a filter

Starting and stopping services needs root; run with sudo or enter the password when asked.

Updates

Release builds check GitHub for a new version once a day and ask before installing it (y update, n not now, s skip this version, d stop checking). g-systemctl --update updates from the terminal. Tarball installs are replaced in place (checksum-verified, sudo if the directory is not writable); .deb installs go through dpkg -i; Homebrew installs are left to Homebrew.

Turn checks off with GSYSTEMCTL_NO_UPDATE=1, --no-update-check (one run), or check=off in ~/.config/g-systemctl/update.

Key Action
Type Filter
Up / Down Move
Enter / Esc Open / back
Alt+s / Alt+Shift+s Sort by the next column / reverse (or click a column header)
Alt+o / Alt+x / Alt+r Start / stop / restart (stop and restart ask y/n)
Alt+t Shell in the selected container (bash, else sh)
Alt+1 / Alt+2 Containers / Services tab
? All shortcuts
Alt+q Quit

Podman

g-systemctl uses docker when its daemon is reachable, otherwise podman. A docker command that is really Podman (podman-docker) is treated as Podman. To choose:

GSYSTEMCTL_RUNTIME=podman g-systemctl    # docker | podman | auto (default)
GSYSTEMCTL_DOCKER=/opt/bin/podman g-systemctl   # CLI binary
GSYSTEMCTL_COMPOSE=podman-compose g-systemctl   # compose command
  • Compose uses podman compose, then podman-compose. With podman-compose, changed compose files are not flagged: it cannot print config hashes. podman compose with the docker-compose provider can.
  • Pods' infra containers are hidden.
  • Rootless and sudo Podman keep separate containers. Run g-systemctl the same way you run podman.
  • macOS: start the VM first with podman machine start.
  • Podman 4.x: podman update applies new limits, but inspect keeps showing the old ones, and it has no --restart.

Tested in CI against Podman 4.9 (Ubuntu 24.04), rootless and rootful, with both compose commands.

Contributing

See CONTRIBUTING.md.

License

MIT

探索相关项目

加载中…