systemd file locations:
ls /etc/systemd/system
# stuff in here overrides stuff in other places
ls /lib/systemd/system
# system-provided systemd stuff; do not edit
systemd targets:
systemctl get-default
OR
ls -l /etc/systemd/system/default.target
systemctl set-default
systemctl isolate
# ex.: after installing XFCE, isolate the graphical.target to switch into it without rebooting
poweroff.target
rescue.target
multi-user.target
graphical.target
reboot.target
systemd timers:
man systemd.time # for time syntax
vi /etc/systemd/system/test.timer
systemctl daemon-reload
systemctl start test.timer
systemd automounts:
vi /etc/systemd/system/.automount # filename in path must use dashes instead of slashes
[Unit]
Description=systemd unit to automount stuff
[Automount]
Where=
[Install]
WantedBy=multi-user.target
vi /etc/systemd/system/.mount
[Unit]
Description=other part of automount scripts??
[Mount]
What=:
Where=
Type=nfs # or whatever
[Install]
WantedBy=multi-user.target
to activate automounts:
systemctl enable --now .automount
to reload automounts without a reboot:
systemctl stop the automount
umount -l the mountpoint
systemctl daemon-reload
systemctl start the automount
ls
:)
!! remember to systemctl --enable the thing, if you want it to come up on boot!!