News for hackers. Stuff that matters.
Re:Using Windows after 15 years on Linux by kissgyorgy on Thursday April 07, 2022 @03:12PM (#30949062)
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.
Re:Using Windows after 15 years on Linux by nix0n on Thursday April 07, 2022 @03:41PM (#30949435)
> 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.

Re:Using Windows after 15 years on Linux by oblio on Thursday April 07, 2022 @03:52PM (#30949570)
To 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.

Re:Using Windows after 15 years on Linux by R0b0t1 on Thursday April 07, 2022 @04:14PM (#30949802)
I'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.

Re:Using Windows after 15 years on Linux by kissgyorgy on Thursday April 07, 2022 @03:44PM (#30949476)
The performance is not great across Windows and WSL filesystems, so it's better to keep every file inside.
Re:Using Windows after 15 years on Linux by johnny22 on Thursday April 07, 2022 @03:42PM (#30949462)
I'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.

Re:Using Windows after 15 years on Linux by PascLeRasc on Thursday April 07, 2022 @05:33PM (#30950605)
Can 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.
Re:Using Windows after 15 years on Linux by geek_at on Thursday April 07, 2022 @06:00PM (#30950848)
yes. 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

Re:Using Windows after 15 years on Linux by idatum on Thursday April 07, 2022 @03:32PM (#30949313)
Yes! 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.

Re:Using Windows after 15 years on Linux by majkinetor on Thursday April 07, 2022 @03:28PM (#30949251)
Nah...

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 ?

Re:Using Windows after 15 years on Linux by k8sToGo on Thursday April 07, 2022 @04:18PM (#30949845)
WSL isn't a shell. You install any shell you want inside WSL. I use fish.
Re:Using Windows after 15 years on Linux by ModernMech on Thursday April 07, 2022 @03:41PM (#30949437)
Even better, use Windows Terminal. It integrates any number of shells (Powershell, cmd, and Ubuntu via WSL2) into a single terminal application.
Re:Using Windows after 15 years on Linux by behnamoh on Thursday April 07, 2022 @04:42PM (#30950086)
How do you install vscode extensions in WSL? If vscode is inside Windows, then don't the extensions get installed in Windows as well?
Re:Using Windows after 15 years on Linux by kissgyorgy on Thursday April 07, 2022 @06:44PM (#30951221)
When you want to install an extension, you can choose where you want it to install, you can do both.
Re:Using Windows after 15 years on Linux by dkryptr on Thursday April 07, 2022 @03:27PM (#30949232)
This is the way. (my setup is 1:1 it sounds like)
Re:Using Windows after 15 years on Linux by temp8964 on Thursday April 07, 2022 @03:28PM (#30949253)
Still won't solve the update reboot problem.
Re:Using Windows after 15 years on Linux by NotTheDr01ds on Thursday April 07, 2022 @03:48PM (#30949524)
While 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.

Re:Using Windows after 15 years on Linux by antiframe on Thursday April 07, 2022 @04:07PM (#30949742)
I 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.
Re:Using Windows after 15 years on Linux by NotTheDr01ds on Thursday April 07, 2022 @08:49PM (#30952092)
That'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.

Re:Using Windows after 15 years on Linux by MikusR on Thursday April 07, 2022 @07:08PM (#30951422)
You can even update GPU driver without restarting. Those are some crappy 3rd party programs.