---
description: OSQuery Installation Guide for Red Hat, CentOS and Fedora Systems
---

# Red Hat, CentOS and Fedora Systems

As 'root', run the following commands to install OSQuery on a Red Hat, CentOS and Fedora based System.

```
curl -L https://pkg.osquery.io/rpm/GPG | tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery
yum-config-manager --add-repo https://pkg.osquery.io/rpm/osquery-s3-rpm.repo
yum-config-manager --enable osquery-s3-rpm
yum install osquery
```

Test to make sure it was installed correctly by running OSQuery CLI on the local machine. The `osqueryi` command will evoke an OSQuery interactive shell that queries can be run in.

![Hint: Use control + D to quit out of OSQuery CLI](https://776002387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbJAvxfpcYDlqBJLNIwwX%2Fuploads%2FYw3u4cx7fYdIVIco5Ijl%2FOSQuery-CentOS.jpg?alt=media\&token=1717038b-6779-476c-abab-ebecb7c53f36)

OSQuery is now successfully installed on this system.
