systemd-inhibit: a built-in Linux alternative to macOS's "caffeinate" command

1 · Evan Hahn · Jan. 22, 2024, midnight
In short: try systemd-inhibit if you’re looking for an alternative to macOS’s caffeinate. macOS’s caffeinate command prevents your computer from going to sleep, which can be useful. It’s been ported to Linux…but if you’re like me, you don’t like installing unnecessary software. Good news: there’s a similar command already installed if you’re on a system that uses systemd: systemd-inhibit. This command is roughly equivalent to caffeinate make: systemd-inhibit make This will prevent your system fr...