5 ms·
If you are coming from a Linux background, you should use WSL 2 instead of PowerShell. Using the Windows SSH client? Hell no! I install everything (even Docker)
by kissgyorgy 5y ago
If you are coming from a Linux background, you should use WSL 2 instead of PowerShell. Using the Windows SSH client? Hell no! I install everything (even Docker) inside WSL, the only thing I have outside is VS Code, but all the extensions are also installed inside WSL, and I only have WSL window open all the time, keeping all my files inside the WSL filesystem. Much more convenient and less learning of Windows things.
- dkryptr 5y agoThis is the way. (my setup is 1:1 it sounds like)
- majkinetor 5y agoNah... I have SSH OTB (its OpenSSH after all), docker-desktop and vscode all outside WSL. Why would I use WSL with its vastly inferior shell ? Docker desktop sucked tho, but its now pretty hassle free. What do you mean, its much more convenient to use virtual machine instead of real thing ?
- k8sToGo 5y agoWSL isn't a shell. You install any shell you want inside WSL. I use fish.
- temp8964 5y agoStill won't solve the update reboot problem.
- NotTheDr01ds 5y agoWhile that's true, I'm not sure that I consider it a "problem" in the first place. I used to, but not any longer. In my experience, there's never a good time to update/reboot. I always have multiple applications and tabs open, and always several tasks in flight. For many years, I had Windows set to not automatically update. Now, given the rapid speed with which vulnerabilities can be exploited, I'm personally glad that it does. In a corporate environment, though, as the blog author is in, it's really going to be the IT policies that dictate this. They typically have the ability to update not just Windows, but any other software on the system. And often do. That's one of the reasons that IT departments do prefer (and sometimes dictate) Windows -- It does make it easier for them to secure the multitude of systems for which they are responsible.
- antiframe 5y agoI don't think the problem is when to reboot when necessary. The problem is many reboots shouldn't be necessary. If you update a service, restart it. If you update a kernel, reboot. While Microsoft has gotten better at not rebooting every time, most third party installed programs haven't. At least not when I last used a Windows desktop.
- MikusR 5y agoYou can even update GPU driver without restarting. Those are some crappy 3rd party programs.
- NotTheDr01ds 5y agoThat's a completely fair point, and unfortunately Windows does require a restart on pretty much every Windows update. You're right -- Linux only requires a reboot on a kernel update, which is far less frequent. That said, I don't know of many third-party apps that require a reboot.
- idatum 5y agoYes! I've been using Windows as long as I've been a developer, and the combination of WSL(2), Terminal, and VSCode (running as Windows process) has been solid for me. I don't use Windows without WSL anymore. PowerShell just never did it for me. Early in my career I "ran Linux/BSD at home", so it was a natural transition to Windows + WSL. And on Win11, WSLg gives you gvim as an easy option. EDIT: But :) There are still plenty of Windows (specifically Win11) things that aggravate me still after so long.
- nix0n 5y ago> all my files inside the WSL filesystem Is this a necessary limitation of WSL? I've been using Cygwin instead, so I can access Windows-native files using Linux-y tools.
- kissgyorgy 5y agoThe performance is not great across Windows and WSL filesystems, so it's better to keep every file inside.
- johnny22 5y agoI've not used WSL2, but folks say accessing the windows files from linux and vice versa isn't nearly fast enough. I wonder which VM based "shared files" is the fastest.
- oblio 5y agoTo be frank, except for some specific cases, Cygwin is good enough. You can use Windows versions of development tools (Java, Python, Node, etc) and you mix them with Cygwin. It's a bit of an unholy alliance but you can definitely develop a ton of stuff like this, I've done it for a decade. You just need to figure out a bit of Cygwin-fu with cygpath & related tools, to smooth over the sharp areas occasionally.
- R0b0t1 5y agoI've never actually had to dig that deep into the internals of cygwin, but you do need to understand how things are linked if you are going to distribute binaries. Over time I found msys2 to be a better fit. In theory they're supposed to do different things, but msys2 with no cross compilation is basically cygwin but with a package manager you can use from the command line.
- ModernMech 5y agoEven better, use Windows Terminal. It integrates any number of shells (Powershell, cmd, and Ubuntu via WSL2) into a single terminal application.
- behnamoh 5y agoHow do you install vscode extensions in WSL? If vscode is inside Windows, then don't the extensions get installed in Windows as well?
- kissgyorgy 5y agoWhen you want to install an extension, you can choose where you want it to install, you can do both.
- PascLeRasc 5y agoCan WSL 2 interact with files outside itself yet? For example, can it run imagemagick commands on a file in C:/Users/name/Downloads? The last time I used it you couldn't do this and all the mounting workarounds had a chance to break the file.
- geek_at 5y agoyes. By default all your harddrives (even freshly decrypted veracrypt volumes) are found as mountpoints in /mnt. So nstead of C:\users\name\Download you'd go to /mnt/c/users/name/Download But usually you don't even have to because by default the wsl shell already puts you in /mnt/c/users/name and you'd just cd into Download
- deleted 5y ago[deleted]