TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is Bash for Windows good enough to replace a Linux/Mac terminal?

45 点作者 jiantastic超过 8 年前
I know the Interop feature is coming to Bash for Windows (https:&#x2F;&#x2F;blogs.msdn.microsoft.com&#x2F;commandline&#x2F;2016&#x2F;10&#x2F;19&#x2F;interop-between-windows-and-bash&#x2F;) which to me seems to solve the complaints I had with the initial implementation.<p>Can anyone comment on their experiences using Bash for Windows for development full-time?<p>Thanks!

20 条评论

gtbono超过 8 年前
I&#x27;ve been watching the whole Bash on Windows thing since it launched and it blows my mind in almost every possible way, the project has all the potential to make Windows a viable programming environment, specially for PHP and Ruby folks, which need to run Apache and all that stuff.<p>It won&#x27;t replace a full Linux install, but it might be enough for most use cases (it doesn&#x27;t run X yet, for example). So virtual machines aren&#x27;t exactly going to be replaced by Bash on Windows.<p>But for people who buy Macs just because it is a Unix machine that runs Photoshop, and use Homebrew and Macports, which let&#x27;s be clear apt-get wins hands-down, Bash on Windows is a strong alternative for these types of users.<p>I own a Macbook Air 2011, Apple prices skyrocketed in Brazil and for me to pay that price on a machine that has soldered RAM, almost no ports, having to buy expensive adapters, to use a shitty package manager with an OS that makes me dual-boot with Windows&#x2F;Linux for some things, I am definitely considering a Lenovo or Dell machine with Windows for my next development environment.<p>Of course, not all things are perfect, while the project seems to be moving at an awesome pace and the future is bright, it is still in Beta, and lots of things are broken for now, if it becomes as stable as it should be, it will be big. I am eagerly waiting for the stable version of it.
评论 #12818196 未加载
评论 #12816793 未加载
alexwebb2超过 8 年前
In short: yes. I recently went through this with a new work laptop.<p>I checked a couple boxes, restarted, and installed ConEmu.<p>I added symlinks in my bash home directory for &quot;c&quot;, &quot;docs&quot;, and &quot;downloads&quot;, and pinned my Linux installation as a favorite in Windows Explorer, which makes file management between the two systems incredibly easy.<p>I installed git, and zsh, and a lot of the other basics. Zero issues. It&#x27;s a normal Ubuntu installation.<p>I&#x27;ve been thrilled with it, so much so that I just plunked down some money for my first Windows laptop in years, and I&#x27;m selling my old Macbook Pro.<p>It&#x27;s the real deal. Microsoft is on fire lately.
评论 #12818825 未加载
ordinary超过 8 年前
I have not tried Bash for Windows, but I&#x27;ve been a Cygwin user for almost a decade.<p>The main problem I have with using any kind of shell on Windows is that process spawning takes much, much longer than on *nix systems. I regularly find myself optimizing my scripts not for readability or elegance, but for total number of calls to executables.<p>To illustrate, opening a new Cygwin Bash shell on this machine takes 3 seconds, almost all of which is spent executing .bashrc. On Linux, with the same .bashrc (modulo a few platform-specific settings) that&#x27;s under 0.2 seconds.<p>So, far from perfect, but is it &#x27;good enough&#x27;? I&#x27;d say yes. Bash is just so much nicer than CMD, and while I hear good things about PowerShell, I can&#x27;t be bothered to learn a different shell for every platform I use.<p>Whether there are additional tradeoffs with Bash for Windows, I cannot judge.
评论 #12819618 未加载
评论 #12814720 未加载
评论 #12814710 未加载
评论 #12814699 未加载
评论 #12814721 未加载
Down_n_Out超过 8 年前
There&#x27;s also Babun[1] which is a pre-configured Cygwin with a lot of addons as they say themselves. It also uses oh-my-zhs.<p>When I have to use a Windows OS for some reason I install this, it at least makes me feel a little bit at home.<p>[1]<a href="http:&#x2F;&#x2F;babun.github.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;babun.github.io&#x2F;</a>
eswat超过 8 年前
My experience and usecase is limited - I just use my Windows machine for game development - but I’ve dealt with more headaches trying to get Bash for Windows + git to play nice with Unity that I’ve just gone back to using Git for Windows and its bash exe.<p>Probably the weirdest problem I’ve ran into are shader files in my git repo being locked to requiring administrative rights for either Unity or Bash for Windows to be able to open them.
评论 #12822181 未加载
johnnycarcin超过 8 年前
It&#x27;s not 100% there yet but it&#x27;s pretty damn close for me. If you are set on running a stable build of Windows then there are still some bugs out there that range from annoying to possible deal breakers. The two that come to mind is the stable version doesn&#x27;t support 256 colors (annoyance) but then there are issues like this that stop me from being able to totally use go: <a href="https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;BashOnWindows&#x2F;issues&#x2F;638" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;BashOnWindows&#x2F;issues&#x2F;638</a><p>Most of these are fixed in the insider builds of Windows but that means you have to run full insider builds, you can&#x27;t pick and choose components, so sometimes that is a non-starter for people.<p>Some of the annoying (color, cut &amp; paste, etc) things can be fixed by using something like ConEmu (what I use).<p>I&#x27;ve actually stopped using my macbook and am now just using my company provided Windows machine for day-to-day stuff and it&#x27;s been pretty smooth for the most part.<p>full disclosure: I work at Microsoft
Eridrus超过 8 年前
If you&#x27;re switching platforms you should test the software you plan to run, there are still some small gaps that may kill your workflow (eg zeromq doesn&#x27;t run out of the box, which means jupyter doesn&#x27;t either).<p>It&#x27;s been pretty good to me, but I&#x27;m normally a Windows user, so roadblocks in WSL just send me back to my old workflows rather than causing me headaches.
mephistopheles超过 8 年前
I have tried using it for the past couple of weeks, and had to fiddle a lot for the first week or so to get it working nicely. The package state is stuck at 14.04 but you can upgrade[0] to 16.04 with dirty[1] trick. After the initial setup, Windows Bash worked just fine for my Rust &#x2F; Go &#x2F; Python needs.<p>What would you mainly use the bash environment for ?<p>[0](<a href="http:&#x2F;&#x2F;www.omgubuntu.co.uk&#x2F;2016&#x2F;08&#x2F;upgrade-bash-windows-10-ubuntu-16-04-lts" rel="nofollow">http:&#x2F;&#x2F;www.omgubuntu.co.uk&#x2F;2016&#x2F;08&#x2F;upgrade-bash-windows-10-u...</a>) [1](<a href="https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;BashOnWindows&#x2F;issues&#x2F;482#issuecomment-235449454" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;BashOnWindows&#x2F;issues&#x2F;482#issuec...</a>)
评论 #12815223 未加载
jbb555超过 8 年前
What exactly are people using the linux shell for? It&#x27;s fun, but given that you can&#x27;t easily access windows files and you can&#x27;t use it to run things like the visual C++ compiler you can&#x27;t easily use it to script windows programs.<p>What do people actually use it for?
评论 #12822184 未加载
评论 #12817450 未加载
评论 #12817889 未加载
zachruss92超过 8 年前
Personally, I dislike it. I have been a Cygwin user for a few years and I desperately want to like LSFW, but I just can&#x27;t. I find the customization options of Cygwin to be much more and I can get things like Tmux working on it without any issues.<p>I also have a ton of docker compatibility issues when trying to work with containers, ultimately I just wrote a power shell script to get my docker-compose environment up and running and go from there.<p>As far as I know, you also can&#x27;t run nginx on port 80 which makes it challenging for web development (i&#x27;m sure I can run things on different ports, but who wants to do that).<p>I think it&#x27;s promoting, but not quite ready to replace my MacBook &amp; Linux partitions yet.
patleeman超过 8 年前
I&#x27;ve been using it for some web development tasks. Mainly for git, ssh, perusing my file system, and PHP&#x2F;Python programming. It&#x27;s worked well so far.<p>For a terminal emulator, I set up Conemu (<a href="https:&#x2F;&#x2F;conemu.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;conemu.github.io&#x2F;</a>) which is pretty swell.<p>I hit a road block when I need to use vagrant for my development environment. I need to hop into powershell to fire up vagrant as virtualization doesn&#x27;t seem to work in WSL. Otherwise it seems to work for most of my use cases.
评论 #12820566 未加载
bucma超过 8 年前
I&#x27;ve been using Bash for Windows at work for a couple of months, and it&#x27;s mostly been good enough that I don&#x27;t need to fire up my ubuntu vm anymore.<p>The biggest problem I&#x27;ve run into lately is that I <i>really</i> want to be able to run GUI-based programs, and even though that does worth with VcXWin, it&#x27;s kind of crappy, especially for font rendering.<p>Anyone know of a free (or cheap) x window server for windows that does anti-aliasing?
评论 #12816444 未加载
automathematics超过 8 年前
Last I tried, absolutely not. There is a bug with TCP&#x2F;IP that apparently prevents nodejs from doing anything networking related. So for example, express will not run because it can&#x27;t find to the port to listen for HTTP.<p>Its been documented and seemingly ignored by the bash team every time I&#x27;ve checked so I may stuck sticking with a laptop that doesn&#x27;t have an escape key.. :(<p>Proceed with caution, for now.
评论 #12818357 未加载
aq3cn超过 8 年前
I do scientific programming using FORTRAN 90 and Python. I am Windows Insider with fast build releases set up in my Dell XPS. For my needs it has served well. But I request MS developers to give more control over how to utilize system resources more efficiently. It needs to be more transparent and documented for users of procexp.
评论 #12820544 未加载
tkinom超过 8 年前
Bash for Windows is open source, right?<p>Is there anyway for me to get just bash binary to run? or build it from source and run it instead sign up for the insider program.<p>I tried to signed up as insider a few times on couple win 10 systems, failed and completely gave up on that.
评论 #12817214 未加载
评论 #12819947 未加载
timehastoldme超过 8 年前
I used it at work last summer, and it was fine-- did everything you&#x27;d expect it to, etc. I found that I missed my Mac for a few reasons, but those seem to be mostly idiosyncratic.
null4bl3超过 8 年前
But.. Why.. Why would you want to do that. And I am not asking to be clever. I just can&#x27;t imagine why anyone wouldn&#x27;t just run Linux?
评论 #12819894 未加载
abrown28超过 8 年前
I can do almost everything I want in bash except run anything that needs a list of network interfaces. I would like to run gulp with browsersync.
miriadis超过 8 年前
Why not a Virtual Machine on your PC?
评论 #12814977 未加载
评论 #12814472 未加载
mdrzn超过 8 年前
Multi-tabbed-putty<p><a href="http:&#x2F;&#x2F;ttyplus.com&#x2F;multi-tabbed-putty&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ttyplus.com&#x2F;multi-tabbed-putty&#x2F;</a>