- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
- Automatically mount an NVMe EBS volume in an EC2 Linux instance using fstab - Mon, Feb 21 2022
Note that PowerShell for Ubuntu is only available as Alpha version. Thus, not all features are implemented, and I suspect the package will contain a bug or two.
I installed PowerShell on a Ubuntu 16.04 VM on Azure, but the procedure should work on any installation. PowerShell is also available for Ubuntu 14.04, CentOS 7, Mac OS X, and Docker.
- The PowerShell package is dependent on two other Debian packages: libunwind8 and libicu55. You can install them with apt-get:
sudo apt-get install libunwind8 libicu55
- PowerShell is not yet available through the Ubuntu repositories. Thus, you have to download the PowerShell package manually from GitHub. If you run Linux in the cloud without GUI and web browser, you can download PowerShell with this command:
- Now you are ready to install the PowerShell package:
sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
- To start PowerShell, simply enter "powershell" and you can then execute PowerShell commands. You'll notice that I switched to a black background because by default PowerShell commands are displayed in yellow, which is not easy to read on a white background. Of course, you can also change the colors in your console or SSH client.
As mentioned above, PowerShell for Ubuntu is Alpha software, and you probably don't want to work with this release in a production environment.
The first problem I ran into was that the cursor flickered wildly while I typed PowerShell commands. This was probably because I was working in a remote session via SSH. I was testing with vSSH on a Mac, but I had the same problem with PuTTY under Windows. I also installed PowerShell on Max OS X, and in a local session, I had no problem with the cursor. I suppose the problem also wouldn't exist if you run PowerShell on a local Linux console.
Many PowerShell fans will wonder how a shell and scripting language that was developed for Windows could be useful on Linux. Most of the interesting providers are unavailable on Linux, and the popular open source OS already has a plethora of powerful shells.
What's more, the power of PowerShell comes from its object orientation, which is very useful on a GUI-oriented OS as Windows but is of little help on a text-based OS like Linux. Linux shells have mighty text manipulation features, and I somehow doubt that PowerShell can compete here.
However, I really love Microsoft's move to open source PowerShell. It is quite likely that the community will quickly add the features that PowerShell needs to compete with other Linux shells. The main advantage of PowerShell compared to Linux shells and scripting languages is that it is much easier to read and learn. Thus, I can imagine that PowerShell will rapidly gain popularity in the Linux ecosystem.
For me, the main thing is that you will be able to easily manage Windows via PowerShell Remoting from other operating systems (in particular Mac OS X) without the need to launch a Windows VM.
If you want to learn more about what you can and cannot do with PowerShell on Linux, please read this excellent article in the PowerShell magazine. I also recommend watching this video intro by Jeffrey Snover, the godfather of PowerShell.
Subscribe to 4sysops newsletter!
In my next post, I will show you how you can install PowerShell on Mac OS X.