Installing PowerShell

This installation is based on PowerShell 6, alpha 12 as the latest at the time of writing. The package can be downloaded from GitHub with yum, which will also install the dependencies (https://github.com/PowerShell/PowerShell/releases/latest):

  1. The following command will install PowerShell and any dependencies (libicu, libunwind, and uuid):
sudo yum install https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.12/powershell-6.0.0_alpha.12-1.el7.centos.x86_64.rpm 

alpha 12 is the latest release but it may not be when you read this.

  1. PowerShell can be immediately started by running the following command:
powershell 
  1. Create a few files in the home directory as a test:
Set-Location ~ 
1..10 | ForEach-Object { New-Item $_ -ItemType File } 
  1. The previous command creates 10 empty files named 1 to 10 (with no file extension). Ensure that the new files are now visible using Get-ChildItem:
Get-ChildItem 
ls versus Get-ChildItem:
On Windows, ls (list) in PowerShell is an alias for Get-ChildItem. On Linux, ls is the original command. See Get-Alias -Definition Get-ChildItem to view what still is.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.32.222