DZone
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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
What's in store for DevOps in 2023? Hear from the experts in our "DZone 2023 Preview: DevOps Edition" on Fri, Jan 27!
Save your seat
  1. DZone
  2. Coding
  3. Languages
  4. 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 · Tutorial
Like (1)
Save
Tweet
Share
5.66K 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

  • Last Chance To Take the DZone 2023 DevOps Survey and Win $250! [Closes on 1/25 at 8 AM]
  • Unlocking the Power of Polymorphism in JavaScript: A Deep Dive
  • A Real-Time Supply Chain Control Tower Powered by Kafka
  • Spring Cloud: How To Deal With Microservice Configuration (Part 1)

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • 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: