Skip to content

Linux systemd cgls Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux systemd-cgls Guide

Complete beginner-friendly guide to systemd-cgls on Linux, covering Arch Linux, CachyOS, and other distributions including control group listing, cgroup hierarchy, and system organization.


Table of Contents

  1. Understanding systemd-cgls
  2. systemd-cgls Basics
  3. Control Group Hierarchy
  4. Cgroup Information
  5. Troubleshooting

Understanding systemd-cgls

What is systemd-cgls?

systemd-cgls lists control groups.

Uses:

  • List cgroups: Show control groups
  • Hierarchy: View cgroup hierarchy
  • System organization: See system organization
  • Cgroup structure: View cgroup structure

Why it matters:

  • System understanding: Understand system structure
  • Cgroup management: Manage control groups
  • System organization: See system organization

systemd-cgls Basics

List All Cgroups

Basic usage:

# List all control groups
systemd-cgls

# Shows cgroup tree

Specific Path

Path cgroups:

# Specific path
systemd-cgls /system.slice

# Shows cgroups under path

Control Group Hierarchy

Tree Format

Hierarchical view:

# Tree format
systemd-cgls

# Shows cgroup hierarchy

All Slices

All slices:

# All system slices
systemd-cgls

# Shows:
# - system.slice
# - user.slice
# - machine.slice

Cgroup Information

With PIDs

Show processes:

# Show process IDs
systemd-cgls --all

# Shows PIDs in cgroups

Machine Format

Machine-readable:

# Machine format
systemd-cgls --machine

# JSON output

Troubleshooting

systemd-cgls Not Found

Check systemd:

# systemd-cgls is part of systemd
# Usually pre-installed on systemd systems

# Check systemd
systemctl --version

Summary

This guide covered systemd-cgls usage, control group listing, and system organization for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally