Service Control Flashcards

(18 cards)

1
Q

What is the purpose of service control?

A

Manage and monitor background services; start, stop, restart, or reload services using systemctl; check service state for troubleshooting and performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does systemctl status do?

A

Displays current state and service details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the syntax for checking service status?

A

systemctl status <service-name></service-name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give an example of checking cron service status.

A

systemctl status cron.service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What information does systemctl status output include?

A

Service description and loaded status; active state and uptime; main PID and memory usage; CGroup and process tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is systemctl status useful?

A

Used to identify running, inactive, or failed services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does systemctl start do?

A

Starts a service immediately; does not enable service at boot.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the syntax for starting a service?

A

sudo systemctl start <service-name></service-name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Give an example of starting Apache service.

A

sudo systemctl start apache2.service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to confirm a service started successfully?

A

Run systemctl status <service-name>.</service-name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does systemctl restart do?

A

Stops and starts a service in one command; used after configuration changes or to clear errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the syntax for restarting a service?

A

sudo systemctl restart <service-name></service-name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give an example of restarting UFW service.

A

sudo systemctl restart ufw.service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What output is shown when restarting a service?

A

No output if successful; status command confirms results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does systemctl reload do?

A

Reloads service configuration without stopping the service; works only if service supports dynamic reloads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the syntax for reloading a service?

A

sudo systemctl reload <service-name></service-name>

17
Q

Give an example of reloading Postfix service.

A

sudo systemctl reload postfix.service

18
Q

What happens if reload is unsupported?

A

Systemd returns an error; restart is an alternative for live updates.