The linux-lockfiles service

The /var/lock directory on various Linux operating systems is considered outmoded. It has two uses:

The linux-lockfiles service (which is only built and packaged on Linux operating systems, of course) is currently preset to "enabled" and its preset is packaged as one of a handful of "boot essential" services. This service creates /run/lock at bootstrap, which is where Linux operating systems nowadays point /var/lock to with a symbolic link.

In theory, you should also create an /etc/fstab entry for mounting a memory filesystem on top of /run/lock (which the /etc/fstab import subsytem will convert into a mount@-run-lock service bundle, which in turn the linux-lockfiles service bundle orders itself before). This is because in theory unprivileged users can otherwise attack /run (which they cannot write to) by filling up/run/lock which (alas, for Debian Linux compatibility) they can write to.

In practice, this is just papering over the cracks, and the better approaches are: