News for hackers. Stuff that matters.
Re:Windows Server 2019 Includes OpenSSH by scarface74 on Tuesday December 11, 2018 @06:43PM (#18660079)
I’ve been developing on and for Windows for 20 years and just started doing anything with Linux earlier this year.

If you told me I had to do anything advanced with Windows using only a CLI, I wouldn’t know where to start. On the other hand, I could maneuver my way around a bash shell. I haven’t thought about that before now.....

Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Tuesday December 11, 2018 @09:01PM (#18660768)
I think it's time for MS to develop a new ANSI/VT-compliant, text-oriented shell (to complement PowerShell, which is largely object- and API-oriented). There ought to be a default shell worth using on the other end when you ssh into a Windows server :)

cmd.exe and DOS were both text-oriented but extremely buggy and inconsistent. Perhaps MS could just focus on providing a very bash-like language (perhaps even include gnu utilities) while supporting the major interactive use cases for cmd.

Re:Windows Server 2019 Includes OpenSSH by jackfraser on Wednesday December 12, 2018 @12:57AM (#18661679)
Why would they do that when Powershell is literally that, but refined beyond what's commonly available on Linux?

I'm not great with it yet, but it feels intuitively like a step forward to be able to pass objects around instead of spending so much of my time using awk-ward 40 year old tools to tease text out of various fields.

Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Wednesday December 12, 2018 @02:29AM (#18662018)
PowerShell is great for when you want to interact with Windows APIs (local and remote) and/or work with objects. I have no problem with using it for those purposes.

But terminals and the tooling around them have always revolved around text. My point is that since Microsoft is (a) including OpenSSH, (b) upgrading their terminal infrastructure to support VT100 and ANSI codes, and (c) investing in WSL, it would make make a lot of sense to add a Windows-native shell that is more text-oriented. Not because I hate working with objects and APIs, but because plain text ought to be the primary, first-class supported data format when working on a terminal.

PowerShell is great, but it's an object-oriented (not text-oriented) shell.

Re:Windows Server 2019 Includes OpenSSH by AnIdiotOnTheNet on Wednesday December 12, 2018 @03:36PM (#18667508)
> But terminals and the tooling around them have always revolved around text

That's because they're from the 70s, when literal terminals with no real computing power were connected to a centralized system that did all the work. They're archaic and silly.

Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Wednesday December 12, 2018 @04:23PM (#18667885)
> They're archaic and silly.

They may seem that way to some, but they still provide a surprisingly versatile and useful user interface. Terminal programs and scripts are easy and fast to write, easy to interact with, easy to change, and trivially portable across POSIX platforms; hence, when writing a tool for oneself or another developer, most developers will usually opt for a CLI-based UI. Terminal program UIs are also very stable (in addition to being text-based), making them arbitrarily composable into scripts and workflows without fear of them breaking in the future.

Modern graphical UIs are usually easy to use, but they are far-removed from the code and tools that are used to write them or interact with their APIs programmatically. Terminal program UIs, however, are very close to the environment they're built in -- so the line between using a terminal program and interacting with it programmatically is delightfully blurred.

I use a multi-paned iTerm2/zsh window every day as a front-end developer (I'm on a Mac running macOS Mojave). I can't imagine working without it. There are a lot of good reasons npm, git, and other popular mainstays in modern development workflows are terminal-based.

Re:Windows Server 2019 Includes OpenSSH by AnIdiotOnTheNet on Wednesday December 12, 2018 @08:34PM (#18669236)
Terminal is not the same thing as CLI or TUI. I don't have a problem with either of the latter interfaces, I have a problem with archaic emulation of long obsolete hardware with in-band signaling.
Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Wednesday December 12, 2018 @10:08PM (#18669584)
Sorry, misunderstood. Yes, VT100 is rather archaic. Is there a more modern alternative?
Re:Windows Server 2019 Includes OpenSSH by AnIdiotOnTheNet on Wednesday December 12, 2018 @11:07PM (#18669784)
A modern console would use out of band signaling for things like cursor position, colors, size changes, etc. Windows consoles work like that using API calls, which is perhaps not ideal for quickly hacking things together but at least doesn't wig out on you if something throws arbitrary bytes into the stream.
Re:Windows Server 2019 Includes OpenSSH by grumpydba on Wednesday December 12, 2018 @02:20AM (#18661989)
However it is far too verbose and without aliasing everything it's a big pain in the a to use.
Re:Windows Server 2019 Includes OpenSSH by amaccuish on Wednesday December 12, 2018 @07:24AM (#18663291)
> I think it's time for MS to develop a new ANSI/VT-compliant...

They are doing exactly that: https://blogs.msdn.microsoft.com/commandline/2018/08/02/wind...

Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Wednesday December 12, 2018 @10:18AM (#18664586)
That’s not a shell. Pwershell, bash, and zsh are shells. A TTY/PTY is the infrastructure on top of which a shell runs.
Re:Windows Server 2019 Includes OpenSSH by amaccuish on Wednesday December 12, 2018 @11:07AM (#18665027)
The point was that there wasn't much they could do to make nicer shells if the backing text infrastructure was poor.
Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Wednesday December 12, 2018 @11:59AM (#18665503)
Right, but my point was that now that they've done the work on the infrastructure, a bash-like native Windows shell would be really great.
Re:Windows Server 2019 Includes OpenSSH by ocdtrekkie on Tuesday December 11, 2018 @10:18PM (#18661112)
I doubt you'd see Microsoft reinvent the wheel here. They'd more likely work to give WSL more ability to interact with Windows, and then let you just use that shell if you want to.
Re:Windows Server 2019 Includes OpenSSH by TimTheTinker on Tuesday December 11, 2018 @10:45PM (#18661226)
How likely is it that MS will include and enable WSL by default on Windows Server just to provide a better default shell for terminal and ssh users?

If I were a server admin, I’d probably turn all of that off because it’s more attack surface area. And cripple myself in the process. For that reason alone, I think a new shell is probably more likely to be helpful.

Re:Windows Server 2019 Includes OpenSSH by AnIdiotOnTheNet on Tuesday December 11, 2018 @11:12PM (#18661339)
You start with PowerShell and MSDN. Type "Get-" and start guessing at the thing you want to interact with and hit tab to see what's available.