• Skip to main content
  • Skip to primary sidebar

Technical Notes Of
Ehi Kioya

Technical Notes Of Ehi Kioya

  • Forums
  • 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

November 14, 2019 by Ehi Kioya Leave a 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

Leave a Reply Cancel reply

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

Primary Sidebar

26,207
Followers
Follow
30,000
Connections
Connect
14,641
Page Fans
Like

POPULAR   FORUM   TOPICS

  • How to find the title of a song without knowing the lyrics
  • Welcome Message
  • How To Change Or Remove The WordPress Login Error Message
  • The Art of Exploratory Data Analysis (Part 1)
  • Replacing The Default SQLite Database With PostgreSQL In Django
  • Getting Started with SQL: A Beginners Guide to Databases
  • The Best Web Safe Fonts In Web Development
  • What’s the fuss about HMAC Validation?
  • Data Science Insights: Regression Analysis
  • How to Implement Local SEO On Your Business Website And Drive Traffic
  • 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.
  • Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library
    This article explains how to bypass the single user remote desktop connection restriction on Windows 10 by using the RDP wrapper library.
  • 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.
  • Forums
  • About
  • Contact

© 2021   ·   Ehi Kioya   ·   All Rights Reserved
Privacy Policy