Chapter 9 Daemons Flashcards

(16 cards)

1
Q

What command shows you the status of the service?

A

systemctl status ssh.service

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

What are daemons in the context of Linux?

A

Processes that belong to the system or a service, start at bootup, and run in the background

Daemons affect all users and typically end with the letter ‘d’, as in systemd.

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

What is the first process upon bootup in Linux?

A

systemd

Systemd has a PID of 1 and manages various types of units.

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

Name the three types of units managed by systemd.

A
  • Services
  • Sockets
  • Paths

Services function as web servers, sockets handle communication, and paths relate to files.

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

What command is used to control systemd?

A

systemctl

This command allows users to manage services sockets and paths

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

How do you show only active services using systemctl?

A

$systemctl list-units –type=service

This command filters the output to display only active services.

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

What command checks if a service is active?

A

$systemctl is-active sshd.service

This command returns the active status of the specified service.

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

To start a stopped service, which command would you use?

A

$sudo systemctl start sshd.service

This command initiates the specified service.

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

What command stops an active service?

A

$sudo systemctl stop sshd.service

This command halts the specified service.

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

If you make configuration changes to a service, what command do you use to restart it?

A

$sudo systemctl restart sshd.service

Restarting the service loads the new configuration into memory.

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

What command is used to reload a service without changing its PID?

A

$sudo systemctl reload sshd.service

This command allows the service to load new information without a full restart.

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

How can you view the dependencies for a service?

A

$sudo systemctl list-dependencies sshd.service

This command shows the files required for the service to run.

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

What does masking a service do?

A

Prevents a service from accidentally being started

Use $sudo systemctl mask sshd.service to mask and $sudo systemctl unmask sshd.service to unmask.

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

To enable a service to start automatically at bootup, which command is used?

A

$sudo systemctl enable sshd.service

This command sets the service to launch automatically upon system startup. can do same thing for disabling.

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

Fill in the blank: In Linux, just because an application is installed doesn’t mean it is _______.

A

running

You must start and enable the service for it to be available for use.

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