Learn Understand first, then practice while the concept is still fresh.

M47 - Services Management

Inspect, start, stop, restart, and enable services on Windows and Linux while using logs and status output to verify the result.

SysAdmin

Services Management

Inspect, start, stop, restart, and enable services on Windows and Linux while using logs and status output to verify the result.

35 min INTERMEDIATE BOTH Curriculum-reviewed
What you should be able to do after this
  • Inspect, start, stop, restart, and enable services on Windows and Linux while using logs and status output to verify the result.

Services Are Meant to Outlive Your Session

You already learned about ordinary processes. Services are different because the operating system is expected to manage them over time.

Typical service responsibilities include:

  • start at boot
  • keep running without an interactive session
  • restart or report failure when something goes wrong

That is why service management sits close to logging and startup behavior.


1. Windows: Services and PowerShell

Windows exposes service state through both a GUI and PowerShell.

services.msc is helpful when you are learning names, startup types, and dependencies.

Inspect and manage services with PowerShell

Get-Service -Name wuauserv Restart-Service -Name wuauserv Set-Service -Name wuauserv -StartupType Manual

Use startup-type changes carefully. A service may look unnecessary until you understand what depends on it.

Linux commonly uses systemctl for the same core work.


2. Linux: Systemctl and Systemd

On modern Linux systems, systemctl is the main entry point for service management.

Common systemctl commands

systemctl status ssh sudo systemctl restart ssh sudo systemctl reload ssh sudo systemctl enable ssh sudo systemctl disable ssh

Important distinctions:

  • start: launch a stopped service
  • stop: stop a running service
  • restart: stop and start again
  • reload: ask the service to reread config without a full restart, if supported
  • enable: start on boot
  • disable: do not start on boot

reload is often safer than restart when you only changed configuration and the service supports a clean reload path.


3. Verify the Result Instead of Assuming

After changing a service, do not stop at the command itself.

Check whether it actually worked:

Verify service state

Get-Service -Name wuauserv

Verify state and logs

systemctl status ssh sudo journalctl -u ssh -n 20

That habit matters because a restart command can succeed while the service itself still fails moments later due to configuration or dependency problems.


4. Configuration Still Matters

Service managers control lifecycle, but the service behavior still comes from configuration.

On Linux, if you change a unit file itself, you usually need:

Reload systemd metadata after unit-file changes

sudo systemctl daemon-reload

Then you can restart the service if needed.

Windows service configuration is usually edited through supported tools rather than by manually changing low-level registry data.

Inspect Before Disable

Disabling services can change boot behavior, security tooling, networking, printing, updates, or authentication. Before disabling a service, understand what it does, what depends on it, and whether the change is reversible in your current environment.


What You Just Learned

  • Services are long-lived system-managed processes.
  • Get-Service, Restart-Service, and Set-Service are practical Windows service tools.
  • systemctl is the core Linux service-management tool.
  • reload and restart are not the same operation.
  • Status output and logs are part of service management, not an optional afterthought.
  • Startup behavior should be changed carefully, especially on systems you did not build yourself.

Next, you will study how services fit into the broader boot and startup sequence.