Slashdot Mirror


Microsoft PowerShell Core For Linux Now Available as a Snap (betanews.com)

Canonical announced on Friday that Microsoft's PowerShell Core is now available on Linux platform as a Snap. From a report: If you aren't familiar, a Snap is essentially a packaged version of a program that can be easily installed on many Linux distributions. Many see it as the future of Linux, as it has the potential to reduce fragmentation. "Built on the .NET Framework, PowerShell is an open source task-based command-line shell and scripting language with the goal of being the ubiquitous language for managing hybrid cloud assets. It is designed specifically for system administrators and power-users to rapidly automate the administration of multiple operating systems and the processes related to the applications that run on those operating systems," says Canonical.

154 comments

  1. Excellent news by OneHundredAndTen · · Score: 5, Funny

    A piece of software that fills out a much-needed gap in the Linux world. Thanks, MIcrosoft; we could not expect any less from you.

    1. Re:Excellent news by cayenne8 · · Score: 4, Insightful

      I'm trying to figure out in what universe would a use case be made for replacing native, tried and true shells for Linux with some POS from MS?

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    2. Re:Excellent news by Anonymous Coward · · Score: 0

      LOL. Mod up!

    3. Re:Excellent news by Anonymous Coward · · Score: 0

      Because sed and awk are not masochistic enough.

    4. Re:Excellent news by Anonymous Coward · · Score: 0

      Masochism?

    5. Re:Excellent news by Anonymous Coward · · Score: 0

      EEE. They want to make Windows a Linux distro (and they need these little bits to do it)... and it will become the only Linux distro.

    6. Re:Excellent news by Hadlock · · Score: 1, Flamebait

      Object-oriented shell languages are pretty rad, very intuitive, has auto-complete/intellisense built in so that third party editors can take advantage of it, you don't need to know the syntax of sed/awk, and jq-type functionality works for free, supports package management etc. It's somewhere in-between perl and ruby as a shell.
       
      Probably will be largely ignored by the linux community, but by having powershell support in linux, you can take your windows-land scripts and execute them on linux without having to learn 1980s style bash syntax.
       
      You also get parallel instructions and multithreading, it's a proper language with classes and everything, it just happens to be focused on system operations and automating IT workflows.

      --
      moox. for a new generation.
    7. Re:Excellent news by Anonymous Coward · · Score: 0

      Not only that, but you can remotely reboot your coworker's computer while they're not looking. Priceless!

    8. Re:Excellent news by rstanley · · Score: 0

      There is no such universe! Only the warped mind of some incompetent Mickey$oft marketing idiot, with no basic knowledge of Linux!

    9. Re:Excellent news by Anonymous Coward · · Score: 0

      Windows admins get cranky without powershell. Serious. Yet try getting bash installed and they lose their shit.

    10. Re:Excellent news by Anonymous Coward · · Score: 0

      I'm trying to figure out in what universe would a use case be made for replacing native, tried and true shells for Linux with some POS from MS?

      Likely a script already written for Microsoft products, in Powershell. Not having to maintain two scripts would potentially be a net positive.

    11. Re:Excellent news by GoRK · · Score: 1

      I mean this stuff only works if you have programs and cmdlets that actually return and operate on such objects. Now, in addition to writing your powershell script, you also have to write wrapper libraries that control the native linux tools to present something that is API compatible with whatever windows api you are trying to use. Anyone who has tried to get a WinForms application running under Mono/Linux can tell you how well this shit is going to work.

    12. Re:Excellent news by Tough+Love · · Score: 2

      Object-oriented shell languages are pretty rad

      Sure, it's like an awkward substitute for a Python script if that floats your boat.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    13. Re:Excellent news by Anonymous Coward · · Score: 0

      Yawn, wake me when I can install the bash shell from an RPM.

      Oh wait, this is 2018, not 1996.

    14. Re:Excellent news by Anonymous Coward · · Score: 0

      Just to piss off immature fanbois like you that knee jerk at everything.
      Not every use case it YOUR use case.

    15. Re:Excellent news by bulled · · Score: 3, Interesting

      So what you want is xonsh then?

    16. Re:Excellent news by Anonymous Coward · · Score: 0

      No right-headed person on earth would call powershell "very intuitive". And bash "from the 1980s" has had completion before powershell was released. It will be ignored by the linux community because we have alternative ways to perform everything powershell does for the last 20 years spread over dozens of highly refined programs, shells and scripting languages that we get to combine based on preference and need.

    17. Re:Excellent news by Anonymous Coward · · Score: 0

      Except PowerShell doesn't even work well on even Windows due to intentional fragmentation. Depending on the Edition of Windows, and there's almost two dozen of them now for Win 10, certain PowerShell modules may or may not be available.

      I worked on a nice set of PowerShell scripts to configure IIS, Windows Features, Chocolatey packages, and about two dozen other things to automatically setup our dev environment. It worked perfectly for me with Server 2016, but then most of scripts didn't work on 10 Enterprise so we had to scrap my effort.

    18. Re:Excellent news by MightyMartian · · Score: 4, Insightful

      Most of the advantage of Powershell comes from access to WMI and other core API functions. As an actual shell goes, it's a horrible bloated monstrosity that is the exact opposite of the Unix philosophy. And without a lot of the hooks, or basically some compatibility layer to turn convert Windows API calls into /proc and /etc hooks, one can imagine it will be even slower than it is on Windows, and with limited functionality. And really, the whole philosophy of Powershell, with its OOP nature, comes out of its origins as basically a CLI for .NET. There really isn't anything comparable in the *nix world save perhaps for some of the GUIs out there.

      I get it. This is some way to try to attract a wider base to its toolset, and maybe a bit the other way, but I cannot imagine anyone going through the bloat of bringing up a Powershell script when something like bash will be that much faster and far more intuitive for someone steeped in the *nix world.

      Powershell and the whole way the Windows ecosystem is evolving makes truer every day that those who do not understand Unix are doomed to reimpliment it badly.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    19. Re:Excellent news by nnet · · Score: 2

      The universe where you don't need a Windows machine to run vmware powershell cmdlets because the vmware perl sdk isn't as functionally complete as the powershell sdk.

    20. Re:Excellent news by ausekilis · · Score: 1

      Embrace - They've integrated Bash and X-Windows into MS Windows with they Linux subsystem work in the past couple years.
      Extend - Lets take the most god-awful approach to system administration and add it to a simple (mostly) straight-forward shell.
      Extinguish - ??? How are they going to snub out 100+ distros and millions (billions?) of lines of open source floating in the ether?

    21. Re:Excellent news by Anonymous Coward · · Score: 0

      A universe where you didn't get the GP's sarcasm?

      A universe populated by Microsoft marketing people?

    22. Re:Excellent news by thegreatbob · · Score: 2

      As an actual shell goes, it's a horrible bloated monstrosity that is the exact opposite of the Unix philosophy.

      Ah, good ol' "Do many things, while aspiring to mediocrity, except when I don't feel like it, or on Tuesdays."

      --
      There is no XUL, only WebExtensions...
    23. Re:Excellent news by Maltheus · · Score: 2

      Powershell is bad enough, but having to run Windows, everytime you need to use it is even worse. And if your job requires you to deploy to the Azure cloud, then I can see a use for this. Although I believe they now have Linux CLI utils for that as well.

    24. Re:Excellent news by Anonymous Coward · · Score: 0

      > you can take your windows-land scripts and

      We are very different.

    25. Re:Excellent news by Anonymous Coward · · Score: 0

      Object-oriented shell languages are pretty rad

      Sure, it's like an awkward substitute for a Python script if that floats your boat.

      More like if a Python REPL was just good enough at routine shell work to pull double duty. That would make it a much more powerful admin tool. I’m truly surprised Linux admins don’t actually want something like that, or maybe it’s easier to be a critic than have a vision of your own.

    26. Re: Excellent news by Anonymous Coward · · Score: 0

      I canâ(TM)t even figure out what group of crack addicts thought powershell syntax was a good idea to begin with. How in the world does a language like this even take off. I am unenthused about the direction of computing as a whole :-/

    27. Re:Excellent news by grep+-v+'.*'+* · · Score: 1

      would a use case be made for replacing native, tried and true {tools} for Linux with some POS

      Oh, did someone mention SystemD?

      Mod me down, that's fine; I'm moving to FreeBSD. Hopefully S*D will stay working long enough while I plan and execute the move. Not on BTRFS ("But it works fine for me") volumes, either.

      --
      If the universe is someone's simulation -- does that mean the stars are just stuck pixels?
    28. Re:Excellent news by F.Ultra · · Score: 1

      Thanks for letting us know that it was not only music, films and babes that where better in the 1980s but also terminal syntax!

    29. Re:Excellent news by Anonymous Coward · · Score: 0

      You would be amazed at how many people equate computing with only Windows stuff. It has to do a lot with crappy universities who are literally paid by Microsoft to push only MS technology and never touch anything Linux. (I know for a fact that MS paid a university I attended to run Windows in their labs after they attempted to switch to Linux).

      Then, these people get into the field. And someone wants "Linux" servers. And, pointless tech like this gets used! Why re-educate people?

    30. Re:Excellent news by MrKaos · · Score: 2

      How are they going to snub out 100+ distros and millions (billions?) of lines of open source floating in the ether?

      systemd ;)

      --
      My ism, it's full of beliefs.
    31. Re:Excellent news by mikael · · Score: 1

      Because IT managers might only know Microsoft PowerShell, and so they will push to use it for the Linux systems under their control.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    32. Re: Excellent news by Billly+Gates · · Score: 1

      Easy object based systems like Azure and Windows servers where everything is an object, not a string or text file.

      PS is not a POS. It's just different as something like cygwin is not useful to do much on Windows in comparison as a result. This is welcome for DevOps and System Admins who manages multiple systems.

    33. Re:Excellent news by jrumney · · Score: 1

      Most of the advantage of Powershell is that it manages to improve on some of the deficiencies in CMD.exe. Plonked into Linux, the complete lack of support for pipes is going to be a show-stopper off the bat. I guess it might have advantages when dealing with systemd, but for traditional Unix commands it will fall flat.

    34. Re:Excellent news by MightyMartian · · Score: 1

      And for no -trivial automation tasks? At some point, if you're go to administer any system, you're going to have to learn how it works, and not just throw some poorly-fitting compatibility layer on top of it so system administrators of one system don't have to put the effort into learning another.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    35. Re:Excellent news by Your+Average+Joe · · Score: 1

      Next the MS sex-bot that has no holes and is adverse to sex. LOL no dilly bar and no roast beef. Not sure what the sex bot will do... But it is a new segment and they are panning on world domination!

      --
      Your Average Joe
    36. Re:Excellent news by Your+Average+Joe · · Score: 1

      No this is only for MS to manage Azure. they should have not doubled down on Windows and just switched Azure to run Linux... If coke on the third floor had to buy coke from the fourth floor they might just put Pepsi in the machines... Microsoft should have been broken up. I bet the OS guys would run MySQL and the MS-SQL guys would run Linux...

      Meanwhile when I asked the old GTE about upgrading the GTD-5 switch to support ISDN-BRI they said they could not it was too expensive as the fourth floor would not allow the third floor to use the software that they were responsible for. Also they had GSA contracts to sell that software and could not sell or use it without a Purchase Order. Very stupid and you see where GTE is today....

      --
      Your Average Joe
    37. Re:Excellent news by Your+Average+Joe · · Score: 1

      Windows is on the desktop... Moving to Samba 4.8 and 4.9, no need for MS file and print servers anymore. NASes are going to move that way too or already have. :-)

      --
      Your Average Joe
    38. Re:Excellent news by Your+Average+Joe · · Score: 1

      Good managers manage and let the technical details get worked out buy the techies. they might ask for details but the bigger goal is to get to a destination, don't micro-manage your techies, they will hate the job/supervisor and find another job...

      --
      Your Average Joe
    39. Re: Excellent news by Anonymous Coward · · Score: 0

      Sed and awk are not shells.

    40. Re:Excellent news by Anonymous Coward · · Score: 0

      I agree, sometimes is an hindrance making some silly tasks, sometimes I just end writing a small command instead of trying to figure out why I can't access some object property.

      I thought that the Winbuntu thing was supposed to add a more security to the windows server, why to port problems to it?

    41. Re:Excellent news by Anonymous Coward · · Score: 0

      Poor sods, some people are masochists, at least the few times I had to deal with PowerShell I counted with a coworker's experience and yet it wasn't as quick or easy as I thought it would be.

      There are some cool things you can do with it on windows, but... Linux already have easier ways to do that from the bash.

    42. Re: Excellent news by Anonymous Coward · · Score: 0

      Every object can be represented as text. After all, you can make PS dump the object state in human readable form.

    43. Re:Excellent news by Anonymous Coward · · Score: 0

      Does it support all the Microsoft viruses?

    44. Re:Excellent news by jmccue · · Score: 1

      I'm moving to FreeBSD.

      I have been slowly evaluating the various BSDs also with the the same idea in mind. But there are a few distros that are "fighting the good fight" :), but I fear that is a loosing battle. Beyond all evidence I still hope this windowization of Linux reverses or can be held off. So I want to be prepared if/when I have to move.

      I will stick with my distro of choice and hope for the best :) The good news is at least my favorite distro has been successful keeping sane!

    45. Re:Excellent news by Gadget_Guy · · Score: 1

      I call it intuitive. Sure, it you are trying it out after being used to using bash for the last 20 years then you are going to find things perplexing, but then you don't actually find bash intuitive either; you already have more experience in it. No shell is truely intuitive when you are first starting out.

      But where PowerShell is intuitive is in its predictability once you know some of it. The long naming scheme is much derided, but is uses a consistent - format so that if you want to do something that you haven't done before you can fairly easily guess at what the command name will be. If you can't figure it out then there is extensive built-in help to make it easy to find relevant command.

      The great feature of treating everything as objects is that it gives you great predictability. If I want to get the files that were created after a particular date then I would use

      dir | where CreationTime -gt $date

      If I can't remember whether the property to filter is CreationTime or Created, then I just type cr and it expands the property name based on the type of objects that I am filtering. If I wanted to look at all the time fields then I would type *time* and it would match the first property that contains time. Pressing tab again will find the next match.

      If I wanted to find all the people who were added to a database after this date then I could type

      mydatabasecommand | where CreationTimeField -gt $date

      I don't need to know different and obscure arguments for each command to sort or filter things, I just use the PowerShell's sort and where commands. Obviously database systems still allow to filter before the output to prevent potentially exporting hundreds of thousands of records, but this is just an example of how you can do some adhoc stuff with PowerShell.

      If I want to find new entries in a CSV file, I use

      Import-Csv file.csv | where CreationTimeField -gt $date

      The way PowerShell treats everything as an object is as powerful as the way *nix treats everything as files. Both methods normalise access to disparate systems on the computer. I put PowerShell on all my Linux systems, and I use whichever shell is the best for what I want to do at that time. There are some things where bash is better, and others where running PowerShell to do the task saves me a lot of time. PowerShell was the one thing that irritated me to lose when I began to migrate my PCs away from Windows after Microsoft started going downhill post-Windows 7.But when they released PowerShell for Linux and MacOS, I could have the best of both worlds.

    46. Re:Excellent news by Gadget_Guy · · Score: 1

      What do you mean about PowerShell's lack of pipes? The pipeline is PowerShell's biggest claim to fame. It is more powerful than the simplistic pipes of the other *nix shells, but still supports interacting with Linux programs. For example "man ls | grep the" does exactly the same thing in PowerShell as it does in bash.

    47. Re: Excellent news by Anonymous Coward · · Score: 0

      "Unix philosophy"
      You do not have this philosophy anymore thanks to SystemD

    48. Re: Excellent news by Anonymous Coward · · Score: 0

      A techie at my place that wants to use Linux can do one. There's not a single workload that can be ported over that can be done more cheaply with Linux and the astronomical wages those guys command despite the MS tax. Decent MS admins can be had for cents on the Dollar compared to a decent Linux admin, and MS stuff works solidly for the average corp. There are some corner cases where Linux is absolutely essential, but for your average enterprise Windows does it more reliably, cheaper, easier and faster. *As long as you have admins that actually know how to properly deploy Windows solutions. Admittedly there's a lot out there that don't read the literature and just next, next, next, finish, and don't really understand what they're doing.

    49. Re: Excellent news by Anonymous Coward · · Score: 0

      Don't be ridiculous. Just make sure your Windows Management Framework is up to date and you have 99.9% of everything available everywhere from server 2008 and up. If you somehow need that 0.1% so badly, even though it wasnt an available option when you first deployed your solution, it's about time you upgrade your server.

    50. Re: Excellent news by Anonymous Coward · · Score: 0

      If you can't figure it out then there is extensive built-in help to make it easy to find relevant command.

      Type:
      "man apropos" at the Linux shell prompt.

    51. Re:Excellent news by jrumney · · Score: 1
      I thought last time I tried to pipe in PowerShell it failed with a cryptic .NET error message. But when I tried now, it seems I was wrong about pipes, it is redirection to NUL that they have screwed up.

      out-file : FileStream was asked to open a device that was not a file. For support for devices like 'com1:' or 'lpt1:', call CreateFile, then use the FileStream constructors that take an OS handle as an IntPtr.

    52. Re:Excellent news by cayenne8 · · Score: 1

      dir | where CreationTime -gt $date

      Can you use "ls" instead of dir?

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    53. Re:Excellent news by sad_ · · Score: 1

      i think (and hope) the purpose is for admins that have a linux desktop but manage windows servers or use azure cloud.

      --
      On a long enough timeline, the survival rate for everyone drops to zero.
  2. Why? by devslash0 · · Score: 4, Insightful

    Why, oh why, would I install something that is:
    - slow
    - bloated
    - in all likelihood harvesting data behind your back
    - trying to replace something which isn't broken (a Linux terminal)
    - dependent on .NET
    on my machine? {deity_of_choice}, why would I even permit .NET to exist in my system in the first place?

    1. Re:Why? by Anonymous Coward · · Score: 0

      > in all likelihood harvesting data behind your back

      Read the source for yourself then. PowerShell Core is on Github.

    2. Re:Why? by Tough+Love · · Score: 3, Insightful

      I know right? It's weird, but It's what happens when Microsoft hires the Gnome mafia.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    3. Re:Why? by Anonymous Coward · · Score: 1

      Why, oh why, would I install something that is:

      - slow

      - bloated

      - in all likelihood harvesting data behind your back

      - trying to replace something which isn't broken (a Linux terminal)

      Yeah, we have systemd for all that already...

    4. Re:Why? by dyfet · · Score: 1

      Indeed, as a "ubiquitous language for managing hybrid cloud assets", there is, for just one example, ansible, which already does all that, is also cross platform, and has no special dependencies or runtime overhead requirements either on the host or any on the target.

    5. Re: Why? by Billly+Gates · · Score: 1

      Hi Devslash0 this is your boss posting.

      Are you finished migrating to Azure yet that the CIO wanted? Oh yeah we need a convenient way to DevOps your Linux app for the Windows Systems Admins that they are familiar with that integrated well with Azure and is object based for our needs, not text based which won't work.

      Thanks and could you also Dev ops some on premise Windows Servers as well? We know you like Linux and that is fine but make it happen in your Linux scripting environment?

      Thanks

    6. Re: Why? by devslash0 · · Score: 1

      I quit. ;-)

  3. Please explain by Anonymous Coward · · Score: 0

    We all want this because...?

    1. Re:Please explain by Anonymous Coward · · Score: 0

      ...because instead of writing brittle text parsing scripts, you get to use strongly-typed objects.

      That's good enough reason right there.

    2. Re:Please explain by nnet · · Score: 1

      because vmware's perl sdk is sorely lacking. I hate having to have a wondows machine just to exec some vmware cmdlets.

    3. Re:Please explain by Anonymous Coward · · Score: 1

      A few comments above someone mentioned that not even all Powershell scripts run on every version of Windows that includes Powershell...

      I still have bash scripts from years ago that still run and if one of them doesn't after an upgrade it's usually a rather simple fix... Now what was that about brittle?

      If your text parsing is brittle, you're doing it wrong.

    4. Re: Please explain by Billly+Gates · · Score: 1

      How do you ask sed and grep your Azure and Amazon containers on the cloud?

    5. Re: Please explain by Anonymous Coward · · Score: 0

      In UNIX the whole OS userspace and tools are extensions to the CLI.

  4. Run it with systemd by Anonymous Coward · · Score: 1

    To experience the stability and security you've come to expect from Microsoft Windows!

  5. How big is it? by Anonymous Coward · · Score: 0

    Merciful heavens! A Snap containing a .NET app, just to have an inferior shell?
    Looks like /bin/dash is about 119K on my system.

    1. Re:How big is it? by Anonymous Coward · · Score: 0

      58.8 MB
      ololololololol

    2. Re: How big is it? by Anonymous Coward · · Score: 0

      That is a rather personal question.

  6. Wrong! by Anonymous Coward · · Score: 0

    Traitors traditionally face a firing squad.

  7. Re:Trump will die in Federal prison a traitor by TimMD909 · · Score: 0

    If he isn't hung for treason before then.

    Are you off your meds?

  8. That's cool! by Anonymous Coward · · Score: 0

    So what is the fastest way to not install this (and DiagTra~1.exe)...?

  9. Everything is shit by OrangeTide · · Score: 0

    Because the Linux way of things is so much better, where binaries from one distro won't run on another because of ever so slightly different versions between libraries or changes to ABI. Shipping binaries for Ubuntu 16.04 and don't expect them to work correctly on 14.04 or 18.04. That is how we end up in situations where teams are locked to a specific version of a specific distro.

    --
    “Common sense is not so common.” — Voltaire
    1. Re:Everything is shit by Tough+Love · · Score: 1

      the Linux way of things is so much better, where binaries from one distro won't run on another because of ever so slightly different versions between libraries or changes to ABI

      Got specific examples or is it more fun to fart out generic claims cluelessly?

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    2. Re:Everything is shit by Anonymous Coward · · Score: 0

      That never happens on Windows.

    3. Re:Everything is shit by Anonymous Coward · · Score: 0

      That makes no sense. Just compile!

    4. Re:Everything is shit by bulled · · Score: 2

      So you are proposing that the best solution is to bundle all your dependencies into a single package with your target program and avoid getting the security updates that the distro provides for those dependencies. A snap requires that the user trust _each_ snap provider to update their snap for every fix to every dependency.

    5. Re:Everything is shit by OrangeTide · · Score: 1

      So you are proposing that the best solution is [...]

      The only thing I proposed is that it's all shit. So please don't put words in my mouth when I have been clear and concise on my position.

      --
      “Common sense is not so common.” — Voltaire
    6. Re:Everything is shit by MightyMartian · · Score: 1

      Ever heard of static linking? If it's that big a concern to you, then just throw it all in one binary. Or as one big ass self-contained application under /opt. But really, most developers out there know how to use the major distros package managers, so they take the extra 15 minutes it takes to convert and test an rpm as a deb file or whatever. Fuck me, but either you're an idiot, or the laziest human being alive.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    7. Re:Everything is shit by Junta · · Score: 1

      Well, if you build for Ubuntu 18.04 and then try to run on say RHEL6, then you are going to have fundamental challenges.

      However, if you build RHEL6, then generally that executable can run on Ubuntu 18.04, so a build system should target the oldest you want to support.

      This can also trip you up with Windows, but the releases are so infrequent by comparison that people don't notice it as much.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    8. Re:Everything is shit by Anonymous Coward · · Score: 0

      Are you talking about drivers (which would never be distributed as snaps anyway) or an actual program which apart from a couple of glibc symbols have typically been forward and backward compatibiry with very few exceptions? This is why *nix is made up of individual components that do one thing and do it well. Consistency.

    9. Re:Everything is shit by Anonymous Coward · · Score: 0

      That's funny... I still have binaries that come from a variety of different distributions running on, currently, Ubuntu 18.04. The oldest one being 'xv' (which came from an old RedHat 5.2 which came out in 1998).

      Yes, I had to take some libraries along the way, but luckily, a Unix allows multiple versions of the same library to be used without problems.

      Also $LD_LIBRARY_PATH is a thing if you really want to ship your own libs and don't want to dump them into /lib or /usr/lib.

      If you find yourselves locked into a specific distro, you're doing something very wrong.

    10. Re:Everything is shit by Tough+Love · · Score: 1

      Well, if you build for Ubuntu 18.04 and then try to run on say RHEL6, then you are going to have fundamental challenges.

      Build what?

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    11. Re:Everything is shit by Anonymous Coward · · Score: 0

      Ironically, most Linux stuff would port from one distro to another just fine if the goddamn library API/ABI were all consistent. Unfortunately, the bullshit versioning crap goes all the way down the chain to glibc itself; if you compile something against glibc-2.4, you'd better not even try to run it on a machine using glibc-2.1 or you'll get a pile of symbol not found errors where all the non-working symbols end in something like __GLIBC_2.2.5; why is this symbol versioning inside the C library even a thing? Don't get me started on fucking libpng, and I love how ncurses and ncursesw are different libraries, except even if I symlink libncurses.so.5 to libncursesw.so.6 the program trying to use ncurses always fucking works, so why is there a difference in the first place?!

    12. Re:Everything is shit by Hognoxious · · Score: 2

      /|\ Hey, I think I found Lennart Poettering!

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    13. Re: Everything is shit by Anonymous Coward · · Score: 0

      Uhh docker?

    14. Re: Everything is shit by Junta · · Score: 1

      Docker is not running software on other distros, it's running it on the same distro.

      It is of course a fair point that the ecosystem and capabilities of Linux lend itself better to container approaches, but the technical reality is that the approach is a workwround for the problem, rather than addressing the problem.

      Of course, here the 'problem' is that developers need to target the oldest version they should support, which isn't too terrible.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    15. Re:Everything is shit by Anonymous Coward · · Score: 0

      Static linking doesn't really exist on x86_64 because of vdso. But ignoring that, you won't be able to apply security updates to static binaries.

    16. Re: Everything is shit by Anonymous Coward · · Score: 0

      Unix, and operating systems of its era, originally exists to abstract the hardware into a virtual environment. It was much better to write some software to run as a user process in Unix, and share one expensive computer between multiple users. Than to have to carefully craft a program for each system you wish to run on. As without an operating system even the amount of RAM installed can make it difficult to run as you often had to manually construct your software's memory map and re-compile (or re-assemble).

      Eventually we got to a point where we got so bad at writing software that we couldn't use Unix's process abstraction, and had to put another abstraction on top of it like Docker, KVM, etc.

  10. i dunno by Anonymous Coward · · Score: 0

    I see a lot of sarcasm here... which is suprising because frankly, this is not what I have come to expect from people here.... lol

    Anyways, I don't see this as something trying to replace bash or anything else, Powershell has a lot going for it, especially in the .NET world, and in particular automating work on remote machines. With emerging things like .NET Core, it seems like it would be a tremendous asset if you happened to be running something lob written in .NET, in an environment that isn't running windows.

    If nothing it is designed to address doesn't apply to you, you very likely don't have a need for it. There's always SSH right? But to that end, with things like .NET core etc, I feel like shops that have always dealt with windows environments will naturally feel less intimidated with the now available linux support for server side apps, using deployment tools they're already trained in.

    1. Re:i dunno by MightyMartian · · Score: 1

      Because, of course, there's no way to do remote admin on Linux. Thank fucking god that Microsoft came along to help us all do what we've been doing on *nix systems for fucking decades.

      Jesus Christ, do any of you shills even know what's being going on in the *nix world since Windows was a 16-bit kludge running on top of DOS?

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:i dunno by Anonymous Coward · · Score: 0

      If nothing it is designed to address doesn't apply to you, you very likely don't have a need for it. There's always SSH right? But to that end, with things like .NET core etc, I feel like shops that have always dealt with windows environments will naturally feel less intimidated with the now available linux support for server side apps, using deployment tools they're already trained in.

    3. Re:i dunno by MightyMartian · · Score: 1

      Or they could take a few days, learn the *nix toolkit and then not have to invoke a shell that's going to have to load .NET, a bunch of libraries that will themselves have to be wrappers to replicate Win32 calls. It's going to be like Cygwin in reverse, and run just as badly.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    4. Re:i dunno by Anonymous Coward · · Score: 0

      I see exactly your point. But I don;t think this is the case. Rosyln (The .NET compiler) is open source and runs on linux. Understand that Mono (an open source implementation of .NET) has run natively on many operating systems for years, and especially since Microsoft Acquired that, they started providing ports to additional operating systems. .NET is compiled into an intermediate format, which runs against a .NET framework, like mono, and I'd be pretty surprised if much if any of powershell was unmanaged (for example, the mono implementation of .NET would have the sockets API natively linked for linux, whereas the framework in windows would be linked to the native windows API). It would be like building an app in Java, and then running it on any system that supported the java platform.

      I fully agree with you though, take a few days to learn something new, but my whole original point was simply, it's a platform that many developers already use, and now its support is extended to a new space. Which meshes really well since .NET Core etc is now gaining some popularity in the linux space.

      I'm glad you brought up Cygwin, I've secretly hated it for years. =)

    5. Re:i dunno by Anonymous Coward · · Score: 0

      since Microsoft Acquired that, they started providing ports to additional operating systems

      meant to say they started porting other products to additional operating systems, the .NET stack (like SQL Server etc) now runs on linux in addition to just windows

    6. Re:i dunno by MightyMartian · · Score: 1

      That's not really the point. The underlying APIs are very dissimilar and to replicate the kinds of calls PowerShell uses for automation is going to require some sort of translation layer to convert Linux system calls and the configurable settings in /proc and /etc. It's the inverse of Cygwin. I don't care if the whole thing gets compiled to binaries, there's going to be a hit on performance (and it's not like powershell is any speed demon even in a Windows environment). Those wrapper libraries are going to be pretty complex and I imagine you'll never get 100% portability, so you'll be left with all sorts of idiosyncrasies that still means a maintenance nightmare.

      I stopped using Cygwin for precisely that reason. Slow, kludgy and some things just don't work. When I'm in a Windows environment, I'll use PowerShell, because despite being a horribly verbose scripting language, it does work. But in *nix I'll use the GNU toolkit, even if Bash can get pretty nasty in its own way. Both shells are built for their environments.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    7. Re: i dunno by Billly+Gates · · Score: 2

      Explain then how to automate a few tasks on 100 Linux servers some on premise and some in the cloud without having to log into each one?

      Since Powershell is object based you can do more with a for each statement for 100 servers and use custom apis to work the magic without an expensive 3rd party tool. You can do a PSremote session if you want too or just use Azure RM or snmp without having to touch each server.

    8. Re: i dunno by MightyMartian · · Score: 1

      Plop the scripts into /use/local/bin on the machines in mirror fashion. Tools like ssh can be scripted as well. Come on, this ain't rocket science.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    9. Re: i dunno by Anonymous Coward · · Score: 0

      You use automation tools like ansible, puppet or such... Or write your own collection of scripts that does exactly what you want.

      As for logging in... Guess what your Powershell commands are doing? They just don't use SSH for it but something proprietary and do it less obviously, but it's still a log in when you look at it closely.

      Unless you want to imply that Powershell uses unsecured remote procedure calls... I seriously doubt it does since that would mean everyone could connect to your servers.

    10. Re: i dunno by aticus.finch · · Score: 1

      Explain then how to automate a few tasks on 100 Linux servers some on premise and some in the cloud without having to log into each one?

      We've been doing this for the last 20 years. What makes you think we suddenly lost this ability?

      See, this is the problem with "techies" who only know windows - they're so ignorant that they can't even recognise their ignorance. We've been automating tasks on 100's of linux servers just fine using Ansible or similar. Hell, you don't even need Ansible. If your servers already have the admin's public keys in authorized_hosts you can pretty much do anything from a script on the admin end.

      Since Powershell is object based you can do more with a for each statement for 100 servers and use custom apis to work the magic without an expensive 3rd party tool. You can do a PSremote session if you want too or just use Azure RM or snmp without having to touch each server.

      Hello Mr Windows Admin. Welcome to to the 90s.

    11. Re: i dunno by Billly+Gates · · Score: 1

      The fact that you have to use a third party tool because bash doesn't even support objects is breathtaking. It's 2018 and times change as do the needs of IT.

      I know more than just Windows and I am not saying that Powershell is a gift from the Gods and is the end all be all of scripting. I am just saying people here assume Unix is superior because it just is and the only way is a text file way and that 40 year old technology is the best because it's always been that way.

      Init was replaced by SystemD because in the modern world sys-init was not cloud, container, nor virtual ready. I just realized the haters here hated it because they couldn't use their text based tools like grep for reading log files. Let's forget the logs in SystemD are indexed already and are secure to prevent tampering because you can't write bash or use grep.

      Powershell was ported by Microsoft as System admins needed flexibility to use Azure for their Linux containers and virtual machines.

    12. Re: i dunno by Anonymous Coward · · Score: 0

      Oh billy, I thought we talked about this last time you gave an opinion about something you know nothing about. You suck at anything computer related, and should really not even say hi in a thread about linux.

    13. Re: i dunno by MightyMartian · · Score: 1

      What do objects have to do with automation?

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    14. Re: i dunno by Billly+Gates · · Score: 1

      Both Amazon, Azure, and Kubernetes all have apis for configuration, deployment, and testing that are object based. I personally think this is why Python is growing in IT. It is folks who find bash too limiting and have to resort to Python to work with these platforms and tools.

      PowerShell will help but I am in favor of a new Unix scripting language that can do objects. I have a feeling the same people who flipped over SystemD won't allow that to happen though. But that is another topic.

      As you can tell I think Bash was great for it's time and can do some cool things but many things in the Linux world are moving too fast (like Gnome, pulse audio) or are moving way to slow and are behind.

    15. Re: i dunno by aticus.finch · · Score: 1

      Both Amazon, Azure, and Kubernetes all have apis for configuration, deployment, and testing that are object based.

      And? They're not exclusively object based you moron. You can (and I do) use ssh+ansible to automate tasks on 100s of machines from a single local desktop.

      You were ignorant of the fact that automation on Linux using bash was being done for at least the past two decades using ssh, and thus the reason for your idiotic requirement of:

      Explain then how to automate a few tasks on 100 Linux servers some on premise and some in the cloud without having to log into each one?

      I understand your confusion - windows only got this sort of functionality recent, which is why I welcomed you to 1998.

      BTW: The powershell environment still has a long way to go to get anywhere near the utility of my Linux Bash environment. I expect that as powershell gains features that already existed in Linux+Bash you'll make similar idiotic claims. You're simply unaware of what can be done in a Linux environment, so when Windows gets these features you like you boast about them not realising that Linux had them all along.

    16. Re: i dunno by Billly+Gates · · Score: 1

      Let's read from the article "PowerShell Core from Microsoft is now available for Linux as a Snap. Built on the .NET Framework, PowerShell is an open source task-based command-line shell and scripting language with the goal of being the ubiquitous language for managing hybrid cloud assets. It is designed specifically for system administrators and power-users to rapidly automate the administration of multiple operating systems and the processes related to the applications that run on those operating systems. Says Canonical"

      So the maker of Ubuntu clearly stated Bash was inadaquite.

  11. PowersHell by Anonymous Coward · · Score: 0

    obligatory

  12. Nope, you can get hung OR shot. by Anonymous Coward · · Score: 0

    You can get either for treason actually. Hence the phrase "hanged for treason"

    1. Re:Nope, you can get hung OR shot. by Anonymous Coward · · Score: 0

      Indeed, the GP is full of shit. The three people executed for treason in the United States were all hanged; Moses Dunbar, Thomas Hickey, and William Bruce Mumford.

      The US rarely executes traitors, even Tokyo Rose only received a 10 year sentence and paroled after serving only six.

    2. Re:Nope, you can get hung OR shot. by Anonymous Coward · · Score: 0

      eh, i guess, technically. there are lots of capital offenses that cover treasonous activities. the rosenbergs were fried for "conspiracy to commit espionage."

  13. Administrating multiple OSes by TheDarkener · · Score: 1

    "...designed specifically for system administrators and power-users to rapidly automate the administration of multiple operating systems..."

    Oh you mean like how Windows has always treated dual-booting multiple operating systems? And support for filesystems of different operating systems? And pretty much any honest-to-goodness, not-embrace-and-extinguish support for *anything* other than M$ products on M$ operating systems, *especially* open-source products of any kind?

    As I do see this as a positive move for M$, they will have precisely 30 more years of about-facing until I trust them with my Linux boxen. Until then, I hope they don't screw up.

    --
    It is pitch black. You are likely to be eaten by a grue.
  14. What's the fuss? by Anonymous Coward · · Score: 0

    If you like M$ PowerShell and want to continue to use it on Linux.. great. YAT - Yet Another Tool.
    If you don't like it/don't want to use it - then DON'T!

    No one is making you use it.
    No one is even saying that you have to install it.

    If I was working as a sysadmin (either Linus or M$) I would think it great to have the same administrative scripting system on multiple platforms. If I was a Linux only shop - meh... no reason to learn something else as Bash is working just fine.

    Having used both (BASH and PowerShell) - I can say that they are both tortuous, but in different ways. They are both powerful, but in different ways. And both are products of their times.

    1. Re:What's the fuss? by telek83 · · Score: 1

      If you like M$ PowerShell and want to continue to use it on Linux.. great. YAT - Yet Another Tool. If you don't like it/don't want to use it - then DON'T!

      No one is making you use it. No one is even saying that you have to install it.

      If I was working as a sysadmin (either Linus or M$) I would think it great to have the same administrative scripting system on multiple platforms. If I was a Linux only shop - meh... no reason to learn something else as Bash is working just fine.

      Having used both (BASH and PowerShell) - I can say that they are both tortuous, but in different ways. They are both powerful, but in different ways. And both are products of their times.

      Ya kno, similar words were said about systemd... you don't have to use it... until you do... YAT is great don't get me wrong, but the moment some GUI dev requires PS it's no longer YAT... it will be forced down everyones throat.

  15. Snap by Anonymous Coward · · Score: 0

    "a packaged version of a program that can be easily installed on many Linux distributions"

    So a package then?

  16. That's not the gap. by Anonymous Coward · · Score: 1

    I really NEED a Microsoft Linux distro.

    Of course, with all the special Microsoft proprietary extensions.

    Microsoft GNome or Microsoft KDE. And obviously a Microsoft Linux Kernel.

    1. Re: That's not the gap. by Anonymous Coward · · Score: 0

      No we don't Lennart, and take your trash SystemD with you

  17. What dependencies? by Anonymous Coward · · Score: 0

    What dependencies could an MS package possibly have?

    1. Re:What dependencies? by Anonymous Coward · · Score: 1

      your_soul.so

    2. Re: What dependencies? by TimMD909 · · Score: 1

      Note that libyoursoul.so requires libyourwallet.so

  18. Re:snaps are rad by Anonymous Coward · · Score: 0

    It's also great to have a package with dependencies all statically linked so when you update your system you still end up with software that has out of date libs with security vulnerabilities!

  19. VMWare by nnet · · Score: 2

    Can you install the VMWare cmdlets on it, or otherwise import them for use?

    1. Re:VMWare by Anonymous Coward · · Score: 0

      # snap install powershell --classic
      # powershell -Command 'Install-Module -Name VMware.PowerCLI'

    2. Re:VMWare by Anonymous Coward · · Score: 0

      Yes you can:

      snap install powershell --classic
      pwsh
      Install-Module VMware.PowerCLI -Scope CurrentUser
      Connect-VIServer -Server 1.2.3.4

      Very handy! This is a tool for actual adults, not your average slashdot commentard apparently.

    3. Re:VMWare by nnet · · Score: 1

      Very nice, thanks!

  20. This is bizarre... by Junta · · Score: 1

    A *shell* as a snap seems to be an odd choice. It should be embedded in whatever environment.

    Powershell doesn't make sense as an end in and of itself, and 'Snap' and similar strategies only really possibly make sense for software that is an end in and of itself...

    --
    XML is like violence. If it doesn't solve the problem, use more.
  21. DirectX: liberate it for cross platform by Anonymous Coward · · Score: 0

    break the monopoly on gaming, M$, release DirectX for the world as FOSS. fund and promote OpenGL. anything less is just a camel nose under the tent of *nix as a way to gain power and EEE.

  22. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  23. In Soviet Russia ... by Anonymous Coward · · Score: 0

    Instead of you do automate it ...

    It automates you!!!

  24. No one cares by Anonymous Coward · · Score: 0

    MS PowerShell fanbois aren't going to use Linux and us old crusty Linux/Unix admins don't want to use PowerShell.

  25. Since at least Wednesday by RhettLivingston · · Score: 3, Interesting

    I installed this Wednesday to check out a challenge someone posted in a forum.

    The challenge was to implement the following powershell script using bash:

    param(
    [Parameter(Mandatory=$True)]
    [datetime]$FromDate,
    [Parameter(Mandatory=$True)]
    [datetime]$ToDate,
    [Parameter(Mandatory=$False)]
    [ValidateScript({Test-Path -PathType Container $_ })]
    [string]$Directory = '.'
    )
    Get-ChildItem -Include '*.JPG','*.PNG' -Recurse -Path $Directory | Where-Object { $_.CreationTimeUtc -ge $FromDate -and $_.CreationTimeUtc -le $ToDate } | ForEach-Object { $_.FullName }

    The challenge author also specified that the bash script should match the functionality of the above including:

    1. Output the full filename one per line that fulfills the requirements
    2. I'll totally run the script on a directory that contains some of the more exotic possible file names. (Good luck with that one)
    3. Define the parameters the script can take. Meaning two required parameters - FromDate and ToDate - and one optional parameter the directory. If no directory is specified just use the current one.
    4. Do validation of the passed in parameters. The directory should exist, the datetimes should be valid datetimes and not something else.
    5. And we certainly want tab completion for the parameters and a help that lists what parameters it takes. So the usual bash equivalent of this:
      Code:
      Get-Help .\test.ps1
      test.ps1 [-FromDate] [-ToDate] [[-Directory] ] []

    My first thought was, "I can get a bash script to run on any version of Windows and have been happily using bash and tcsh on Windows since Windows 95 in the 90s. Can that Powershell script run on Linux?" Surprisingly, I installed the powershell core snap, copied the script to test.ps1, and ran it with no issues. It doesn't convert me to powershell, but I was surprised the argument didn't hold.

    1. Re:Since at least Wednesday by whoever57 · · Score: 1

      The validation might take a few lines, but other than that, I see nothing that cannot easily be done with "find".

      --
      The real "Libtards" are the Libertarians!
    2. Re:Since at least Wednesday by RhettLivingston · · Score: 1

      I'd agree. find handles the actual performance of the operation pretty nicely. It was the named parameters, validation, and automatic provision of help that gives powershell a boost. Another nice thing, while using powershell interactively, there was autocompletion on parameter names for commands in the shell. And, I've had issues with find and other linux commands differing from system to system. This wouldn't be as vulnerable to that.

      I have to install cygwin on windows to use bash and all of the common GNU commands and I have to install powershell on linux or macOS to use it. So that is a wash.

      Ultimately, I'm not able to think of a great non-religion based plus or minus of one over the other when choosing a cross platform shell beyond knowing bash and not knowing powershell.

  26. Hmm... by fahrbot-bot · · Score: 2

    Snap ... Many see it as the future of Linux, ...

    And many don't. (but they did, back in the 1980s when static-linking was all the rage)

    PowerShell ... is designed specifically for system administrators and power-users to rapidly automate the administration of multiple operating systems ...

    Meaning: Windows, Windows Server ...

    --
    It must have been something you assimilated. . . .
    1. Re:Hmm... by Anonymous Coward · · Score: 0

      systemd, anyone?

  27. .NET is dangerous to depend on by jbn-o · · Score: 4, Insightful

    To elaborate on that last point: being dependent on works under the "Microsoft Patent Promise for .NET Libraries and Runtime Components" is considerably dangerous because of the profound limits for software reuse and modification, and because of how limited this "patent promise" is. You cannot deal in the "Microsoft Patent Promise for .NET Libraries and Runtime Components" covered software as you can with free software (which is so named because it respects a user's freedoms to run, inspect, share, and modify the software) under, say, the GNU General Public License version 3 (GPLv3). Here are a few highlights from that article:

    "[Under the Microsoft Patent Promise for .NET Libraries and Runtime Components] youâ(TM)re only protected if youâ(TM)re distributing the code "as part of either a .NET Runtime or as part of any application designed to run on a .NET Runtime". So if you add any of the code to another project, then you lose protection and MS reserves the right to use their patents against you.

    [...] the protection only applies to a "compliant implementation" of .NET. So if you want to remove some parts and make a streamlined framework for embedded devices, then your implementation wonâ(TM)t be compliant and the protection doesnâ(TM)t apply to you.

    That's a huge danger, particularly to anyone used to working in free software where merging code between compatibly-licensed programs is the norm. Your interests as a user (regardless of your technical skill or willingness to learn technical skills) is far better served by the GPLv3 (also covered at the aforementioned article). The GPLv3 is simply far more straightforward and clear about your permissions, and the GPLv3 grants you what you need to deal fully in the software respecting your software freedom the whole time.

    1. Re: .NET is dangerous to depend on by Billly+Gates · · Score: 1, Interesting

      Microsoft has released and opensourced
      NET for Linux time ago so your concerns are outdated.

    2. Re: .NET is dangerous to depend on by Anonymous Coward · · Score: 0

      Lol. This comment applies to pretty much everything your average stuck-in-1999 slashdot dweeb posts in any thread involving Microsoft.

  28. Powershell by MrKaos · · Score: 1

    Powers hell.

    IME it's a powerful but clunky piece of garbage.

    --
    My ism, it's full of beliefs.
  29. no one cares by Anonymous Coward · · Score: 0

    I already have a fucking shell that works great. Why would I ever use your fucking garbage?

  30. Suckers by Anonymous Coward · · Score: 0

    Clearly all of the comments I cared to read are poor souls stuck in the 2000s. Really, VMware, and multi-os shops, are the reasons people like this shit. There are so many jobs for cloud native apps you suckers just need to polish your resumes and get a pure Linux job. This shit is hilarious, and serves no purpose other than for Microsoft to try to stay relevant.

    1. Re: Suckers by Anonymous Coward · · Score: 0

      I'm OP and just checked hacker news, this article has 0 comments. Not saying that HN is the ultimate source of info for Linux, but I'd say there is close to no interest in this trash.

  31. No thanks by Anonymous Coward · · Score: 0

    So two evil companies released one shitty product packaged in another shitty product?

    No thanks.

  32. This ... by The_Dougster · · Score: 1

    ... is about the dumbest fucking thing I have ever read.

    --
    Clickety Click ...
  33. Not .Net by Anonymous Coward · · Score: 0

    Every .Net application I have tried has resulted in core dumps and crashes which were so frequent the apps were uninstalled. Once a day is too much and twice a week is enough to get on my nerves. No doubt this one will be a winner though. Ya right.

  34. How does that ol' mantra go ?.... by Anonymous Coward · · Score: 0

    "Embrace, Extend.... uuuuh

    uhhh....

    er.... .... EXTINGUISH!

    Those who fail to study the lessons of history... ...are doomed to make it up in summer school.

  35. Re:FTFY Excellent news by jmccue · · Score: 1

    EEE. They want to make Windows a Linux distro

    No, MS wants to make Linux a Windows Distro, FTFY

  36. Re:snaps are rad by Anonymous Coward · · Score: 0

    you get like 11 different copies of the same library

    Which isn't really a problem if you're using a deduplicating filesystem.

  37. Imperative. by Anonymous Coward · · Score: 0

    Paramount.