---
description: OSQuery Installation Guide for Debian or Ubuntu Systems
---

# Debian + Ubuntu Based Systems

Run these following commands as the 'root' user on a Debian or Ubuntu based system to install OSQuery.

```
export OSQUERY_KEY=1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $OSQUERY_KEY
add-apt-repository 'deb [arch=amd64] https://pkg.osquery.io/deb deb main'
apt-get update
apt-get 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%2FtoOvoJEWFcP5Z3b7lEwE%2Fosqueryi-ubuntu.JPG?alt=media\&token=e000c647-f207-473f-b6f5-53ffb8aac6c0)

OSQuery is now successfully installed on this system.
