Hacker News new | ask | show | jobs
by jackalope 4234 days ago
When I used to install Cygwin, it was to get (in order of importance): ssh, vim, rsync & X11. Gow doesn't include the last two, so it feels like an apples/oranges comparison (for my use case). Still, it's pretty amazing what Windows doesn't include by default in this day and age, so a simple, lightweight set of tools like this definitely has its place.

I don't use Windows anymore, but if I did, I would probably just spin up a VM with a tiny live Linux ISO, because it would bring in so much other goodness without any extra effort.

3 comments

> Still, it's pretty amazing what Windows doesn't include by default in this day and age

It includes the majority of stuff you'd want as part of Powershell, just under different names, and not available as separate executables on the filesystem. If Powershell is lacking something, you can access any .Net class on the system. Once OneGet is released with the next version of Windows and people start packaging stuff for it, you'll be able to grab additional utilities for pretty much anything.

Windows isn't that far behind. It's mostly just not UNIX. Most things are there, just done in very different ways.

Equivalents for:

wget or curl

lftp

dig

telnet

And I mean similar features, not Invoke-WebRequest, ftp, nslookup or writing my own clone in 2000 lines of Powershell.

And to this day I have no idea why telnet was removed from the base installation.

The Windows command line is getting better with Powershell, but even Powershell can't beat 1000 man years of tool development. And I really hope that package manager takes off cause right now most Windows non-Microsoft tools are either shady or crappy.

I'm only speculating, but I imagine telnet was removed because the security issues and misuse vastly outweighed the legitimate use by powerusers.

And I'm not really sold that an OS should ship with a bloated utility like modern wget rather than including a very lightweight downloader.

On the other hand, I think PowerShell is a vastly over-complicated and over-engineered response to the conceptually simple Unix shell, which is why most still favour the command line.

telnetd ok, but telnet itself? What for? Crappy, slow, port scanning?
Removing telnet nudges people to completely stop using telnetd. I know there's a ton of embedded devices that require telnet, but these devices are increasingly going to become a liability and Microsoft probably made a good decision here.
That doesn't make sense. If I need to configure a switch, test an http server, or whatever it is I need telnet for, I'm going to download PuTTY. No (sane) person ever went "screw that, telnet is insecure, I refuse to do it".
telnet and tfpt clients are still part of Windows, just not installed by default.

You need to go into Control Panel > Programs and Features > Turn Windows Features On or Off.

They, amongst other tools, are listed there.

dig's never been distributed with any Linux OS I've used. (Resolve-DnsName is in Powershell 4.0, which implements most of that functionality.) Nor has lftp. So we'll take those out of the running.

The vast majority of what wget and curl are used for is simply downloading single files/pages. Invoke-WebRequest does that fine. It also deals with poking at most web services you're likely to come across. What service can't you use with it?

As for telnet... the removal of that was ridiculous, I'll admit.

Not the same user, but I once tried to get PowerShell to do an ls over FTP for me, and even with copying some sample code it was horribly painful.

I can't speak from broad experience but my impression was that PowerShell does a bunch of common cases fairly well but if you want something a bit different you're bashing your head on your desk.

> you're bashing your head on your desk

Repeatedly.

Powershell is a wonderful concept but the ecosystem around it, except for Microsoft's own extensions, hasn't really hit puberty.

Also try writing scripts which involve native Windows commands (such as robocopy & company). Things are definitely not intuitive and the error handling is crappy. You either stay within Powershell bounds and everything is wonderful, or you step out and are in a world of pain.

years ago I posted much the same sentiment on stack overflow when I was attempting to use Powershell 1 to build and deploy software that used SVN for it's SCM.

It was a pain in the neck and I felt like the PS integration was awesome as long as you stayed in that ecosystem, but the second you strayed... pain.

I got bashed fairly hard with the question I asked surrounding it closed as unconstructive (it was an honest question about exactly what PS was targetted towards).

"Most things are there, just done in very different ways."

Does it have something like the POSIX fork() system call? Apparently, its lack in Windows is the main thing that makes Cygwin as slow as it is.[1]

[1] - http://stackoverflow.com/questions/2512892/how-to-speed-up-c...

Only UNIX clones support fork() properly, because only UNIX clones processes.

Any other non UNIX OS tends not to fully provide 100% fork() in they POSIX compatibility layer, or kind of fake it.

Sorry for the stupid question but does that mean you can't write C code in Windows that calls fork()?
I'm not really an expert but I'm pretty sure you can call fork but you will pay a full cost of a creating a new process, manually copying the memory state to the new process and parent and child have to do a complicated dance to ensure it all happens right. So it works and most of the semantics are the same, but it is god awful slow.
> you can call fork but you will pay a full cost of a creating a new process, manually copying the memory state to the new process and parent and child have to do a complicated dance to ensure it all happens right

That fork() and associated dance happens in cygwin1.dll or the equivalent POSIX compatibility library. Windows has no fork to call.

You are correct, fork() is part of the POSIX specification, Windows does not implement POSIX.
It only kind of has ssh. It has the PuTTY SSH client, but no SSH server.
> Still, it's pretty amazing what Windows doesn't include by default in this day and age, so a simple, lightweight set of tools like this definitely has its place.

Others have already mentioned Powershell. Not by default, but Microsoft has offered Windows Services for UNIX for some time. Free download too: http://www.microsoft.com/en-us/download/details.aspx?id=274

Truthfully, I've never used it myself, because Cygwin exists and it actually provides full POSIX on Windows, unlike GOW et al.

Supported OSes: "Windows 2000, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows Server 2003, Windows XP"

They haven't updated WSfU for years now.