Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PowerShell on RHEL in One Minute

DZone's Guide to

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.

· Web Dev Zone
Free Resource

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

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.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

Topics:
linux ,web dev ,powersh

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

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}