News for hackers. Stuff that matters.
Re:eBPF on Windows by coolspot on Monday May 10, 2021 @02:08PM (#27108966)
And that is, kids, how MS Windows piece-by-piece was slowly transformed into a Linux distro.
Re:eBPF on Windows by dang on Monday May 10, 2021 @04:28PM (#27110515)
"Eschew flamebait. Avoid unrelated controversies and generic tangents." https://news.ycombinator.com/newsguidelines.html

Comments like this one take threads in predictable, uninteresting directions, and—what's worse—they often get upvoted, accumulating mass at the top of the thread and choking out the specific interesting stuff.

"Windows v Linux" is a classic example of a generic black hole, sucking passing spaceships into a state from which no light can emerge: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que....

To be fair, this is a co-creation between the comment and the upvotes, and the upvotes are more to blame. But the idea of that guideline is to refrain from introducing black holes in the first place, so the spaceship can poke around something interesting in the vicinity without collapsing, screaming, into an irreversible fate.

Related explanation here if anyone wants more: https://news.ycombinator.com/item?id=26894739. Note the point about diffs—that's key. Diffs are what's interesting!

Re:eBPF on Windows by coolspot on Tuesday May 11, 2021 @02:06AM (#27114742)
Oops, sorry about that!

Intention was to highlight how MS, that fought with *nix tooth and nail, now they are adopting more and more ideas from *nix, basically moving towards being best enterprise Linux.

Re:eBPF on Windows by pjmlp on Wednesday May 12, 2021 @02:22AM (#27127282)
You mean the company that used to have the best UNIX for PCs during the early 80's (Xenix), and a POSIX subsystem for NT/2000 for getting governement contracts?
Re:eBPF on Windows by tptacek on Monday May 10, 2021 @04:02PM (#27110236)
There's a lot of interesting stuff in this post, including a different architecture for verifying eBPF programs, so it's frustrating to see a bullshitting comment at the top of the thread. I don't like Windows either, but the virality of the eBPF (and dtrace) model is an interesting story that tells us stuff about what operating systems are going to look like 10 years from now, and we need to do better than comments like this.
Re:eBPF on Windows by etaioinshrdlu on Monday May 10, 2021 @02:32PM (#27109256)
I recently spun up a Windows EC2 server instance in aws, running the latest Windows, and was not impressed. The entire system is not very well set up for operation via SSH.

SSH is not even enabled by default on ec2. You have to Remote Desktop in, run a bunch of commands to enable it, and even then I could never figure out how to get authorized_keys to work.

Once you have SSH running, you can run commands via command prompt or powershell. Powershell is apparently pretty modern and well designed, but it's quite confusing if you're used to Unix.

A few applications I tried to install came as MSI's and they could not be installed via the command line, requiring the graphical interface.

It felt like a bad way to run a server. You want fast and lightweight remote access on a server, and you want scriptability. Windows was simply worse in this area.

Even if Windows was 100% compatible with Linux apps (including the modern CUDA deep learning stack...), I don't know why one would ever want to run Windows on a server. It lost the mindshare war, and I really see why. It really is that bad of an experience.

The main reason I've heard people use Windows server is because they are forced to because of app compatibility (no tech startup would find themselves in this position), or the preference of maintaining a server with clicking in the GUI (again, not a place most of us here find ourselves).

Anyways, I'd love to hear from someone, anyone, who likes Windows server more than Linux.

The point of this comment is also to state the opinion that Windows is currently a very bad Linux distro.

Re:eBPF on Windows by kwdc on Monday May 10, 2021 @03:33PM (#27109879)
I won't comment on the eBPF or WSL or even the Windows as linux debate, but I used to do some Windows admin.

Some clarifications are in order.

MSIs CAN be installed on servers with no gui required. Or much more commonly via powershell automation. Completely remotely and I'm not referring to remote desktop either.

I know its fun to complain about Windows, but really, if you're not using powershell and the right tools such as a Windows Domain, you're kind of like some kind of debian linux admin that refuses to use bash scripts / debian apt / ssh etc plus chef or similar management. It really is that kind of comparison you're making. What would you say about a linux admin that refused to use SSH or any scripting? You'd wonder why they are complaining.

Most of Windows Server comes alive when you join the machine to a domain and it gets access to actual infrastructure rather than some lone isolated server. This is to the point where you don't even need to log into the machine via remote desktop or ssh at all. In fact you manage the server from a completely different Windows machine with an admin account within the domain. You can then run the powershell script on your management computer and things happen on the target computer(s). I haven't even mentioned the multiple other tools you get as part of the machines being joined to a domain. Or you can deploy the script to the machine and execute it there. Still no remote desktop required.

Re:eBPF on Windows by EvanAnderson on Monday May 10, 2021 @04:32PM (#27110556)
I can't imagine how anybody manages any number of Windows machines w/o a domain. Even just an NT 4.0-style "downlevel" domain (hosted with Samba, if need be) made life so much easier "back in the day". Once Active Directory came out I never looked back. Group Policy makes so many Windows administration tasks reproducible and automated.

I keep meaning, year after year, to take at Samba and see how its Active Directory emulation functionality has progressed. I never end up getting around to it. Presumably, since so much of Active Directory is really just leveraging LDAP and a funky proprietary schema, it has progressed significantly.

I've had a hard time figuring out how to position Desired State Configuration. It feels like an appeal to Linux sysadmins used to Puppet, Chef, et al. I can already do everything it can do with Group Policy, and I'd want an Active Directory domain for single-sign-on anyway. I have a hard time coming up with a use case for learning all new tooling when I've already got AD and Group Policy.

Re:eBPF on Windows by corty on Monday May 10, 2021 @11:50PM (#27114033)
Group policy "automation" is painful and inconsistent. Parts are only applied on user login. Parts only on reboot. Parts instantly. Hard to impossible to know which is which. And no way to log off users or reboot machines via group policy, so you need remote logins anyways.
Re:eBPF on Windows by EvanAnderson on Tuesday May 11, 2021 @12:35AM (#27114245)
I'd argue it's just being familiar with the tools. I'm biased, no doubt. Windows sysadmin work has paid the lion's share of my bills since the late 90s.

I've been using Group Policy heavily since 1999 (during the Windows 2000 beta), so I'm used to knowing what applies when. Being familiar with which client-side extensions (CSEs) do which processing helps. The documentation for Microsoft's own functionality is reasonably good. Third-party software is a mixed bag.

Remotely rebooting machines is easy. There has been a remote shutdown API in Windows NT since the at least Windows NT 4.0 (and probably going all the way back to the beginning). Since Windows 2003 there has been a command line tool included to actually use the API. Likewise, there are command line methods to remotely logoff users, refresh Group Policy, etc.

Re:eBPF on Windows by kwdc on Tuesday May 11, 2021 @05:12AM (#27115916)
Re: rebooting is easy

Full agreement. We were remotely powering on/off hundreds of machines with a single command line. Then just a web page because we needed non-IT people doing it on regular basis.

We used to change wallpapers of certain groups of machines on a daily or even hourly basis due to special events. Do people really think we remotely logged into each one? Or manually remoted each one? Hmmm.

Next someone will be saying its impossible to get the event logs from each machine... truly bizarre. (Yes you can, and we did, even from client machines if a machine had developed "quirks")

Again, these complaints are just strange. Its as if they weren't using their infrastructure.

None of this is any kind of wizardry. I'd expect any linux or windows admin to know the tools required.

Re:eBPF on Windows by corty on Tuesday May 11, 2021 @09:32AM (#27117872)
Depends, event forwarding is quite weird and broken. Default settings delay and buffer events for quite some time so that an attacker can easily suppress unsent event buffers. Crashes are also usually missed because buffered events have not been sent in time. That can be configured down, but all the provided defaults are useless.

Also, encryption and authentication for log forwaring is bound to AD Kerberos credentials that frequently expire, leaving you without logs again.

Any old syslog client and server is far superior in all the aspects mentioned.

Re:eBPF on Windows by kwdc on Wednesday May 12, 2021 @12:09PM (#27131931)
Reading your comments it seems like you have had a bad time. I hope you moved over to linux or similar instead. Otherwise there's a lot of optimisation required in your AD with clean up of multiple areas required. Likely issues with network infrastructure as well.

Also, event forwarding isn’t the only way.

Re:eBPF on Windows by corty on Tuesday May 11, 2021 @09:06AM (#27117569)
I didn't claim that rebooting a Windows box is impossible or hard. It is just that group policies are no complete solution for anything, they are just a small and imho weird part.

Also, for a lot of things there is just no group policy you can set somewhere, so you are still in need of some "execute me that script that does the needful" in a lot of cases.

Re:eBPF on Windows by EvanAnderson on Tuesday May 11, 2021 @09:27AM (#27117812)
We have different experiences. Group Policy is a tool that I'm confident, in virtually any engagement, I can use to automate nearly all the goings-on of a Windows Server environment. Third-party software may not play well, but between the GPP CSEs and scripting, as necessary, I can get the job done. That's been my experience.

I'm not sure what to say re: "execute me that script that does the needful". That's going to hold true in any environment, Windows or Linux or whatever. If you've got third-party software that uses unique configuration persistence mechanisms, or doesn't work-and-play with the OS-provided management interfaces (Service Control Manager on Windows, systemd on Linux, etc) then you're going to have to script one-offs. Most real sysadmin work, in my opinion, involves leveraging or creating code and infrastructure to handle automating assemblages of software. Scripting is often how that's done. Configuration management tools add some formalism to the process, but it's still "glue and tape"-- albeit fancy.

Re:eBPF on Windows by corty on Tuesday May 11, 2021 @10:20AM (#27118412)
I think Group Policies are a very incomplete, partial solution. As you said, you usually have to combine it with a few more things to get the job done, and that is how any sysadmin job works. But: You need not only a one-off-script to make things really work.

You need a script that is idempotent, so you can execute it on all your machines and maybe do a retry or two if some are unreachable or an error happens. So the script should not only change things it is supposed to change (e.g. append a configuration line somewhere) but also check if that action is necessary or already done (e.g. that line has already been appended). Then you maybe need to restart the respective service to reread it's configuration. But of course you wouldn't want to unnecessarily restart it, since that might be disruptive or expensive, so you have to check if that configuration has been changed or not before restarting. Then handle automatic application for machines that are currently offline, have just been installed or need a refresh. Add in a some templateing and parameters, different groups, logging success/failure and you are at quite a complex script.

Or rather, a script that no-one should write, because it is exactly what configuration management is supposed to do. If you are writing all that by hand for each one-off, you are doing it wrong because you are reinventing the wheel, and usually badly. If you aren't doing all that, you are missing important parts. So imho configuration management like puppet, salt, chef, … is table stakes for any kind of sysadmin work. I'm not familiar with Windows DSC, but I find it strange that you dismiss it as pandering to the Linux crowd.

Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @03:18PM (#27109694)
I like Windows Server more than Linux. I administer both of them, although I am more familiar with Windows Server which definitely plays a big part in my preference. But I think that's going to be the biggest part of anyone's preference.

Everything you complain about Windows Server not supporting is actually supported, but it was your unfamiliarity that was ultimately the issue. "Linux guy who is unfamiliar with Windows Server prefers Linux" isn't particularly shocking news.

Re:eBPF on Windows by jiggawatts on Monday May 10, 2021 @04:14PM (#27110343)
"When in Rome, do as the Romans do."

I don't complain that Linux is hard to administer with PowerShell. I learned SSH and Bash.

The reverse does not seem to be true, Linux admins generally expect everything to work exactly the same in Windows as in Linux.

A negative effect of this is that Windows has many recent hires working on some of their teams with mostly Linux experience, and they're copying Linuxisms into Windows bug-for-bug. Even if it makes no sense in Windows.

A recent example that boiled my blood is that the new Windows Terminal emulates the incorrect "Clear-Host" behaviour of ancient Linux terminals. It doesn't clear the virtual terminal any more, just the current viewport. Before, it was a convenient way to reset the terminal's display state without resetting variables. NOW, it just deletes some of the display state, so if you scroll back you get scrambled garbage.

This is not a small thing: it's significantly impacting my workflow. I've seen garbage output, overwritten output, scrolling back accidentally corrupts the output completely, you name it. This is not a coding error, this is correctly copying a limitation of some terrible terminal from the 1960s nobody should give a shit about in 2021.

Worse: If you look back at the history of the debate around fixing this, as far back as the early 1990s there were Linux people advocating for fixing this! It's obviously broken.

Then: When the same debate came up in the Windows Terminal issue tracker, people making the same rational, logical arguments were shot down with: "We have to copy the standard."

Hint: There is no "standard". This is not an RFC. It's just what Linux does! Linux does this just because this is what some random MIT or Berkley student wrote in a hurry in the 1960s! If you make the argument that the majority of systems work some way or another, and that's a defacto standard... then Windows should win because it was used for the the vast majority of computing for many decades. Linux has taken over only recently, and only in some areas (Android and web servers).

Re:eBPF on Windows by DHowett on Monday May 10, 2021 @07:11PM (#27112046)
> A recent example that boiled my blood is that the new Windows Terminal emulates the incorrect "Clear-Host" behaviour of ancient Linux terminals.

Hi! I run the team who made this decision, and I flatly reject the characterization that these changes were made by "recent hires" who are "copying Linuxisms into Windows bug-for-bug."

The discussion you're referring to spans multiple threads, so I'm not certain the exact one you're referring to. I can, however, give some of my input:

1. We worked pretty hard to make sure that PowerShell's Clear-Host and CMD's "CLS", which operate on the entire scrollback buffer in the traditional console, are properly translated into a full buffer clear over SSH/in Terminal/etc.

2. Terminal fully supports CSI 3 J, a non-standard extension to the Erase in Display control sequence that clears the scrollback buffer. The handful of tools I am using that support "clear" actually seem to emit both "clear viewport" and "clear buffer." If you're using a version of clear that has been configured to NOT emit ED 3 (clear scrollback history) by default, that's simply not my team's fault. I've heard that you can use "clear -x" to affect your desired behavior.

It turns out that there being no true standard here plays to our advantage: we can support requests for all manner of clear, and trust that an application can be made to do the right thing. If you're using an application that can't be made to do the right thing per at least thirty other terminal emulators' designs--spanning more than just Windows and Linux, mind you--I apologize.

If you'd like to reopen that discussion here instead of on GitHub, you are more than welcome to.

Re:eBPF on Windows by jiggawatts on Monday May 10, 2021 @08:41PM (#27112801)
> Hi! I run the team who made this decision, and I flatly reject the characterization that these changes were made by "recent hires" who are "copying Linuxisms into Windows bug-for-bug."

Hi! I see Microsoft people on "docs.microsoft.com" use forward slashes now in examples that only work on Windows. So, there's that.

If I open the latest version of Windows Terminal, running PowerShell Core (not some Bash thing with some VTY codes or whatever) and I run "Clear-Host", I can scroll back and see content that wasn't cleared.

THIS BREAKS MY WORKFLOW. I used Clear-Host so I can run a command with pages out of output, and then I know that scrolling back will go back to that output only, not something that happened three hours ago but superficially looks identical.

If I do this with PowerShell 5.1 with the old Terminal, it works as expected. It works like it has for the last 40 years of DOS and Windows history.

PS: It's broken even worse in Visual Studio Code.

You guys outright abandoned your user base to pander to Linux users. On Windows. Linux users on Windows. That enormous, huge majority of your paying user base that is apparently more important that the hundreds of millions of people like me.

So yeah, you should reopen the issue and rethink your priorities...

Re:eBPF on Windows by RulerOf on Monday May 10, 2021 @09:33PM (#27113119)
>You guys outright abandoned you user base to pander to Linux users. On Windows. Linux users on Windows.

IMO they're going after developers using Macs. Linux (and Docker) runs better on Windows than it does on Mac OS. They're doing _something_ right.

Re:eBPF on Windows by jiggawatts on Tuesday May 11, 2021 @12:39AM (#27114271)
So you're saying that Linux developers on Macs are now Microsoft's target market?

Not Windows developers on Windows?

Re:eBPF on Windows by pjmlp on Tuesday May 11, 2021 @01:55AM (#27114693)
Basically it feels like going after the SV crowd coding with macs on starbucks.
Re:eBPF on Windows by jiggawatts on Tuesday May 11, 2021 @03:31AM (#27115286)
It feels like that Blizzard developer Wyatt Cheng that got on stage and asked the PC gamer crowd: "Do you guys not have phones?" https://www.youtube.com/watch?v=n5QRgpjfarY

The Windows Terminal guys are similar. "Do you have any plans at all to make this work for users of Windows?" "No."

Re:eBPF on Windows by pjmlp on Tuesday May 11, 2021 @04:47AM (#27115761)
I feel your pain, what used to be Visual Studio wizards are now CLI tools.

With luck you need to install VSCode and there is an extension to call said CLI.

Who needs VS designers or Blend for Windows UI development? Just recompile and run WinUI applications.

I really don't get it.

Re:eBPF on Windows by pjmlp on Monday May 10, 2021 @06:30PM (#27111677)
Those recent hires are also affecting how Visual Studio gets developed.

It is starting to become tiresome to get some CLI stuff instead of proper VS wizards.

Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @04:25PM (#27110487)
Microsoft is getting really lazy with their new "PowerShell for everything" mantra. Many examples with Windows Server and even the Azure Portal. It's great to have the ability to do things with both a GUI and CLI, but then arbitrarily limiting things to one or the other (usually the CLI) gets incredibly annoying.
Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:34PM (#27110572)
Lets limit GUI then :)
Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @04:46PM (#27110722)
Ha, that's actually what I'm complaining about. So many things that can only be done via CLI and there's no way to even know they're possible without crawling through documentation or (more often) finding somebody's blog post or a StackOverflow answer.
Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:50PM (#27110759)
PowerShell CLI is totally discoverable tho.
Re:eBPF on Windows by EvanAnderson on Monday May 10, 2021 @03:30PM (#27109835)
I'm probably pretty similar in experience to you. I "grew up" with Linux (and Xenix) in the early 90s, not being able to afford to buy Windows Server. I transitioned over to Windows Server around NT 3.51 and now handle both.

All the tooling for headless / remotely-manageable Windows is "in there" in 2008 and later. Prior versions required more jumping thru hoops to manage via command line, but Resource Kit tools helped.

Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @03:44PM (#27110036)
My server administration journey actually began with a pirated copy of Windows 2000 Advanced Server. And I don't feel bad for it, because having started very young with Windows Server has directly led to many tens/hundreds of thousands of dollars in licensing fees paid to Microsoft at my direction :)
Re:eBPF on Windows by EvanAnderson on Monday May 10, 2021 @04:06PM (#27110281)
You missed a lot of tedious reboots by starting your experience with the Windows NT family w/ Windows 2000. Windows NT 4.0 was a breath of fresh air, as far as the UI went, compared to NT 3.51, but Windows NT didn't really come into its own, in my opinion, until Windows 2000.

The tedious "re-apply the service pack and reboot" or "you thought about changing a setting, so therefore reboot" scenarios were nearly removed with Windows 2000. Having plug 'n play and hot-plug hardware work well was great, too.

Re:eBPF on Windows by pjmlp on Monday May 10, 2021 @04:25PM (#27110479)
I do mostly Windows, and given the option would rather keep doing so, however you just reminded me of the "fun" of writing ISAPI extensions on Windows 2000.

For those unaware of it, IIS used to execute fully on kernel level, so ISAPI extensions were comparable to device drivers, which meant any programming error would just kill the kernel, thus requiring a reboot.

So tracking down memory corruption issues on ISAPI extensions was bound to have a countless amount of reboots during the work day.

Re:eBPF on Windows by voidfunc on Monday May 10, 2021 @08:09PM (#27112568)
Goodness, who decided that was a good idea?!
Re:eBPF on Windows by EvanAnderson on Monday May 10, 2021 @08:37PM (#27112770)
Thr ISAPI modules don't run in kernel mode, but they're in-process with IIS (back in W2K) and it's a bit fraught.

I assumed that kernel-mode HTTP service was an answer by Microsoft to the "Tux" web server: https://en.m.wikipedia.org/wiki/TUX_web_server

Re:eBPF on Windows by pjc50 on Monday May 10, 2021 @04:14PM (#27110350)
> Everything you complain about Windows Server not supporting is actually supported, but it was your unfamiliarity that was ultimately the issue.

Funny, I've seen people saying exactly that when newbies bounce off some aspect of Linux, and in both cases it's a usability failure.

Discoverability of this stuff on Windows is terrible. Things like powershell remoting exist but getting them working between two random machines is opaque. Yes, some of it gets easier in a domain, and that's one of the big Windows wins (since the NIS/YP era), but domains are an extremely premium feature.

Re:eBPF on Windows by pjmlp on Monday May 10, 2021 @04:20PM (#27110428)
As if UNIX was any better with its archaic configuration files and cryptic commands to avoid typing one extra character.

Most of the stuff I learned about UNIX required actually buying books, not much different from Windows.

Drop someone on a proper UNIX just with man to see how far they go joining a NFS server or logging in via yellow pages.

Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:18PM (#27110395)
Its trivial without domain TBH.

If on workgroup, you just have to have the same user name on different machine and it works like in domain.

> Discoverability of this stuff on Windows is terrible

Meh... matter of taste and adequate Windows social skills, not a fact.

Re:eBPF on Windows by gerdesj on Monday May 10, 2021 @07:06PM (#27112001)
"If on workgroup, you just have to have the same user name on different machine and it works like in domain"

... and password. ... and no it doesn't really because an AD has a few other extras, such as Kerberos and an LDAP database with some odd ideas to chat to. You can of course spin up a Samba AD DC or two for a cheaper alternative.

Re:eBPF on Windows by jaywalk on Monday May 10, 2021 @04:20PM (#27110425)
I don't think comparing discoverability of features in Desktop Linux to Windows Server is fair at all.

And really, if you want to talk about discoverability between Linux in a server role and a Windows Server... Windows Server wins by an absolute landslide. But I don't think discoverability is all that important when you're talking about server administration.

Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:18PM (#27110407)
This. RTFM
Re:eBPF on Windows by coliveira on Monday May 10, 2021 @04:25PM (#27110481)
Windows OS is a thing of the past, when people were supposed to do most of their work from a desktop. As soon as computing become based on remote services, Windows lost its main reason to exist. It is Windows that needs to adapts to the new times, not people working on other OSs.
Re:eBPF on Windows by rasputnik6502 on Monday May 10, 2021 @06:44PM (#27111781)
It is the OS from the past and still most people use it on their computers. Because they are still doing things from the desktop. And I suppose they're happy not having to adapt to technology du jour again and again.
Re:eBPF on Windows by EvanAnderson on Monday May 10, 2021 @03:08PM (#27109606)
MSIs, if put together well, easily install silently from the command line.

msiexec /qn /i msi-name.msi

Edit (now that I have more time):

All the tooling to make Windows command-line manageable is there "out of the box".

In a former "life" I staged a Windows Server 2008 R2 install that was remotely manageable with SSH (using a third-party SSH server) "out of the box". Similar to a "kickstart" w/ the Anaconda installer, you're talking about chaining scripts to run after the installation to enable desired functionality. It wasn't much different than automating a Linux install.

If you enable the serial console you can do some nice command-line management of Windows VMs through your hypervisor's virtual serial port functionality too. I enjoy having the serial console open because I've been able to diagnose "hung" Windows machines (that is, not responding to GUI logon attempts) thru the console. It's very handy.

Re:eBPF on Windows by malkia on Monday May 10, 2021 @05:07PM (#27110910)
and /norestart too
Re:eBPF on Windows by nullify88 on Monday May 10, 2021 @03:18PM (#27109693)
Its about 5 lines of powershell to install and start OpenSSH. Maybe a few more if you want to automatically inject public keys. Well within possibilities of a user_data script that runs on the first boot of an AWS instance.

My main pain with OpenSSH on Windows was that its an older 7.7 Windows port that gets installed. However 8.1 is finally bundled as part of the recent KB5001391 and fixes some annoying bugs.

Re:eBPF on Windows by e12e on Monday May 10, 2021 @03:09PM (#27109610)
I seem to recall authorized_keys works as expected; it goes into %HOME%\.ssh\authorized_keys (I'm not sure/can't recall if there are some similar permission requirements). Anyway, that's eg: c:\users\mcgyver\.ssh\authorized_keys

And ssh needs a restart.

That said, windows remote management is traditionally via WMI, not powershell. But PS has come a long way, and ssh is a sane transport. And it can function as a tunnel for WMI, RDP and PS (ssh is easier to use for key based auth, disabling password auth).

Re:eBPF on Windows by mook on Monday May 10, 2021 @04:10PM (#27110310)
If you're a member of the administrators group, by default it uses something out of C:\ProgramData instead.

https://docs.microsoft.com/en-us/windows-server/administrati...

Re:eBPF on Windows by e12e on Monday May 10, 2021 @05:45PM (#27111251)
But of course, you're not running as Administrator, right? That's why we have runas... :)
Re:eBPF on Windows by Uehreka on Monday May 10, 2021 @02:58PM (#27109514)
In my experience, even MSIs can be run from the command line, but the amount of effort required to look this up and write a clean script is definitely way more than the equivalent Linux sysadmin task because Windows is just not expecting users to work this way at all.

My gripe with installing things on Linux is that every project assumes install means “build from source”, and it’s often annoyingly hard to find the exact yum/apt-get name for something (do I need a PPA? is the name thing, libthing, libthing-dev, libthing2, or something else?) But this is a much smaller issue than anything I run into with Windows Server.

Re:eBPF on Windows by agumonkey on Monday May 10, 2021 @04:17PM (#27110384)
> Powershell is apparently pretty modern and well designed, but it's quite confusing if you're used to Unix.

bash is pretty confusing eve if you're used to unix

-- Greg's

Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:25PM (#27110473)
Bash is simply outdated. It grown organically and thats what you got. Now you have zillion scripts and situation is even worst then with cobol.

PowerShell was made by Unix people after 2+ decades of bash experience. It solved hundreds of things.

Yet people complain it didn't solve few or it takes a bit more to load (no, verbosity = RTFM). You can't ever please I guess.

Re:eBPF on Windows by lunfard00 on Monday May 10, 2021 @07:02PM (#27111949)
Writing powershell scripts on vscode with the ps plugin is quite pleasant. Would recommend everyone to try it.
Re:eBPF on Windows by agumonkey on Monday May 10, 2021 @04:32PM (#27110562)
were powershell designers from the unix world ? I didn't know that

I don't mind bash warts, history is what it is, I don't sell powershell .. but someone saying powershell is confusing has serious jaws. powershell is really nice and only if you fancy sed/grep everything then you'll consider bash* superior

Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:40PM (#27110644)
> Sure, although, you know, my team – we all have deep UNIX backgrounds, before getting into NT, I was a UNIX development manager at Digital [Equipment Corporation], … worked on Ultrix, System 5.

https://www.networkworld.com/article/3110744/linuxcon-qa-wit...

Re:eBPF on Windows by agumonkey on Monday May 10, 2021 @05:57PM (#27111360)
oh wow, I had no idea

thanks for the link

Re:eBPF on Windows by Agingcoder on Monday May 10, 2021 @05:14PM (#27110970)
I don't think I want to compare them - I dislike them both! One is too basic and cryptic, the other one is overly complex for a shell, and in the end, I want to use neither.

I'm not sure what the ideal shell would look like though. Maybe an actual (simple and expressive) programming language with a way to 'lift' statements ?

Re:eBPF on Windows by agumonkey on Monday May 10, 2021 @05:58PM (#27111375)
oh my bad then, and the quest for an ideal shell / text user interface is a nice one. between lispy repls, to notebooks .. I guess there's a better solution that is both concise and fun yet not brittle.
Re:eBPF on Windows by rasputnik6502 on Monday May 10, 2021 @07:01PM (#27111939)
The situation gets worse every year with multitude new commanline utilities and scripts being created as part of new frameworks, languages and tools. And then everything gets mixed together to form some unstable, ever changing, inconsistent programming language.
Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @04:36PM (#27110603)
sed/grep/awk have nothing to do with bash tho and you can run them equally easy on Windows (cinst sed grep awk) if you like outdated reg ex.
Re:eBPF on Windows by agumonkey on Monday May 10, 2021 @05:56PM (#27111352)
yes they're not bash but they're an integral part of bash scripts pipe processing
Re:eBPF on Windows by majkinetor on Monday May 10, 2021 @06:10PM (#27111501)
They are "integral" only because shell is lacking those functions.

On some places tools are not there (docker image for example).

Some people complain about size of the dotNet runtime, but if you install all those tools bash "needs" for comfy usage, you can equally easy install dotNet.

Re:eBPF on Windows by agumonkey on Monday May 10, 2021 @06:17PM (#27111572)
I don't think that's right. unix users care a lot about streams of bytes as exchange format, powershell tried the object stream way, to avoid parsing manually stuff every time and also share some common bits (table formatting for free, map/filter for free too)

unix give you partial stuff for that like comm but it's just brittle

Re:eBPF on Windows by bostonsre on Monday May 10, 2021 @02:41PM (#27109339)
I don't use it in production but yea, I've read that automation for windows servers is mainly geared toward management with powershell. It's been a while since I've used it and it's definitely a lot different than bash, but it seemed petty elegant when I used it last. I like objected oriented programming, so having an object oriented shell was pretty neat.
Re:eBPF on Windows by vladvasiliu on Monday May 10, 2021 @02:56PM (#27109499)
But PowerShell feels so clunky and slow to me (disclosure: I'm used to Linux). If you want object-oriented automation tools, Python works much better on Linux. Granted, it's not a shell, but if we're talking automation, then it doesn't really matter.

I think the big issue for Windows is that most "admins" aren't in the habit of automating things, or at most they'll write a basic bat file. They still expect to click around their GUIs, so they'll be fairly reticent to install the Windows Server Core version [0]. "To be able to intervene in case something happens". The main issue with this is that they often aren't aware of possibilities offered only via PowerShell[1]. There's also the issue that when they look things over in the GUI, they won't see the configuration that's only visible through PowerShell.

---

[0] Windows Server Core comes without a GUI, but it can be managed remotely with the usual tools. However, not all server roles work on it. Remote Desktop Gateway is one such example, even though it doesn't have any "desktop" functionality.

[1] For example setting up split-view DNS. This is possible since Windows 2016, but only via PowerShell, and it's impossible to know from the GUI that it's activated. Also, this configuration doesn't replicate through ActiveDirectory.

Re:eBPF on Windows by recursive on Monday May 10, 2021 @02:53PM (#27109476)
I don't have much experience with Linux. All our customers (health care, mostly US) have Windows servers. Some of them have some Linux also, but that seems to be a minority. We need to be able to ship software they can run. Most of our development is windows-based.
Re:eBPF on Windows by nont on Monday May 10, 2021 @02:43PM (#27109368)
I think mostly they're forced to use Windows server because of their proprietary software like outlook, active directory, iis etc.

It was maybe easier to find people to support Windows servers... Just click here here and here to install.

Re:eBPF on Windows by cptskippy on Monday May 10, 2021 @02:57PM (#27109503)
All of the modern GUI is just a skin over powershell. Most server functionality/configuration isn't exposed through the GUI.
Re:eBPF on Windows by rasputnik6502 on Monday May 10, 2021 @06:18PM (#27111578)
I kinda like Windows server, mostly for the stability - both of the runtime and of functionality. Compared to Linux it requires less attention, i can concentrate more on software and less on the system: after two years of not touching i can still find configuration options in more or less same places. With Linux i have to re-learn quite a lot after not paying attention for a while. Missing good ssh/command line but not badly, I don't really need advanced shell scripting.
Re:eBPF on Windows by pjmlp on Monday May 10, 2021 @04:15PM (#27110358)
On the contrary, that is how Microsoft fixes the big mistake of not having kept POSIX subsytem around and improved it throughout the last 25 years.
Re:eBPF on Windows by criddell on Monday May 10, 2021 @04:21PM (#27110439)
I thought they agreed to not compete in the Unix world when they sold Xenix? Is it because SCO is dead that they can jump right into Linux?
Re:eBPF on Windows by encryptluks2 on Monday May 10, 2021 @02:41PM (#27109347)
They implement Linux functionality enough to suck at it and then the Windows users that try it thinks it is Linux that sucks and not Windows.
Re:eBPF on Windows by skinkestek on Monday May 10, 2021 @03:32PM (#27109865)
Let me tell you something interesting:

.Net Core programs run much faster on Linux.

Does that sound like something they would let happend if they wasn't serious about their Linux efforts?

That said: all is not good. For years there seems to be a fight going on in the wheelhouse.

One month it is: Microsoft, the reliable, reasonable vendor in a world full of Oracle and Google.

Next month it is: let's increase the cost for this small company by $10000 just because we can.

Next month: something admirable.

Next month: try to push Edge using some sleazy tactic learned from Googles Chrome push combined with resetting the defaults.

It must be frustrating for the guys who try so hard to drag the rest of Microsoft kicking and screaming into the future everytime some old guys gets up from the wheelchair and turn the weel all the way to the port side while the helmsman wasn't paying attention :-]

Re:eBPF on Windows by tux3 on Tuesday May 11, 2021 @07:14AM (#27116616)
>Does that sound like something they would let happend if they wasn't serious about their Linux efforts?

Hhhm I think the most remarkable parr is that it runs at all, really! .Net Core on Linux by itself shows plenty commitment.

The performance of it? Considering NT was only developped by a single company, has to maintains a lot of stable/legacy driver APIs, and seems to have been on the backburner for a few years, as a Linux user I'd find it very humbling if our kernel still came out behind :)

It's interesting to see where this is all converging. It'll be easier to run Linux tech on Windows, and all the MS legacy still runs.

But at the same time maybe they're familiarising their loyal userbase with the outside ecosystem a little more than they should. If new Windows users are encouraged to learn Linux ways, at some point you're making it easier for people to transition

Re:eBPF on Windows by zokula on Monday May 10, 2021 @11:09PM (#27113804)
Found the Micro$oft fanboy.
Re:eBPF on Windows by cptskippy on Monday May 10, 2021 @02:56PM (#27109493)
The Linux functionality is intended to allow Windows developers to develop for Linux and deploy to Linux.
Re:eBPF on Windows by encryptluks2 on Monday May 10, 2021 @04:18PM (#27110397)
Compiling on WSL2 would have terrible performance. WSL2 is just there to try to entice companies to say their developers shouldn't need to move to Linux or Mac. No one is seriously developing in WSL.
Re:eBPF on Windows by cptskippy on Monday May 10, 2021 @04:27PM (#27110503)
It's not really targeted at compiling either. Think line of business apps on web technology like .NET Core, PHP, Python, etc...

With WSL you can setup some docker containers or do some orchestration with Kubernetes and push it off to the cloud with minimal effort.

If you really want a full Linux environment you can spin up a VM in Hyper-V. WSL just makes it easier to do things where a VM is a hassle.

Re:eBPF on Windows by encryptluks2 on Monday May 10, 2021 @04:56PM (#27110808)
Docker containers don't run in WSL.
Re:eBPF on Windows by encryptluks2 on Monday May 10, 2021 @05:36PM (#27111169)
You still have to install Docker Desktop and enable the integration. You can't simply install docker in your WSL2 distro and use it.
Re:eBPF on Windows by nickstinemates on Tuesday May 11, 2021 @01:48PM (#27121151)
Not accurate. I don't have docker desktop and docker works fine for me in WSL2
Re:eBPF on Windows by nickstinemates on Monday May 10, 2021 @05:22PM (#27111042)
Re:eBPF on Windows by jhomedall on Monday May 10, 2021 @05:13PM (#27110964)
They do in WSL2, as I understand it.
Re:eBPF on Windows by encryptluks2 on Monday May 10, 2021 @05:38PM (#27111185)
Try it out... install Ubuntu using WSL2. Install docker using apt-get. See that it doesn't work without the Docker Desktop install for Windows and a special integration. Try running podman or other container-based solutions and see that they don't work.
Re:eBPF on Windows by jhomedall on Monday May 10, 2021 @08:19PM (#27112634)
Having followed the instructions from https://docs.docker.com/engine/install/ubuntu/, I was able to get this working fine. This is without Docker Desktop installed. It probably would have also worked with the version from distro repository.

  zed@ZED-PC:~$ sudo service docker start
   * Starting Docker: docker                      [ OK ]
  zed@ZED-PC:~$ sudo docker run hello-world
  Unable to find image 'hello-world:latest' locally
  latest: Pulling from library/hello-world
  b8dfde127a29: Pull complete
  Digest: sha256:f2266cbfc127c960fd30e76b7c792dc23b588c0db76233517e1891a4e357d519
  Status: Downloaded newer image for hello-world:latest
  
  Hello from Docker!
  This message shows that your installation appears to be working correctly.

The full output for 'docker run' was much longer, so I've snipped it down to size
Re:eBPF on Windows by encryptluks2 on Tuesday May 11, 2021 @04:45AM (#27115748)
Are you even on Windows? This is with WSL 2, as you can systemd doesn't work as expected in WSL2. This is a known issue. If systemd is working for you, then you are doing something magic:

  sudo systemctl start docker
  [sudo] password for u3332:
  System has not been booted with systemd as init system (PID 
  1). Can't operate.
  Failed to connect to bus: Host is down
https://stackoverflow.com/questions/55579342/why-systemd-is-...
Re:eBPF on Windows by jhomedall on Tuesday May 11, 2021 @08:49AM (#27117437)
From that link (permalink to answer: https://stackoverflow.com/a/61887923) :

> Nowadays you can try:

> sudo service docker start

> when using WSL2, if you are running on windows version 2004 or higher (I assume).

Which is what I did in the listing above.

Re:eBPF on Windows by encryptluks2 on Tuesday May 11, 2021 @10:57AM (#27118841)

  sudo service docker start
  [sudo] password for u3323:
  docker: unrecognized service
Re:eBPF on Windows by jhomedall on Tuesday May 11, 2021 @11:41AM (#27119467)
Did you install docker from their own PPA linked in the instructions above, and are you on Ubuntu 20.04 with WSL2? Those are the only steps I took.

e:

  ver
on 'cmd' also shows

  Microsoft Windows [Version 10.0.19042.928]
if that helps

e:

Everything except the service start, which I had to find in that StackOverflow thread. We've hit the max comment depth, so I couldn't response to you directly.

Re:eBPF on Windows by encryptluks2 on Tuesday May 11, 2021 @01:37PM (#27120992)
Are you referring to the install instructions for Ubuntu? No where does it mention running the commands:

  sudo service docker start
Re:eBPF on Windows by Liquid_Fire on Tuesday May 11, 2021 @06:11AM (#27116267)
If you run the Docker daemon manually, it works just fine. I'm running a container on it right now.

It's not a problem with Docker on WSL 2, but a problem with the way WSL uses its own init system instead of systemd, while some Ubuntu packages are packaged for a systemd system.

Re:eBPF on Windows by chokolad on Monday May 10, 2021 @04:38PM (#27110619)
> Compiling on WSL2 would have terrible performance.

define terrible. Compared to what ?

> No one is seriously developing in WSL.

A very strong statement. Do you have any proof perhaps ?

Re:eBPF on Windows by encryptluks2 on Monday May 10, 2021 @05:44PM (#27111244)
> define terrible. Compared to what ?

Terrible = significantly worse than a native Linux distro that doesn't use a file system integration layer.

> A very strong statement. Do you have any proof perhaps ?

Just experience working in the industry.

Re:eBPF on Windows by garethrowlands on Monday May 10, 2021 @06:23PM (#27111615)
> worse than a native Linux distro that doesn't use a file system integration layer

What filesystem integration layer?

Re:eBPF on Windows by encryptluks2 on Tuesday May 11, 2021 @04:49AM (#27115777)
Re:eBPF on Windows by garethrowlands on Tuesday May 11, 2021 @07:39AM (#27116825)
Yes, having your compiler on Linux access its files over plan9 would indeed have terrible performance. That's why Microsoft tell you not to do that.

Just run everything on the Linux kernel and compilation will be the same as on Linux. You do have a choice of where you put your files.

Re:eBPF on Windows by kube-system on Monday May 10, 2021 @04:26PM (#27110497)
Why would they need WSL2 to do that? AD and Office were and still are plenty enough to keep MS on corporate PCs.