The following small series for everyone to bring a detail of Ubuntu PowerShell (small white entry must see Tutorial). Small series feel very good, now share to everyone, also for everyone to make a reference. Let's take a look at it with a little knitting.
PowerShell started the open source cross-platform as early as last August, but has not tried it, called PowerShell Core.
Here is a brief introduction to how to install and simple to use, for the students who do not know the PowerShell Core on Ubuntu to provide a little help to get started, thank you for your support ~
PowerShell Core is an open source cross-platform task automation and configuration management system developed by Microsoft that runs on. Net Core.
1. Install the PowerShell Core on Ubuntu 16.04
A) Import public repository GPG key
Curl PACKAGES.MICROSOFT.COM/KEYS/MICROSOFT.ASC | sudo apt-key add-
b) Register Microsoft Ubuntu Repository
Curl Packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee/etc/apt/sources.list.d/microsoft.list
c) Update package
sudo apt-get update
d) Installing PowerShell
sudo apt-get install-y PowerShell
2. Use the PowerShell Core
A) Start PowerShell and check the PowerShell version:
b) Added some integration variables that can be used to determine the check system version:
c) Get the available modules:
d) Use of pipelines:
e) Use aliases:
f) use. NET class Library:
3. Basic command table
4. Considerations for PowerShell Core on Linux
A) Case sensitive
Windows is case-insensitive, so PowerShell on Windows is ignored. Linux is however case-sensitive. So PowerShell on Linux is generally ignored in case, but some operating system-level special values are case-sensitive (such as the names of some environment variables):
b) Aliases
PowerShell on Windows has some types of Linux aliases, such as LS, cat, man, etc, however, these aliases on Linux to prevent conflicts no longer exist, the following example, LS in Windows PowerShell is also an alias for Get-childitem, which is not found in the Linux PowerShell core:
5. Use visual Studio code for PowerShell scripting development
A) Install Visual studio:https://code.visualstudio.com/first.
b) Add the PowerShell plugin:
c) Now using this to write a PowerShell script is similar to the ISE in Windows:
D) More methods of use see: Code.visualstudio.com/docs.