Today I Learned
Today I Learned
  • TIL
  • Ansible
    • Add Authorized SSH Key to User using Ansible
    • Add User to System using Ansible
    • Ansible Configure Default Inventory File
    • Ansible Disable Python Interpreter Warnings
    • Ansible Pause Playbook Execution
    • Ansible Test Connection
    • Run Ansible Playbook Locally
    • Setting a Password in Ansible Inventory File
  • Caddy
    • Caddy Write Logs to a File
    • Return Client IP Address As Plain Text
  • Cheatsheet(s)
    • Bash Cheatsheet
    • Dnf Cheatsheet
    • Grep Cheatsheet
    • Markdown Cheatsheet
    • MongoDB Cheatsheet
    • Networking Cheatsheet
    • Python Cheatsheet
    • ReactJS Cheatsheet
    • Regex Cheatsheet
  • Docker
    • Docker Build Multiple Tags At Once
    • Docker Exec (docker exec)
    • Docker Publish Port
    • Docker Run Without Cache
    • Docker Run (docker run)
    • Docker Fix UFW Security Flaw
    • Install Docker
    • Install Ping in Docker
    • Pass Build Time Arguments To Docker Build
    • Remove Container When It Exists
    • Remove Unused Data
    • Run Docker without Root
    • Setup Docker Buildx For Multi Arch builds
  • Git
    • Change Last Commit Message
    • Delete Tag
    • Get Tag Names in Git
    • Save Credentials for Remotes in Git
    • Show Commit Only From One Author
    • View Git Commit Changes
  • GitHub
    • GitHub Actions
      • Running Jobs in a Container
      • Setting An Environment Variable
  • Go
    • Convert String To Uppercase in Go
    • List All Possible GOOS And GOARCH In Go
    • Print Go Version
    • Resolve Hostname To IP Address
    • Trim Whitespaces From String
    • Update Project Libraries To Latest
  • Learning Resource(s)
    • Algorithms
    • DevOps
    • Git
    • Linux
    • Networking
    • Programming Languages
  • Linux
    • Add Swap Space To System
    • Add User To System
    • Beautify Logs
    • Benchmark System
    • Ccze Scrolling Output
    • Change Default Shell
    • Change Hostname Of A System
    • Changing User Password In Shell Script
    • Check Group Of A User
    • Check If A Package Is Installed Or Not
    • Check If A Port Is In Use
    • Check If A User Exists
    • Check Open Port
    • CMake Parallel Build with All Cores
    • Create Symbolic Links
    • Determine Which Process Is Using a File
    • Enable SSH Server
    • Fix Permission For Newly Created Partitions
    • Fix Windows And Linux Different Time Issue
    • Get Arch Of System
    • Increase Limit of Inotify Watchers
    • Install Latest NodeJS In Linux
    • Install Pavucontrol
    • Install Postman
    • Kill A Process In Linux
    • Mount Partition On System Startup
    • OpenVPN Server
    • Ping over TCP
    • Pipe Password to Sudo
    • Remove PPA From System
    • Remove User Password
    • Root Check
    • Run Go Binaries Without Installing Go
    • Set Different Time Zone
    • Show Disk Usage By Directories
    • Show Public IP
    • Show Size of Current Directory
    • System Upgrade
    • Tar Exclude Directories
    • Tar Retain File Permissions
    • Alpine Linux
      • Adding User On Alpine
      • Changing Timezone On Alpine
      • Installing Ansible On Alpine
      • Install Dig On Alpine
      • Installing Pip On Alpine
      • Installing Python2 On Alpine
    • Apt
      • apt-fix-broken-packages
      • APT Hold Package(s) From Upgrades
    • Arch Linux
      • Install Docker Compose
      • Install Docker
      • Install Pip
    • BASH
      • Bash List Only Directories
      • BashTOP Resource Monitor
      • Case Statements
      • Concatenate Strings
      • Custom Shell Prompt
      • Length of String in Variable
      • Pass Arguments while Piping
      • Read Command Output In Reverse Order
      • "set -e" In Scripts
      • Set MacOS Like Terminal Font
      • Set Unlimited Bash History
      • shell-formatter
      • Test Regular Expression Against A String
      • Yes
    • Curl
      • Fix Failed Writing Body While Piping
      • Use Proxy Server in cURL
    • Fedora Linux
      • Install RPM Packages in Fedora
    • GPG
      • Fix "Inappropriate ioctl for device" Error
      • GPG Import Keys
      • GPG Test
      • GPG Trust Key
      • GPG Verify Signature
    • Grep
      • Grep Case Insensitive Search
      • Grep Count Matches
      • Grep Exact Match
      • Grep Invert Search
      • Grep On Continous Stream
      • Grep Quiet Mode
      • Grep Search For Multiple Strings
      • Remove Empty Lines
    • Journalctl
      • Get Errors in Running Services using Journalctl
    • Networking
      • Install Dig
      • Install MTR
      • Set Metric For A Network Using nmcli
      • WireGuard Server
    • Raspberry Pi
      • Disable Swap Memory on SD Card
    • SSH
      • Reconnect To a Disconnected SSH Session
      • Run A Local Script On Remote SSH Server
      • Screen
      • Tmux
    • Systemd
      • Create A Service
      • Create A Systemd Timer
      • List Systemd Services Of A User
      • Prevent Systemd Timers from Overlapping
      • Watch Systemd Service Status
    • Tcpdump
      • Capture ICMP Packets
      • Capture Traffic By An IP Address Or A Network
    • Ubuntu
      • Get Clipboard History
      • Install HMAC256 On Ubuntu
      • Obtaining a List of Ubuntu Repository Mirror Servers
    • Wget
      • Basic Auth
  • Miscellaneous
    • Good Reads
    • Must Read Sites
    • Useful Sites
  • Python
    • Add An Item To Dictionary
    • Check If A Key Exists In Dictionary
    • Check If a String is Empty
    • Check Image Size
    • Check Python Version Programmatically
    • Convert List To Tuple
    • Execute Python Code In Command Shell
    • Formatted Strings
    • Get IP Address From Hostname
    • Limit Floating Point To Two Decimal Places
    • Measure Latency Using TCP
    • pass-list-as-argument-to-a-function
    • Print Tabular Data
    • Python Padding Strings
    • Read A File Line By Line
    • Remove A File
    • Remove Trailing Spaces And New Lines From A String
    • Run Python Script in Background
    • Split String with Delimiter
    • Validate IP Address
    • Pipenv
      • Install Dependencies System Wide
      • Remove Virtualenv (Virtual Environment)
  • Rclone
    • Limit Upload Download Speeds in Rclone
  • ReactJS
    • ReactJS Resources
  • Vagrant
    • Increase RAM And CPU On Vagrant Machine
    • Vagrant Specify Disk Size
  • VS Code
    • Install VS Code on a Linux Server
  • WSL
    • Convert WSL1 to WSL2
    • Enable Systemd Support in WSL2 (Obsolete)
Powered by GitBook
On this page
  • Usage
  • Example
  1. Linux
  2. Systemd

List Systemd Services Of A User

To list the systemd services of a user, we can use the following command -

Usage

systemctl --user --machine=<username>@ list-units --type=service

Example

jungle@LinuxMint-DellG15:~$ systemctl --user --machine=jungle@ list-units --type=service
  UNIT                                  LOAD   ACTIVE SUB     DESCRIPTION
  appimagelauncherd.service             loaded active running AppImageLauncher daemon
  dbus.service                          loaded active running D-Bus User Message Bus
  dconf.service                         loaded active running User preferences database
● distribyted.service                   loaded failed failed  Mount Distribyted HTTPS Server
  evolution-addressbook-factory.service loaded active running Evolution address book service
  evolution-calendar-factory.service    loaded active running Evolution calendar service
  evolution-source-registry.service     loaded active running Evolution source registry
  filter-chain.service                  loaded active running PipeWire filter chain daemon
  flatpak-portal.service                loaded active running flatpak portal
  flatpak-session-helper.service        loaded active running flatpak session helper
  gnome-keyring-daemon.service          loaded active running GNOME Keyring daemon
  gnome-terminal-server.service         loaded active running GNOME Terminal Server
  gvfs-afc-volume-monitor.service       loaded active running Virtual filesystem service - Apple File Conduit monitor
  gvfs-daemon.service                   loaded active running Virtual filesystem service
  gvfs-goa-volume-monitor.service       loaded active running Virtual filesystem service - GNOME Online Accounts monitor
  gvfs-gphoto2-volume-monitor.service   loaded active running Virtual filesystem service - digital camera monitor
  gvfs-metadata.service                 loaded active running Virtual filesystem metadata service
  gvfs-mtp-volume-monitor.service       loaded active running Virtual filesystem service - Media Transfer Protocol monitor
  gvfs-udisks2-volume-monitor.service   loaded active running Virtual filesystem service - disk device monitor
  obex.service                          loaded active running Bluetooth OBEX service
  pipewire-pulse.service                loaded active running PipeWire PulseAudio
  pipewire.service                      loaded active running PipeWire Multimedia Service
● restic-backup.service                 loaded failed failed  Restic Backup Script.
  speech-dispatcher.service             loaded active running Common interface to speech synthesizers
  telnyx-s3-mount.service               loaded active running Mount Telnyx S3 Bucket
  trakt-scrobbler.service               loaded active running Trakt Scrobbler Service
  wireplumber.service                   loaded active running Multimedia Service Session Manager
  xdg-desktop-portal-gtk.service        loaded active running Portal service (GTK/GNOME implementation)
  xdg-desktop-portal-xapp.service       loaded active running Portal service (XApp implementation)
  xdg-desktop-portal.service            loaded active running Portal service
  xdg-document-portal.service           loaded active running flatpak document portal service
  xdg-permission-store.service          loaded active running sandboxed app permission store

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

32 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
PreviousCreate A Systemd TimerNextPrevent Systemd Timers from Overlapping

Last updated 5 months ago

Source:

Ask Ubuntu