Skip to content

Q&A · Answered

How to manage services with systemd

asked 9 months, 1 week ago 2023 views 1 answer
47

I need to manage services like starting, stopping, and enabling at boot. How?

1 Answer

One accepted
10

Accepted answer

Not confirmed since it was written, 9 months, 1 week ago
# Start/stop service
sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl reload nginx

# Enable/disable at boot
sudo systemctl enable nginx
sudo systemctl disable nginx

# Check status
sudo systemctl status nginx

# List all services
sudo systemctl list-units --type=service

# Check logs
sudo journalctl -u nginx -f

Your answer

Say what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.

Shown beside your answer and never checked, so it cannot be a name someone already has here.

No account needed to answer. Sign in instead and it carries your name and earns reputation.