• Skip to main content
  • Skip to primary sidebar

Technical Notes Of
Ehi Kioya

Technical Notes Of Ehi Kioya

  • About
  • Contact
MENUMENU
  • Blog Home
  • AWS, Azure, Cloud
  • Backend (Server-Side)
  • Frontend (Client-Side)
  • SharePoint
  • Tools & Resources
    • CM/IN Ruler
    • URL Decoder
    • Text Hasher
    • Word Count
    • IP Lookup
  • Linux & Servers
  • Zero Code Tech
  • WordPress
  • Musings
  • More
    Categories
    • Cloud
    • Server-Side
    • Front-End
    • SharePoint
    • Tools
    • Linux
    • Zero Code
    • WordPress
    • Musings
Home » AWS, Azure, Cloud » Installing PowerShell And Azure PowerShell On Ubuntu

Installing PowerShell And Azure PowerShell On Ubuntu

By Ehi Kioya 1 Comment

For quite some time now, PowerShell (which was originally a Windows-only component) has been open source and cross-platform.

This means you can now use it on Mac OS as well as on all the many different flavors and distributions of Linux.

I have previously written about how to install Azure PowerShell on Windows. Now, you can do the same for Linux.

Here’s how to install PowerShell Core followed by Azure PowerShell on your Ubuntu machine…

Installing PowerShell Core On Ubuntu

# Download the GNU Privacy Guard (GnuPG or GPG) keys
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb

# Register the GPG keys from the Microsoft repository
sudo dpkg -i packages-microsoft-prod.deb

# Routine update of packages
sudo apt-get update

# Now, enable the "universe" repos
sudo add-apt-repository universe

# Install PowerShell Core
sudo apt-get install -y powershell

# Routine upgrade of package
sudo apt-get upgrade powershell

This process was tested on Ubuntu 18.04.

If you’re installing PowerShell on Ubuntu 16.04, replace the text 18.04 with 16.04 on this line:

wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb

Now, let’s install Azure PowerShell…

Installing Azure PowerShell

# Run PowerShell
pwsh

# Install the PowerShell Az module
Install-Module -Name Az -AllowClobber

# Import the Az module to your profile
# Note that this module is ONLY available on YOUR profile (that is the profile used to run these commands)
Import-Module Az

# Exit PowerShell
exit

Found this article valuable? Want to show your appreciation? Here are some options:

  1. Spread the word! Use these buttons to share this link on your favorite social media sites.
  2. Help me share this on . . .

    • Facebook
    • Twitter
    • LinkedIn
    • Reddit
    • Tumblr
    • Pinterest
    • Pocket
    • Telegram
    • WhatsApp
    • Skype
  3. Sign up to join my audience and receive email notifications when I publish new content.
  4. Contribute by adding a comment using the comments section below.
  5. Follow me on Twitter, LinkedIn, and Facebook.

Related

Filed Under: AWS, Azure, Cloud, Backend (Server-Side), Cloud Computing, Linux & Servers, PowerShell Tagged With: Azure PowerShell, PowerShell, Ubuntu

About Ehi Kioya

I am a Toronto-based Software Engineer. I run this website as part hobby and part business.

To share your thoughts or get help with any of my posts, please drop a comment at the appropriate link.

You can contact me using the form on this page. I'm also on Twitter, LinkedIn, and Facebook.

Reader Interactions

Comments

  1. Roana says

    April 6, 2021 at 8:31 am

    hi
    this is really useful. Many thanks for this.

    i believe it would be helpful to have some actual examples to test how all that works.

    Cheers

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

23,737
Followers
Follow
30,000
Connections
Connect
14,568
Page Fans
Like
  • Recently   Popular   Posts   &   Pages
  • Actual Size Online Ruler Actual Size Online Ruler
    I created this page to measure your screen resolution and produce an online ruler of actual size. It's powered with JavaScript and HTML5.
  • How To Change A SharePoint List Or Library URL How To Change A SharePoint List Or Library URL
    All versions of the SharePoint user interface provide an option to change the title (or display name) of a list or library. Changing SharePoint library URL (or internal name), however, is not exactly very intuitive. We will discuss the process in this article.
  • WordPress Password Hash Generator WordPress Password Hash Generator
    With this WordPress Password Hash Generator, you can convert a password to its hash, and then set a new password directly in the database.
  • About
  • Contact

© 2022   ·   Ehi Kioya   ·   All Rights Reserved
Privacy Policy