Pages

Search

Sunday, January 28, 2018

Setup Terminal Profile in Linux for PowerShell 6



It's been a while since my last post, but there's a lot of exciting things happening already for PowerShell in 2018. So what better way than to kick off learning more PowerShell than to quickly access PowerShell when using a graphical environment on Linux!

Disclaimer: This tutorial is geared towards someone just getting started with Linux.

Setting up a terminal profile is easy, and it is something I recommend doing if you want to have a consistent experience for opening a PowerShell while using the GUI on Linux. I have outlined below a few screenshots and the steps required to setup a consistent profile experience. For the purposes of this tutorial, I’m using CentOS 7.4 GNOME3 Desktop Environment.


Pre-requisites:
  • You must have already installed PowerShell 6.0 for your Linux distribution.
Ready? Let’s begin:

  1. Open your Terminal or Konsole application and select File > New Profile.

  2. Go ahead and name your new profile “PowerShell” or whatever you like. Notice you can also adjust the size of the terminal that you want to have. This can be adjusted at any time in the future so don’t be worried if you end up with a smaller window at first.


  3. Now lets move to the Command tab. Again, you can use whatever title you wish, but for the purposes of this tutorial, we’ll set the Title of this new profile “PowerShell”.

  4. Next, under Command, select Run a customer command instead of my shell and enter in the Custom command: field “pwsh”. For preview editions, use "pwsh-preview".

  5. You can now open your new profile as show below. Don't forget to update help!


I hope you found this quick tutorial helpful. Happy Learning Linux & PowerShell 6!