# Debian Linux Administration Guidelines

> Guidance for Debian-based Linux administration, apt workflows, and Debian policy conventions.

| Field | Value |
| --- | --- |
| Content type | [Code](https://dopamine-prompt.com/en/type/code) |
| Models | [GitHub Copilot](https://dopamine-prompt.com/en/model/github-copilot) |
| Industries | [Software Development](https://dopamine-prompt.com/en/industry/software-dev) |
| Tags | [GitHub Copilot](https://dopamine-prompt.com/en/tag/github-copilot) |
| License | [MIT](https://opensource.org/license/mit) (Copyright GitHub, Inc.) |
| Source | Submitted by [codebyleah](https://dopamine-prompt.com/en/u/2d8f03b0-27cd-4f38-b9d6-a7cef4330b10) |
| Last updated | 2026-11-26 |

## Prompt

```
# Debian Linux Administration Guidelines

Use these instructions when writing guidance, scripts, or documentation intended for Debian-based systems.

## Platform Alignment

- Favor Debian Stable defaults and long-term support expectations.
- Call out the Debian release (`bookworm`, `bullseye`, etc.) when relevant.
- Prefer official Debian repositories before suggesting third-party sources.

## Package Management

- Use `apt` for interactive commands and `apt-get` for scripts.
- Inspect packages with `apt-cache policy`, `apt show`, and `dpkg -l`.
- Use `apt-mark` to track manual vs. auto-installed packages.
- Document any apt pinning in `/etc/apt/preferences.d/` and explain why.

## Configuration & Services

- Store configuration under `/etc` and avoid modifying `/usr` files directly.
- Use systemd drop-ins in `/etc/systemd/system/<unit>.d/` for overrides.
- Prefer `systemctl` and `journalctl` for service control and logs.
- Use `ufw` or `nftables` for firewall guidance; state which is expected.

## Security

- Account for AppArmor profiles and mention adjustments if needed.
- Recommend least-privilege `sudo` use and minimal package installs.
- Include verification commands after security changes.

## Deliverables

- Provide commands in copy-paste-ready blocks.
- Include validation steps after changes.
- Offer rollback steps for destructive actions.
```

Web page: <https://dopamine-prompt.com/en/prompts/debian-linux-administration-guidelines>
