How to Set Environment Variables for postgresql in windows 11

To set Postgresql path to the environment variable in Windows 11 | 10; Simply type environment in the window search bar and click on it, after clicking on the Advanced tab, select Environment Variables, and set the PostgreSQL path under System Variables by clicking on Edit and selecting New path, then setting the path to your PostgreSQL DB and save it.

If you have installed Postgresql in your Windows system. But if you do not set the path to PostgreSQL in the system environment variable, you may see ‘PSQL’ is not recognized as an internal or external command operable program or batch file’ error on the Windows 11 | 10 command line or CMD.

How to Set Environment Variables for postgresql in windows 11 | 10

Steps on how to set PostgreSQL path on system environment variables in windows 11 | 10:

Step 1 – Open Windows Search Bar

To open windows search bar and type Environment Variables; as shown below picture:

Edit the PATH Environment Variable windows

Step 2 – Select Environment Variables Window

Click advance tab setting and after that click on environment variable; as shown below picture:

Advanced setting to open environment variable

Step 3 – Edit System Environment Variable Path

Edit system environment variable path; as shown below picture:

edit enviroment variable path

Step 4 – Set Postgresql Environment Variable Path Windows

To set Postgresql path in an environment variable on Windows, Click on New, add path, and save it; as shown below picture:

Step 5 – Restart Windows

Restart your Windows 11|10 system.

Conclusion

To set the PostgreSQL path to a system environment variable in Windows, type Control Panel on the navigation search bar > Type Edit system environment variables > Click on the “Advanced” tab > click “Environment Variables” > Click on Edit button under system variable > Select “New” button > Set the path to the postgresql bin directory > And click on “OK” button to save all the updates.

Recommended Windows Tutorials

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *