Skip to content

Instantly share code, notes, and snippets.

@attilaolah
Created October 1, 2022 11:31
Show Gist options
  • Save attilaolah/8ac249219ed1c9debe21888d9c0b4d8f to your computer and use it in GitHub Desktop.
Save attilaolah/8ac249219ed1c9debe21888d9c0b4d8f to your computer and use it in GitHub Desktop.
Systemd service for creating in-memory cache directory on login

Create the file under ~/.config/systemd/user/, then enable the service with systemctl --user enable cache.service.

[Unit]
Description=Create in-memory cache directory
[Service]
ExecStart=mkdir /dev/shm/%u-cache
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment