Skip to main content
rule official · GitHub

centos-linux — GitHub Copilot rule: what it does, how to install

This rule guides CentOS administration, package work, systemd, firewalld, and SELinux. Use it when Copilot writes commands, scripts, or docs for CentOS.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/instructions/centos-linux.instructions.md
Open on GitHub

What centos-linux does

The rule applies to every file through applyTo: "**" and sets guidance for CentOS work. It asks Copilot to identify the system version first, separating CentOS Stream and 8+ from CentOS 7. Use dnf for Stream/8+ and yum for CentOS 7, with RHEL-compatible terms and paths.

For package tasks, it calls for GPG checks on repositories, package inspection with dnf info, yum info, and dnf repoquery, plus dnf versionlock or yum versionlock when version stability matters. EPEL changes should explain how to enable or disable the repository safely. Service configuration uses /etc/sysconfig/, systemd drop-ins, and systemctl.

Security guidance keeps SELinux in enforcing mode when possible and uses semanage, restorecon, and setsebool for policy changes. Denials are checked in /var/log/audit/audit.log. Identify the CentOS version before choosing dnf or yum, because the wrong manager can produce unusable commands. Outputs should include copy-ready commands, post-change verification, and rollback steps for risky operations.

What it helps with

  • choose the package manager for a CentOS version
  • inspect repositories and lock a package version
  • configure a service with systemd and /etc/sysconfig/
  • trace an SELinux denial through /var/log/audit/audit.log
  • add verification and rollback after a system change

Example prompts for the agent

  • Write CentOS Stream package-install instructions with repository checks and rollback steps.
  • Configure this service with a systemd drop-in and /etc/sysconfig/, then add verification commands.
  • Analyze this SELinux denial from /var/log/audit/audit.log and suggest changes with semanage.

How to install centos-linux

Manually: put the files in place

.github/instructions/centos-linux.instructions.md

The applyTo field sets which files it applies to

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about centos-linux

How do I install centos-linux in GitHub Copilot?

Add the rule at .github/instructions/centos-linux.instructions.md.

What does the centos-linux rule do?

It guides CentOS administration, including dnf and yum selection, systemd and firewalld configuration, SELinux policy work, and verification with rollback steps.

Which CentOS versions does centos-linux cover?

It distinguishes CentOS Stream and 8+, which use dnf, from CentOS 7, which uses yum. The system version should be identified before commands are written.

Source text

centos-linux.instructions.md · MIT
---
description: 'Guidance for CentOS administration, RHEL-compatible tooling, and SELinux-aware operations.'
applyTo: '**'
---

# CentOS Administration Guidelines

Use these instructions when producing guidance, scripts, or documentation for CentOS environments.

## Platform Alignment

- Identify CentOS version (Stream vs. legacy) and tailor commands.
- Prefer `dnf` for Stream/8+ and `yum` for CentOS 7.
- Use RHEL-compatible terminology and paths.

## Package Management

- Verify repositories with GPG checks enabled.
- Use `dnf info`/`yum info` and `dnf repoquery` for package details.
- Use `dnf versionlock` or `yum versionlock` for stability where needed.
- Call out EPEL dependencies and how to enable/disable them safely.

## Configuration & Services

- Place service environment files in `/etc/sysconfig/` when required.
- Use systemd drop-ins for overrides and `systemctl` for control.
- Prefer `firewalld` (`firewall-cmd`) unless explicitly using `iptables`/`nftables`.

## Security

- Keep SELinux in enforcing mode whenever possible.
- Use `semanage`, `restorecon`, and `setsebool` for policy adjustments.
- Reference `/var/log/audit/audit.log` for denials.

## Deliverables

- Provide commands in copy-paste-ready blocks.
- Include verification steps after changes.
- Offer rollback steps for risky operations.

© github · MIT · github/awesome-copilot

Similar IDE rules

All IDE rules for DevOps and infrastructure →

From the same set732

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor