{"id":51309,"date":"2025-12-03T12:30:00","date_gmt":"2025-12-03T18:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=51309"},"modified":"2025-11-12T09:29:54","modified_gmt":"2025-11-12T15:29:54","slug":"how-to-install-postgresql-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/","title":{"rendered":"How to install PostgreSQL on Ubuntu 24.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp\" alt=\"How to install PostgreSQL on Ubuntu 24.04\" class=\"wp-image-51315\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04-300x169.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04-150x84.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04-768x432.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>PostgreSQL is a free, open-source object-relational database that focuses on reliability and performance, offering robust features for users of all skill levels, from beginners to professionals. It\u2019s a popular and widely used database system for various use cases, characterized by high scalability and a strong focus on security features. It works on most Linux Operating systems, and in this tutorial, we will show you how you can install PostgreSQL on Ubuntu 24.04 Operating System.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69ecc5b6f0a65\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69ecc5b6f0a65\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#Step-1-Update-the-System\" >Step 1. Update the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#Step-2-Install-PostgreSQL\" >Step 2. Install PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#Step-3-Using-PostgreSQL\" >Step 3. Using PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisite-s\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span><strong>Prerequisite<\/strong>s<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A server with Ubuntu 24.04 as OS<\/li>\n\n\n\n<li>User privileges: root or non-root user with sudo privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-update-the-system\"><span class=\"ez-toc-section\" id=\"Step-1-Update-the-System\"><\/span><strong>Step 1. Update the System<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can first update the system packages to the latest versions available.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt-get update -y &amp;&amp; sudo apt-get upgrade -y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-install-postgresql\"><span class=\"ez-toc-section\" id=\"Step-2-Install-PostgreSQL\"><\/span><strong>Step 2. Install PostgreSQL<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To start the installation, you will first need to install the postgresql-common package that contains the dependencies for installing PostgreSQL by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt install postgresql-common<\/code><\/pre>\n\n\n\n<p>Then you can run this command to automatically install the PostgreSQL repository for apt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \/usr\/share\/postgresql-common\/pgdg\/apt.postgresql.org.sh<\/code><\/pre>\n\n\n\n<p>You should receive this output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>This script will enable the PostgreSQL APT repository on apt.postgresql.org on\nyour system. The distribution codename used will be trixie-pgdg.\n\nPress Enter to continue, or Ctrl-C to abort.<\/code><\/pre>\n\n\n\n<p><strong>If you want to manually install the APT repository, you can follow these steps, or if you installed the repository automatically with the command:<\/strong><\/p>\n\n\n\n<p><strong># \/usr\/share\/postgresql-common\/pgdg\/apt.postgresql.org.sh<\/strong><\/p>\n\n\n\n<p><strong>You can skip to the command below: apt install postgresql -y<\/strong><\/p>\n\n\n\n<p>To manually install the APT repository, you will first need to install the needed packages and import the repository signing key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt install curl ca-certificates\n# install -d \/usr\/share\/postgresql-common\/pgdg\n# curl -o \/usr\/share\/postgresql-common\/pgdg\/apt.postgresql.org.asc --fail https:\/\/www.postgresql.org\/media\/keys\/ACCC4CF8.asc<\/code><\/pre>\n\n\n\n<p>Then you can create the repository configuration file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># . \/etc\/os-release\n# sudo sh -c \"echo 'deb &#91;signed-by=\/usr\/share\/postgresql-common\/pgdg\/apt.postgresql.org.asc] https:\/\/apt.postgresql.org\/pub\/repos\/apt $VERSION_CODENAME-pgdg main' &gt; \/etc\/apt\/sources.list.d\/pgdg.list\"<\/code><\/pre>\n\n\n\n<p>If you have installed the repository automatically, you can skip to this step, and now update the packages with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt update<\/code><\/pre>\n\n\n\n<p>You can click <strong>Enter<\/strong>, and finally install PostgreSQL with the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt install postgresql -y<\/code><\/pre>\n\n\n\n<p>Now, the PostgreSQL server should be installed, and you can check if PostgreSQL is running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># systemctl status postgresql\n\n\u25cf postgresql.service - PostgreSQL RDBMS\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/postgresql.service; enabled; preset: enabled)\n     Active: active (exited) since Fri 2025-11-07 10:09:46 EST; 42s ago\n Invocation: 3094ffa465f342689eec38258d8ffec3\n    Process: 2826 ExecStart=\/bin\/true (code=exited, status=0\/SUCCESS)\n   Main PID: 2826 (code=exited, status=0\/SUCCESS)\n   Mem peak: 1.8M\n        CPU: 7ms\n\nNov 07 10:09:46 rosehosting systemd&#91;1]: Starting postgresql.service - PostgreSQL RDBMS...\nNov 07 10:09:46 rosehosting systemd&#91;1]: Finished postgresql.service - PostgreSQL RDBMS.\n<\/code><\/pre>\n\n\n\n<p>And to check the PostgreSQL version, you can run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># psql --version\npsql (PostgreSQL) 18.0 (Debian 18.0-1.pgdg13+3)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-using-postgresql\"><span class=\"ez-toc-section\" id=\"Step-3-Using-PostgreSQL\"><\/span><strong>Step 3. Using PostgreSQL<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now you can log in to PostgreSQL by switching to the postgres user from the command line with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># su \u2013 postgres<\/code><\/pre>\n\n\n\n<p>Then you can run the command <strong>psql<\/strong> and get this output, signaling you are logged in the PostgreSQL console, or by running only one command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># sudo -u postgres psql\npsql (18.0 (Debian 18.0-1.pgdg13+3))\nType \"help\" for help.\n\npostgres=#<\/code><\/pre>\n\n\n\n<p>If you want to check the available databases in PostgreSQL, you can do so by typing \\l in the PostgreSQL console. <br>Here are also some commands you may find useful for PostgreSQL<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\\c dbname: Connects to the specified database.<\/li>\n\n\n\n<li>\\dt: Lists all tables in the current database.<\/li>\n\n\n\n<li>\\d table_name: Describes the structure of a specified table.<\/li>\n\n\n\n<li>\\du: Lists all database users (roles).<\/li>\n\n\n\n<li>\\q: Exit the&nbsp;psql&nbsp;client.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you have followed the instructions, you should have PostgreSQL installed on Ubuntu 24.04 and be ready to use it. You can still configure certain parameters to secure your database system or optimize performance for specific server resources. If you need help on how to install PostgreSQL on Ubuntu 24.04, or how to secure and configure PostgreSQL for the best performance, you can check our <a href=\"https:\/\/www.rosehosting.com\/postgresql-hosting\/\">PostgreSQL hosting plans<\/a> and get started immediately.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL is a free, open-source object-relational database that focuses on reliability and performance, offering robust features for users of all &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to install PostgreSQL on Ubuntu 24.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#more-51309\" aria-label=\"Read more about How to install PostgreSQL on Ubuntu 24.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":51315,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1702,1698],"tags":[1603,434,2136],"class_list":["post-51309","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-ubuntu","tag-how-to-install","tag-postgresql","tag-ubuntu-24-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to install PostgreSQL on Ubuntu 24.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Learn how to install PostgreSQL on Ubuntu 24.04 with ease. Follow our step-by-step tutorial for beginners and professionals.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install PostgreSQL on Ubuntu 24.04\" \/>\n<meta property=\"og:description\" content=\"How to install PostgreSQL on Ubuntu 24.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-03T18:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to install PostgreSQL on Ubuntu 24.04\",\"datePublished\":\"2025-12-03T18:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/\"},\"wordCount\":472,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/how-to-install-postgresql-on-ubuntu-24-04.webp\",\"keywords\":[\"how to install\",\"PostgreSQL\",\"Ubuntu 24.04\"],\"articleSection\":[\"Databases\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/\",\"name\":\"How to install PostgreSQL on Ubuntu 24.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/how-to-install-postgresql-on-ubuntu-24-04.webp\",\"datePublished\":\"2025-12-03T18:30:00+00:00\",\"description\":\"Learn how to install PostgreSQL on Ubuntu 24.04 with ease. Follow our step-by-step tutorial for beginners and professionals.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/how-to-install-postgresql-on-ubuntu-24-04.webp\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/how-to-install-postgresql-on-ubuntu-24-04.webp\",\"width\":1024,\"height\":576,\"caption\":\"How to install PostgreSQL on Ubuntu 24.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-postgresql-on-ubuntu-24-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install PostgreSQL on Ubuntu 24.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to install PostgreSQL on Ubuntu 24.04 | RoseHosting","description":"Learn how to install PostgreSQL on Ubuntu 24.04 with ease. Follow our step-by-step tutorial for beginners and professionals.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/","og_locale":"en_US","og_type":"article","og_title":"How to install PostgreSQL on Ubuntu 24.04","og_description":"How to install PostgreSQL on Ubuntu 24.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2025-12-03T18:30:00+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to install PostgreSQL on Ubuntu 24.04","datePublished":"2025-12-03T18:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/"},"wordCount":472,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp","keywords":["how to install","PostgreSQL","Ubuntu 24.04"],"articleSection":["Databases","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/","name":"How to install PostgreSQL on Ubuntu 24.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp","datePublished":"2025-12-03T18:30:00+00:00","description":"Learn how to install PostgreSQL on Ubuntu 24.04 with ease. Follow our step-by-step tutorial for beginners and professionals.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2025\/11\/how-to-install-postgresql-on-ubuntu-24-04.webp","width":1024,"height":576,"caption":"How to install PostgreSQL on Ubuntu 24.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-postgresql-on-ubuntu-24-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to install PostgreSQL on Ubuntu 24.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/51309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=51309"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/51309\/revisions"}],"predecessor-version":[{"id":51316,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/51309\/revisions\/51316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/51315"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=51309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=51309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=51309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}