> ## Content Index
> Fetch the complete content index at: https://scriptcrunch.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Install Prometheus on Ubuntu
- URL: https://scriptcrunch.com/install-prometheus-on-ubuntu/
- Published: 2023-10-18T07:03:46.000Z
- Updated: 2026-06-23T08:55:57.000Z
- Author: Aswin Vijayan
- Tags: Prometheus, #Migrated-1758801465347, #wp, #wp-post, #Import 2025-09-25 11:57

Learn how to install [Prometheus](https://scriptcrunch.com/tag/prometheus/) on Ubuntu with our easy-to-follow [guide](https://scriptcrunch.com/tag/guides/). Perfect for beginners to get your monitoring setup in no time.

[Prometheus](https://prometheus.io/?ref=scriptcrunch.com) is an open-source monitoring and alerting system for collecting, storing, and querying metrics data from multiple systems and applications.

Let's see how to install Promethus on Ubuntu, follow the below steps to install Promethus.

**Step 1:** Update and upgrade your system using the command given below.

```
sudo apt update && sudo apt upgrade -y
```

**Step 2:** Download Prometheus and extract the files using the command.

```
wget https://github.com/prometheus/prometheus/releases/download/v2.37.6/prometheus-2.37.6.linux-amd64.tar.gz

tar -xvf prometheus-2.37.6.linux-amd64.tar.gz

mv prometheus-2.37.6.linux-amd64 prometheus
```

**Step 3:** Create a user Prometheus using the command given below.

```
sudo useradd --no-create-home --shell /bin/false prometheus
```

**Step 4:** Create a Prometheus folder in two locations and change their owner permissions to Prometheus user.

```
sudo mkdir /etc/prometheus

sudo mkdir /var/lib/prometheus

sudo chown prometheus:prometheus /etc/prometheus

sudo chown prometheus:prometheus /var/lib/prometheus
```

**Step 5:** Copy prometheus and promtool files to the bin and change the ownership to prometheus user.

```
sudo cp prometheus/prometheus /usr/local/bin/

sudo cp prometheus/promtool /usr/local/bin/

sudo chown prometheus:prometheus /usr/local/bin/prometheus

sudo chown prometheus:prometheus /usr/local/bin/promtool
```

**Step 6:** Then copy the consoles and console\_libraries folder to the prometheus folder and change the ownership to promethus.

```
sudo cp -r prometheus/consoles /etc/prometheus

sudo cp -r prometheus/console_libraries /etc/prometheus

sudo chown -R prometheus:prometheus /etc/prometheus/consoles

sudo chown -R prometheus:prometheus /etc/prometheus/console_libraries
```

**Step 7:** Now copy the prometheus.yml file inside the prometheus folder and change the ownership to promethus.

```
sudo cp prometheus/prometheus.yml /etc/prometheus
```

**Step 8:** Create a prometheus service file and copy the below content in it.

sudo vi /etc/[linux](https://scriptcrunch.com/%3Ca%20href=)\-systemd/">systemd/system/prometheus.service

```
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
    --config.file /etc/prometheus/prometheus.yml \
    --storage.tsdb.path /var/lib/prometheus/ \
    --web.console.templates=/etc/prometheus/consoles \
    --web.console.libraries=/etc/prometheus/console_libraries

[Install]
WantedBy=multi-user.target
```

Now reload to make the changes and start Prometheus.

```
sudo systemctl daemon-reload

sudo systemctl start prometheus
```

**Step 9:** Check the status of promethus if it's running or not.

```
sudo systemctl status prometheus
```

**Step 10:** Now access Prometheus UI in the browser by using the server IP along with the default port number 9090\. You can see your UI in the browser as shown below.

![Prometheus UI in the browser](https://storage.ghost.io/c/98/9f/989fb5e0-fca9-4938-afe7-999714e98540/content/images/2025/09/screenshot-from-2023-03-06-11-41-07.png)

You can use the search tab to search for available metrics as shown below.

![prometheus search tab](https://storage.ghost.io/c/98/9f/989fb5e0-fca9-4938-afe7-999714e98540/content/images/2025/09/screenshot-from-2023-03-06-11-40-09.png)

**Note:** Linux Foundation offers a Prometheus certification called [Prometheus Certified Associate](https://training.linuxfoundation.org/certification/prometheus-certified-associate/?ref=scriptcrunch.com) (PCA). You can check our [Linux Foundation Coupon](https://scriptcrunch.com/linux-foundation-coupon/) page to get up to 50% discount on the PCA certification.