> For the complete documentation index, see [llms.txt](https://aws-postgresql-docs.beliciarodriguez.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aws-postgresql-docs.beliciarodriguez.com/ubuntu-configuring-instance/install-postgresql.md).

# Install PostgreSQL

In this section, we will be walk through setting up PostgreSQL on your Ubuntu instance.

### Update Ubuntu Machine

Before we install PostgreSQL into our instance, we must first update and upgrade our packages in the instance.&#x20;

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

{% hint style="info" %}
The **-y** is a Linux flag that means to response "Yes" to any questions or prompts that appear in these commands.
{% endhint %}

### Install PostgreSQL

To install PostgreSQL, type the following line of code:

```bash
sudo apt install postgresql -y
```

That's it! PostgreSQL is now installed onto your machine. When you installed PostgreSQL, you also created a "postgres" user account.&#x20;
