Skip to content

systemctl: does not find some/most services #2829

@thojDufour

Description

@thojDufour

Current Behavior

The completer for systemctl command does not propose some or most .service files.
For example:

sudo systemctl status k                                                                                                                                                                                                                                                                     06/11/2025 08:11:31 AM
kexec.target                         Reboot via kexec
keyboxd@etc-pacman.d-gnupg.service   GnuPG public key management service for /etc/pacman.d/gnupg
keyboxd@etc-pacman.d-gnupg.socket    GnuPG public key management service for /etc/pacman.d/gnupg
kmod-static-nodes.service            Create List of Static Device Nodes

Despite:

sudo systemctl list-units --all | grep kea
 kea-dhcp4.service 

And:

sudo systemctl list-unit-files | grep kea
kea-ctrl-agent.service                       disabled        disabled
kea-dhcp-ddns.service                        disabled        disabled
kea-dhcp4.service                            enabled         disabled
kea-dhcp6.service                            disabled        disabled

Expected Behavior

Expected behavior:

sudo systemctl status k                                                                                                                                                                                                                                                                     06/11/2025 08:11:31 AM
kea-ctrl-agent.service               <description>
kea-dhcp-ddns.service                <description>
kea-dhcp4.service                    <description>
kea-dhcp6.service                    <description>
kexec.target                         Reboot via kexec
keyboxd@etc-pacman.d-gnupg.service   GnuPG public key management service for /etc/pacman.d/gnupg
keyboxd@etc-pacman.d-gnupg.socket    GnuPG public key management service for /etc/pacman.d/gnupg
kmod-static-nodes.service            Create List of Static Device Nodes

Steps To Reproduce

                  -`                     
                 .o+`                    --------------------
                `ooo/                    OS: Arch Linux x86_64
               `+oooo:                   Kernel: Linux 6.15.1-arch1-2
              `+oooooo:                  Uptime: 2 hours, 14 mins
              -+oooooo+:                 Packages: 1351 (pacman)
            `/:-:++oooo+:                Shell: nushell 0.105.1
           `/++++/+++++++:               Display (U34G3XM): 3440x1440 @ 144 Hz in 34" [External] *
          `/++++++++++++++:              Display (P27h-20): 2560x1440 @ 60 Hz in 28" [External]
         `/+++ooooooooooooo/`            DE: KDE Plasma 6.3.5
        ./ooosssso++osssssso+`           WM: KWin (Wayland)
       .oossssso-````/ossssss+`          WM Theme: Breeze
      -osssssso.      :ssssssso.         Theme: Breeze (Dark) [Qt], Breeze-Dark [GTK2], Breeze [GTK3]
     :osssssss/        osssso+++.        Icons: breeze-dark [Qt], breeze-dark [GTK2/3/4]
    /ossssssss/        +ssssooo/-        Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2/3/4]
  `/ossssso+/:-        -:/+osssso+-      Cursor: breeze (24px)
 `+sso+:-`                 `.-/+oso:     Terminal: konsole 25.4.2
`++:.                           `-/+/    CPU: AMD Ryzen 9 7900X (24) @ 5.74 GHz
.`                                 `/    GPU: AMD Raphael [Integrated]
                                         Memory: 9.36 GiB / 61.94 GiB (15%)
                                         Swap: 0 B / 4.00 GiB (0%)
                                         Disk (/): 25.52 GiB / 71.80 GiB (36%) - ext4
                                         Disk (/home): 1.36 TiB / 3.44 TiB (40%) - ext4
                                         Local IP (eno1): 192.168.178.68/24
                                         Locale: en_US.UTF-8

                                                                 
                                                                 

Version

1.3.2

OS

  • Darwin
  • Linux
  • Termux
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

It might help to use systemctl list-unit-files instead of systemctl list-units --all.

Edit:
systemctl list-unit-files --type=service might be even more suited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfundFundable with polar.shlinuxnushell

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions