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.
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.
Why, oh why, would I install something that is: .NET .NET to exist in my system in the first place?
- slow
- bloated
- in all likelihood harvesting data behind your back
- trying to replace something which isn't broken (a Linux terminal)
- dependent on
on my machine? {deity_of_choice}, why would I even permit
To experience the stability and security you've come to expect from Microsoft Windows!
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.
"...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.
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.
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.
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
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.
your_soul.so
Can you install the VMWare cmdlets on it, or otherwise import them for use?
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.
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.
because vmware's perl sdk is sorely lacking. I hate having to have a wondows machine just to exec some vmware cmdlets.
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.
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.
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.
Comment removed based on user account deletion
Note that libyoursoul.so requires libyourwallet.so
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.
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.
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.
/|\ Hey, I think I found Lennart Poettering!
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
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:
Code:
Get-Help
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.
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. . . .
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:
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.
Digital Citizen
Powers hell.
IME it's a powerful but clunky piece of garbage.
My ism, it's full of beliefs.
How do you ask sed and grep your Azure and Amazon containers on the cloud?
http://saveie6.com/
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.
http://saveie6.com/
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.
... is about the dumbest fucking thing I have ever read.
Clickety Click
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.
EEE. They want to make Windows a Linux distro
No, MS wants to make Linux a Windows Distro, FTFY
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.
http://saveie6.com/
What do objects have to do with automation?
The world's burning. Moped Jesus spotted on I50. Details at 11.
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.
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.
http://saveie6.com/
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.
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.
http://saveie6.com/