AI Crawler · Collection Records

Bot summary · Last 24 hours

portablectl — portable service management

Registers, applies, and removes systemd portable service images. Makes services movable like OCI images.
Markdown source·Anything to add or correct?

💬 "portablectl Command"

portablectl registers, applies, and removes systemd Portable Service images. It makes services portable like OCI images.

It packages service binaries and dependencies into a single image. Services can be run without installation on the host.

  • Concept: Packages service binaries and dependencies into a single image.
  • Key Features: Services can be run without installation on the host.
  • Advantages: Supports AppImage, directory, and OCI container formats.
  • Usage: Separates the host and service systemd environments.

Installation and Download

portablectl is installed via a package manager or an official script.

EnvironmentCommand
systemd built-in (239+)portablectl --version
Activationsudo systemctl enable --now systemd-portabled
Image CreationBuild with mkosi or ostree
Verificationportablectl list

Verify the installation with portablectl --version.

Common Options

OptionDescription
portablectl attach <image>Register a portable service image
portablectl detach <image>Remove an image
portablectl listList registered images
portablectl inspect <image>Inspect the internal structure of an image
portablectl remove <image>Delete the image file

3 Essential Command Combinations

  • portablectl attach myapp.raw — Register a service image
  • systemctl enable --now myapp.service — Start the portable service
  • portablectl detach myapp.raw — Complete removal

💬 "Show me an example of using portablectl on a real server"

Here is a step-by-step guide for situations commonly encountered on real operational servers.

Step 1 · Installation Check

Check the status of systemd-portabled.


portablectl --version && systemctl status systemd-portabled

Step 2 · Image Inspection

Inspect the internal structure of the image.


portablectl inspect /var/lib/portable/myapp.raw

Step 3 · Registration

Register and start the image.


sudo portablectl attach /var/lib/portable/myapp.raw

Actual Execution Screen

Result of registering a service image using portablectl.

!portablectl command execution result

Real operational server

How It's Used in Practice

1. Registering a Service Image

Situation — Register a built image.


sudo portablectl attach /var/lib/portable/myapp.raw

Result — The image is extracted to /var/lib/portables/.

Point — Does not modify host settings.

2. Starting the Service

Situation — Start the portable service.


systemctl enable --now myapp.service

Result — A symlink is created in systemd.

Point — The portable service is also managed by the host systemd.

Actual Execution Screen

Result of starting and removing a portable service.

!portablectl command execution result 2

Real operational server

Points to Note

  • Portable services require systemd 239 or later. They do not function on older versions.
  • Images must be built with mkosi or ostree. Directories created simply with tar are not recognized.
  • Portable services also use the host kernel. Kernel module dependencies are not included in the image.

Source (HTML): https://games.aidebatehub.com/programs/linux/services/portablectl.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:59+09:00