How to Start PostgreSQL on Linux?
You can’t directly work on PostgreSQL on Linux just like Python or Java. You need to get into PostgreSQL. To do that, the following two commands will be used.
Step 1: The first one will Enable PostgreSQL on Linux.
sudo su postgres
Step 2: The second one will help to enter into the PostgreSQL.
psql
How to Configure PostgreSQL in Linux?
Quick Preview to Configure PostgreSQL on Linux:
- Install PostgreSQL on Linux:
- On Linux Terminal, execute the command sudo apt-get update
- To install and execute the command, sudo apt install postgresql postgresql-contrib
- Check the Status of PostgreSQL on Linux:
- Checking status use command service postgresql status.
- Enter Into PostgreSQL Configuration:
- Enter the command sudo su postgres
- Execute command psql.
- Check Database & Users of PostgreSQL on Linux:
- To list the database, use command \l.
- To list users, use the command \du.
- Configure New User on PostgreSQL on Linux:
- To create a Simple User use the command CREATE USER <User-Name>;
- To make Superuser, use the command ALTER USER <User-Name> WITH SUPERUSER;
- Open Manual of PostgreSQL on Linux:
- To open the complete manual of PostgreSQL on Linux, use the command man psql.
While working on the Database Management System concept, frequently we have to work on practical problems. And one of the major steps to work on practical problems is to work on the Database Tables. If you are using the Linux Distributions Operating System, the application PostgreSQL on Linux could be the best for you.
Configuration of PostgreSQL on Linux will help you to work on the Linux Command Line tool without having any kind of issues. Also, the Installation of PostgreSQL on Linux takes a few lines which can be another plus point to the students who want to quickly start the practical practice. However, if the PostgreSQL Configuration on Linux is not perfectly done, the application will malfunction.
This article will highlight the Installation of PostgreSQL on Linux along with a few important PostgreSQL Configurational Steps on Linux.
To know more about PostgreSQL & its proper usage, you can check the article PostgreSQL Tutorial.
Table of Content
- How to Install PostgreSQL on Linux?
- How to Check the Status of PostgreSQL on Linux?
- How to Start PostgreSQL on Linux?
- How to Check Database & Users on PostgreSQL in Linux?
- How to Configure & Modify Users on PostgreSQL on Linux?
- How to Open the Manual of PostgreSQL on Linux?