Using PostgreSQL installed in Windows inside WSL as well? - postgresql

I have installed PostgreSQL version 10 in Windows. Since I'm doing Web development work and using WSL frequently I would like to use PostgreSQL from within WSL too.
Is there anyway in which we are able to link the PostgreSQL software installed in Windows with WSL environment so that any new databases created inside WSL is available in the Windows environment also?
1) PostgreSQL10 installed on Windows environment.
2) PostgresSQL9.5 installed inside WSL environment.
My Question is: how do I connect both Windows configurations WSL to use the same PostgreSQL instance?

Related

Its possible to use VSCode SFTP extension with WSL/Ubuntu?

I need to use Windows in the company to development. I enabled WSL2 and installed Ubuntu 20.04. The developer environment is hosted in an AWS EC2 instance. To made changes to the developer environment I use Natizyskunk's SFTP extension for VSCode.
However, the extension is not working when VSCode is launched from a WSL environment. It fails to sync, with no error message. I think this is because WSL2 is behaving like a remote task in VSCode. Can someone help me? I hate using Windows for development, and I would like to use WSL2 with SFTP extension instead.

How to run windows installation of PostgreSQL on wsl?

So I'm trying to get PostgreSQL to work on my windows device. I installed it through wsl and it all works, but I hear its safer to do the windows install and run it through wsl. How do I do this? What port do i give to the windows installation of PostgreSQL? Thanks!

How do I get the extensions that are installed remotely on Visual Studio code

I was trying to get all the extensions installed on the machine. Now in windows with wsl2 enabled you can install the extensions either in the local (windows 10) or remote (ubuntu wsl2).
When I run code --list-extensions in powershell it only shows the extensions installed in the local only. And when I run code --list-extensions in the ubuntu-wsl2 it shows that the options is not supported.
My question is how can I get the extensions installed in the remote environment?

Visual Studio Code: Remote-SSH connect to Windows Server 2019

I've set up my VSCode Insider to connect th a Windows 2019 Server via the Remote-SSH extension. Is it correct, that I need a WSL installed so that it can set up the VSCode-Server and then it is running within the WSL distro when I'm connected?
I thought it would run on Windows instead.
The stable VS Code 1.40 release does not support for Windows ssh hosts: https://code.visualstudio.com/docs/remote/ssh#_remote-ssh-limitations
This feature is still experimental and only enabled in VS Code insiders builds when you set "remote.SSH.remoteIsWindows": true (Make sure to use the nightly ssh extension too) See this issue for details
You do not need to run WSL. You need to install a ssh client on your local machine (the machine that you will run VS Code), and install a ssh server on your remote machine. That's all you need. Your local VS Code uses the ssh client to connect to that ssh server on the remote machine. Details of how to do this can be found here, including opening firewall ports in the case of Windows.

How do I run eclipse remotely using Cygwin?

I'm running on Windows 7 and I want to be able to access the remote linux server at my school to run eclipse and do my programming assignments.
I installed cygwin, and ssh into the server, but whenever I run the "eclipse" command, it says "Eclipse: Cannot open display".
Is there any additional software I need to do, or commands I need to run in order to display the gui from my windows 7 computer?
aside from just running eclipse on my own computer, I want to do it remotely.
thank you
You need to:
Run an X server on your Windows machine; there's an xorg-server package in cygwin, use that (or the independent Xming).
Configure your ssh client to forward X11 traffic to the X server on your windows machine.
Here's a more detailed tutorial on doing this.