mellowtigger: (penguin coder)
[personal profile] mellowtigger
I didn't find anything online that completely addressed how to install the latest scripting toys on my Linux Mint system. Microsoft (to their credit) did provide lots of useful material that made it relatively painless. I just wanted to record those details here for posterity's sake, in case somebody else on the internet gives it a whirl later and could use some proverbial bread crumbs.

PowerShell version 7 is based on the new open-source .NET library. Yes, Microsoft is using open source for one of their most valuable intellectual properties.
  1. Figure out what version of Ubuntu you're using, which will affect which installer package you need.
    1. more /etc/os-release
      It shows you info about the current distribution, which in my case is Linux Mint 20.1.
    2. more /etc/upstream-release/lsb-release
      It shows you info about the "parent" distribution, which in my case is Ubuntu 20.04.
  2. Based on that Ubuntu version, choose the appropriate instructions on this Microsoft page:
    https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1
  3. That's good enough for a basic shell interface, but let's go fancy with the full Visual Studio Code experience. Follow their instructions again:
    https://code.visualstudio.com/docs/setup/linux
  4. Launch "code", then change it to the old fashioned powershell ISE experience.  I also approve of using text editors like Notepad on Windows, but I feel the urge tonight to modernize.
    1. Call up the Palette within Visual Studio Code by pressing CTL-ALT-P.
    2. Click on the listing for "PowerShell: Enable ISE Mode"
  5. In preparation for installing Desired State Configuration on Linux, you will probably need to update some packages like I did that depend on your version of OpenSSL. I didn't know about it, and I had to follow a nested dependency to solve it. To find out your system's version, use this straightforward command:
    1. openssl version
  6. Choose the correct package of Open Management Infrastructure (their version of the free cross-platform standard of CIM) to install, based on that OpenSSL version:
    https://github.com/Microsoft/omi
  7. Choose the correct package of Desired State Configuration to install, based on that OpenSSL version:
    https://github.com/Microsoft/PowerShell-DSC-for-Linux/releases/tag/v1.2.1-0

I'm pretty sure those are all of the tools that the cool kids are using, although DSC seems to go by other names in an Azure environment.  That part still confuses me greatly.  Anyway, someday after I've used it to do something interesting on my computer, I'll be sure to post some code samples.

Profile

mellowtigger: (Default)
mellowtigger

About

May 2025

S M T W T F S
    1 2 3
45 6 78910
11121314151617
18 19 2021 222324
25262728293031

Most Popular Tags

Powered by Dreamwidth Studios
Page generated 2025-May-24, Saturday 07:11 pm