Linux · Ferramentas do Sistema
systemd
systemd is a system and service manager that replaces Windows Task Scheduler by controlling boot, services, and scheduled tasks on Linux.
- Licença
- GPL-3.0
- Versão mais recente
- 262.2
O que é o systemd?
systemd was introduced in 2010 as part of the Linux kernel to unify init, service management, and system configuration. It has become the default init system on most major distributions, including Arch, Debian, Fedora, openSUSE, and Ubuntu, and is maintained by a large community of developers.
It targets system administrators and power users who need fine‑grained control over services, dependencies, and timing. The learning curve is steeper than Windows Task Scheduler, but once mastered it offers deterministic startup and efficient resource usage.
Compared to Windows tools, systemd feels more low‑level and declarative. It uses unit files written in plain text, and its command‑line tools (systemctl, journalctl) replace graphical schedulers and logs.
Ideal para: Power users and system administrators who need a unified, efficient service manager with advanced scheduling.
Principais recursos do systemd
- Declarative unit files for services, sockets, timers
- Parallel startup of services
- On‑demand activation via sockets
- Integrated logging with journalctl
- Cgroup‑based resource isolation
- Dynamic dependency handling
- Support for timers as cron alternatives
Prós
- Fast boot times through parallelism
- Unified service and logging management
- Strong dependency control
- Extensive documentation and community support
Contras
- Steep learning curve for beginners
- Requires editing plain text unit files
- Can be overkill for simple tasks
- Limited native GUI tools
Programas do Windows que o systemd substitui
Como instalar o systemd no Linux
sudo apt install systemdsudo apt install systemdsudo dnf install systemdsudo pacman -S lib32-systemdsudo zypper install systemdDicas para quem vem do Windows
When moving from Windows Task Scheduler, replace scheduled tasks with systemd timers. Create a unit file like
[Unit] Description=My task
[Timer] OnCalendar=*-*-* 02:00:00 Persistent=true
[Service] ExecStart=/usr/bin/mycommand
Place the files in /etc/systemd/system/ and enable with systemctl enable mytask.timer. Use systemctl list-timers to view schedules. File formats are plain text, not XML or JSON. Shortcuts are command‑line; use systemctl status, start, stop, restart. Workflow changes: no GUI, but journalctl provides logs.
systemd: perguntas frequentes
How do I enable a timer in systemd?
Place the timer and service unit files in /etc/systemd/system/, then run systemctl enable mytimer.timer and systemctl start mytimer.timer.
Can I use cron with systemd?
systemd timers can replace cron; however, cron is still available and can coexist if needed.
Is systemd safe for servers?
Yes, it is widely used in production servers; it provides isolation via cgroups and robust dependency handling.
How do I view logs for a service?
Use journalctl -u servicename.service to view logs for that unit.
Atualizado em