# Services

## Description

* Linux services are applications or processes that run in the background either because they're actively doing something or waiting to do something.&#x20;
* An example service would be `OpenBSD Secure Shell server`, a service that allows one to connect to the system via SSH.

## Interacting with Services

* `systemctl` is the system manager tool which is responsible for managing services.
* `systemctl list-unit-files` - View all services available.

```shell-session
UNIT FILE                                  STATE           PRESET  
proc-sys-fs-binfmt_misc.automount          static          -       
-.mount                                    generated       -       
dev-hugepages.mount                        static          -       
dev-mqueue.mount                           static          -       
home.mount                                 generated       -       
proc-sys-fs-binfmt_misc.mount              disabled        disabled
run-vmblock\x2dfuse.mount                  enabled         enabled 
[SNIP]
```

* `systemctl status ssh` - Gets information on the status of ssh

```shell-session
○ ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: enabled)
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)
```

* `sudo systemctl start ssh` - Starts the ssh service
* `sudo systemctl stop ssh` - Stops the ssh service
* `sudo systemctl enable ssh` - Enables the ssh service to run on system boot
* `sudo systemctl disable ssh` - Disables the ssh service from running on system boot


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.techwithtyler.dev/operating-systems/linux/services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
