Listing systemd targets makes it easier to see which high-level system states and synchronization points are available on a host before changing boot defaults, wiring new unit dependencies, or troubleshooting why a service starts later than expected.

In systemd, target units are the .target files that group other units and define ordering milestones during boot and shutdown. The systemctl list-units –type=target view asks the running manager which targets are currently loaded in memory, while systemctl list-unit-files –type=target reads the installed target unit files and shows states such as static, alias, or disabled.

These two views answer different questions, and some standard targets are only pulled in when something requires them. A host may boot normally without ever loading network-online.target, for example, even though the target file exists on disk, and default.target in the system instance is usually an alias to multi-user.target or graphical.target rather than a standalone target unit. Per-user sessions have a separate manager under systemctl --user and their own target set.

Steps to list systemd targets:

  1. Open a terminal session on the Linux host that uses systemd.

    These listing commands are read-only and normally do not require sudo.

  2. List the target units that the running manager currently has loaded in memory.
    $ systemctl list-units --type=target --no-pager
      UNIT                LOAD   ACTIVE SUB    DESCRIPTION
      basic.target        loaded active active Basic System
      graphical.target    loaded active active Graphical Interface
      local-fs-pre.target loaded active active Preparation for Local File Systems
      local-fs.target     loaded active active Local File Systems
      multi-user.target   loaded active active Multi-User System
      paths.target        loaded active active Path Units
      slices.target       loaded active active Slice Units
      sockets.target      loaded active active Socket Units
      swap.target         loaded active active Swaps
      sysinit.target      loaded active active System Initialization
      timers.target       loaded active active Timer Units
    
    11 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.

    Upstream systemctl documents list-units as the in-memory view, so this output does not include every target unit file installed on disk.

  3. Add --all when the target list should include loaded targets that are currently inactive.
    $ systemctl list-units --type=target --all --no-pager
      UNIT                      LOAD   ACTIVE   SUB    DESCRIPTION
      basic.target              loaded active   active Basic System
      blockdev@dev-vda1.target  loaded inactive dead   Block Device Preparation for /dev/vda1
      cryptsetup-pre.target     loaded inactive dead   Local Encrypted Volumes (Pre)
      cryptsetup.target         loaded inactive dead   Local Encrypted Volumes
      emergency.target          loaded inactive dead   Emergency Mode
      final.target              loaded inactive dead   Late Shutdown Services
      graphical.target          loaded active   active Graphical Interface
      ##### snipped #####
      rescue.target             loaded inactive dead   Rescue Mode
      slices.target             loaded active   active Slice Units
      sockets.target            loaded active   active Socket Units
      swap.target               loaded active   active Swaps
      sysinit.target            loaded active   active System Initialization
      time-set.target           loaded inactive dead   System Time Set
      timers.target             loaded active   active Timer Units
    
    32 loaded units listed.
    To show all installed unit files use 'systemctl list-unit-files'.

    --all expands the loaded set, but it still does not replace list-unit-files. Targets that were never loaded into the current boot session remain absent from this view.

  4. List the installed target unit files when the goal is to see the full target inventory together with unit-file state.
    $ systemctl list-unit-files --type=target --no-pager
    UNIT FILE                     STATE    PRESET
    basic.target                  static   -
    blockdev@.target              static   -
    bluetooth.target              static   -
    boot-complete.target          static   -
    cryptsetup-pre.target         static   -
    cryptsetup.target             static   -
    ctrl-alt-del.target           alias    -
    default.target                alias    -
    emergency.target              static   -
    ##### snipped #####
    graphical.target              static   -
    multi-user.target             static   -
    network-online.target         static   -
    network.target                static   -
    rescue.target                 static   -
    runlevel3.target              alias    -
    runlevel5.target              alias    -
    
    75 unit files listed.

    The STATE column shows whether the unit file is static, alias, disabled, or another install state, while PRESET shows the vendor preset policy. This broader view can include aliases such as default.target and template targets such as blockdev@.target even when they are not loaded right now.

  5. Filter the installed target list by pattern when only a subset of milestones matters.
    $ systemctl list-unit-files '*network*.target' --type=target --no-pager --no-legend
    network-online.target static -
    network-pre.target    static -
    network.target        static -

    Quote the glob so the shell passes it to systemctl unchanged. Upstream systemd.special distinguishes network.target as the general network-available milestone and network-online.target as the stronger wait-until-configured milestone that is usually pulled in only when a unit explicitly needs it.

  6. Query the common boot-related targets directly when verifying names before a default-target change.
    $ systemctl list-unit-files default.target graphical.target multi-user.target rescue.target --no-pager --no-legend
    default.target    alias  -
    graphical.target  static -
    multi-user.target static -
    rescue.target     static -

    In the system instance, default.target is usually an alias for multi-user.target or graphical.target rather than a standalone target unit.