Fun with the Windows Subsystem for Linux
I just got a new laptop, and as it doesn&#x27;t have an optical drive and I couldn&#x27;t find a USB flash drive in order to install Linux, I&#x27;ve kinda been stuck on Windows for a few days.<p>I installed WSL a few days ago. Installation is a <i>ridiculous</i> process, and takes about 24 hours for the service to finally appear after you follow the steps to make it happen, which is not well-documented and just feels idiotic to a Linux user, who&#x27;s used to being able to change kernels in about three minutes, and switch back and forth at will.<p>But, I mostly love it. I still plan to install Linux and I&#x27;m unlikely to ever boot back into Windows except maybe for testing (I used to boot into Windows for games, but these days Steam has more than enough Linux games to keep me happy, as I don&#x27;t game much), but Windows is suddenly not the worst of all possible worlds for developing software for Linux, anymore.<p>It has some weird&#x2F;scary quirks: Using an editor installed on the &quot;Windows&quot; side of the system to edit files on the &quot;Linux&quot; side of the system led to files disappearing completely. I also saw the usual Windows CR&#x2F;LF issues in sharing files between Linux and Windows partitions, but also an additional weird thing that might be Unicode related: I piped output from a command into a file on the Windows side in a Powershell session, opened it on the Linux side, and found it had spaces after every character and some other bizarre stuff inserted into it; kinda like maybe it was created in a UTF encoding but then loaded in a non-Unicode encoding or something. These are probably things that have some reasonable explanation and some way to work around them, but they made me scared enough of inter-operation between the two sides that I now isolate the two completely. I don&#x27;t try to work &quot;back and forth&quot;. If it&#x27;s a Linux thing, I work only with Linux tools, and vice versa. This doesn&#x27;t seem to be as big of an issue when using the MSYS bash shell that comes with git, which is my other bash shell in this system. At least, using the git bash shell hasn&#x27;t led to any files disappearing.<p>Another interesting issue: Permissions are <i>super</i> lax, by default, in the Linux side. Owned by root:root and mode 777 across the board in your home directory, which causes a lot of software to complain. ssh, Ruby bundler (downgrade to 1.12.3 if you&#x27;re having problems running bundle on Windows, either under WSL or in Powershell; same solution works for different bugs), and a bunch of other stuff has weird quirks when given a directory that is 777. It&#x27;s also just plain nuts. I guess Windows has a different security model and this may not be a crazy as it seems at first glance, but it does cause software to freak out. But, as I understand it, WSL didn&#x27;t even have a user account until recently, so they seem to be making it better on that front. In the meantime, I wouldn&#x27;t want to rely on it for anything important.<p>That said, it gets a lot right. It feels like magic to run nearly any Linux application and have it Just Work. I, admittedly, am only running text mode apps at the moment: vim, bash, git, Perl, Ruby, Node. I haven&#x27;t tried any graphical apps, so far. But, that&#x27;s enough to replicate most of my workflow for developing server apps, and I don&#x27;t need a VM to do it.<p>I don&#x27;t plan to stick with Windows, even now, but it&#x27;s been fun playing with it, and seeing what Windows is like these days. It&#x27;s pretty nice, honestly. If I were just starting out with computers, I&#x27;d probably have no strong need to move to Linux in order to be productive. I&#x27;d learn how to use Powershell effectively (though it&#x27;s gotten a lot easier&#x2F;nicer in recent years, and accepts many of the common commands a UNIX user would expect, like ls, cd, cp, mv, etc...last time I used it many years ago, every command was some &quot;Stupid-Long-Ass-Thing WithBIzarreLY cApitalized-OptioNS&quot;), and probably be happy with Windows as a development platform.<p>As an aside, the Windows side of other kinds of development has also gotten <i>remarkably</i> better since I last tried it. Perl runs wonderfully right out of the box including some XS (compiled) modules, with Strawberry Perl, RubyInstaller does the same for Ruby, Python has always been great on Windows and still is, PostgreSQL works fine, git works mostly fine (though I guess some kinds of filename that are OK on Linux are problems on Windows), SQLite is great (as expected, since it is used by tons of Windows software, including stuff from Microsoft themselves, I think), ack works fine, etc. We&#x27;ve kind of entered a golden age where your desktop environment does not prevent you from working together with people using other desktop environments; they interoperate very easily for the most part, particularly with common points of ingress&#x2F;egress (github or gitlab, for example).