linux:sistemaoperativo:systemd
Systemd
Servicios
opciones disponibles para un servicio (apache2)
systemctl stop apache2 systemctl start apache2 systemctl restart apache2 systemctl reload apache2 systemctl reload-or-restart apache2 systemctl status apache2 systemctl is-active apache2 systemctl is-enabled apache2 systemctl is-failed apache2 systemctl cat apache2.service systemctl list-dependencies apache2.service systemctl enable apache2 systemctl disable apache2
editar servicios
systemctl edit apache2.service systemctl edit --full apache2.service
Generales
estado del sistema
systemctl is-system-running systemctl status systemctl list-units --failed
opciones generales de systemd
systemctl list-units systemctl list-units --failed systemctl list-units --all systemctl list-units --all --state=inactive systemctl list-units --all --state=active systemctl list-units --type=service
ver servicios configurados al arrancar
systemctl list-unit-files
opciones generales del sistema
systemctl halt systemctl poweroff systemctl reboot
ver dns del sistema
systemd-resolve --status
resetear conexiones de audio/mic (para auriculares)
systemctl --user restart pulseaudio.service
Logs
logs
journalctl journalctl -b # desde el ultimo boot journalctl -k # kernel - dmesg journalctl -p err -b # errores desde el ultimo boot journalctl -n 20 # ultimas 20 lineas journalctl -x # agrega textos explicativos journalctl -e # al final del less journalctl --since yesterday journalctl --since "2015-01-10" --until "2015-01-11 03:00" journalctl -u apache2.service journalctl -u apache2.service -u mysql.service journalctl _UID=33 journalctl --no-pager # tira a consola sin el less
masked
'mask' is a state of unit files which is considered as the “third level of off” (stop-1st, disable-2nd, mask-3rd). The services labeled as masked can neither be started manually (using the start command) nor by systems (at system boot). Therefore, use caution when employing the systemctl mask command on a service.
linux/sistemaoperativo/systemd.txt · Última modificación: 2021/07/21 09:38 por grillo