4 ms·
Not the GP but I use a headless Linux server VM through Virtualbox. I mount the Linux filesystem as a drive in Windows to use whatever editors on the Windows si
by add-sub-mul-div 2y ago
Not the GP but I use a headless Linux server VM through Virtualbox. I mount the Linux filesystem as a drive in Windows to use whatever editors on the Windows side and run any server processes (or command line utilities) on the Linux side. I've used this setup for over a decade without any complaints and the maintenance is low.
- hnthrowaway0328 2y agoCan you please elaborate? I used to ssh into a Linux VN with VSCode but your setup is more sophisticated.
- add-sub-mul-div 2y agoHere's how I do it. Create an Ubuntu server VM in VirtualBox, I use the bridged adapter for networking, VM will be its own host/IP on the network. Then install samba. sudo apt install samba Also install openssh if not already chosen during setup. Edit /etc/samba/smb.conf to uncomment/set these settings. [homes] browseable = no read only = no valid users = %S Create a user for SMB, use the same username/password as your local Windows user for convenience. sudo smbpasswd -a username Restart smbd, this command can vary depending on the VM OS/version. sudo service smbd restart Mount the home directory (run this from the Windows command line.) You won't have to provide a password when authenticating, if you set the user/pw as I suggested above. net use z: \\vm-hostname\vm-username I run git commands on the Linux side where all code projects live. You can go in the opposite direction (mount the Windows filesystem from within Linux) but I don't suggest that for the primary use case of code projects, it can introduce problems with permissions. But for one-off use cases I do sometimes mount the Windows filesystem in Linux. That requires following the VirtualBox instructions for installing "Guest Additions" and using the Shared Folders feature. Run servers on the VM, access web sites/services on the VM hostname through the browser on the Windows side. Not specific to this setup, but if you want to run a service on port 80 of the VM, run this command on whatever the actualy binary is for the server process. (Not a symlink.) sudo setcap 'cap_net_bind_service=+ep' /usr/local/python-3.12/bin/python3.12
- hnthrowaway0328 2y agoThanks a lot. This is more than I can understand right now. I'll digest and see if I can apply the principle.
- unshavedyak 2y agoIsn't this quite similar to WSL? Is there a reason you prefer this to WSL?
- add-sub-mul-div 2y agoI've been using this setup since before WSL existed. WSL had enough rough edges when it was newer to keep me from switching, but I'm sure it's improved since then. This setup is simpler in the sense of not requiring a newish and ever-evolving layer from Microsoft. It's lame that Oracle owns VirtualBox now, but there's never been any pain with it so far.