DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > PowerShell on RHEL in One Minute

PowerShell on RHEL in One Minute

In this post, you'll learn how to install PowerShell on your Linux machine in one minute, that's right, literally one minute.

Don Schenck user avatar by
Don Schenck
·
Feb. 24, 17 · Web Dev Zone · Tutorial
Like (1)
Save
Tweet
5.52K Views

Join the DZone community and get the full member experience.

Join For Free

While not specifically related to .NET on Linux, PowerShell on Linux is available and — let’s face it — if you’re a Windows developer you’re using PowerShell.

If you’re not using PowerShell, now is the time to start. While bash is the traditional Linux shell, PowerShell gives you the advantage of objects. In PowerShell, everything is an object, with properties you can directly access. It’s also a very powerful object-oriented scripting language, with classes and methods, much like any OOP language.

Add to that the fact that you now have one scripting language for any platform, and PowerShell may (should in my not-so-humble opinion) become your shell and scripting language of choice.

(Hint: If you aren’t using PowerShell, here is your opportunity to turn your coding skills up to 11.)

Let’s take a minute and install PowerShell on your Red Hat Enterprise Linux machine. The installation is only three steps (one of which may be optional):

Step 1: Install Wget

sudo yum install -y wget

This installs the wget (web get?) command which allows you to download from the command line. This may already be installed on your machine, in which case this step is optional.

Step 2: Download the Package

wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.15/powershell-6.0.0_alpha.15-1.el7.centos.x86_64.rpm

This downloads the package into the current directory.

Step 3: Install Powershell

sudo yum install -y powershell-6.0.0_alpha.15-1.el7.centos.x86_64.rpm

This installs PowerShell.

Proving The Installation

To prove your installation, simply type powershell at the Linux command line. You should see a PowerShell prompt open up.

To see PowerShell in action, use any valid command. I like to use the basic Get-Processcommand.

That’s it. You’ve installed PowerShell on your RHEL machine. This can help minimize the learning curve of working in Linux and/or make your environments more similar.

PowerShell

Published at DZone with permission of Don Schenck, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Datafaker: An Alternative to Using Production Data
  • Container Orchestration Tools Comparison
  • Exhaustive JUNIT5 Testing with Combinations, Permutations, and Products
  • What Is Data Analytics? Understanding Data Analytics Techniques

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo