SCSIraidGURU’s World

I started watching the Powershell Core video on ITPro.TV.  I added it to my Ubuntu 18.04 server.

PS /etc/ssh> $PSVersionTable

Name Value
—- —–
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Linux 5.0.0-32-generic #34~18.04.2-Ubuntu SMP T…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Total commands in Powershell Core for Ubuntu 18.04

Get-Command | Measure-Object | Select-Object -Property Count

Count
—–
330

PS /home/michael> (df -h | Select-String -Pattern ‘/boot’ | Out-String).Split(‘%’)[0].Split(‘ ‘)[-1]
13


PS /home/michael> df -h
Filesystem Size Used Avail Use% Mounted on
udev 961M 0 961M 0% /dev
tmpfs 199M 2.3M 197M 2% /run
/dev/sdb1 59G 3.6G 53G 7% /
tmpfs 995M 8.0K 995M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 995M 0 995M 0% /sys/fs/cgroup
/dev/sda1 2.0G 227M 1.6G 13% /boot
tmpfs 199M 0 199M 0% /run/user/1000

PS /home/michael> Get-Module -ListAvailable


Directory: /opt/microsoft/powershell/6/Modules

ModuleType Version Name PSEdition ExportedCommands
———- ——- —- ——— —————-
Manifest 1.2.3.0 Microsoft.PowerShell.Archive Desk {Compress-Archive, Expand-Archive}
Manifest 6.1.0.0 Microsoft.PowerShell.Host Core {Start-Transcript, Stop-Transcript}
Manifest 6.1.0.0 Microsoft.PowerShell.Management Core {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path…}
Manifest 6.1.0.0 Microsoft.PowerShell.Security Core {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy, ConvertFrom-SecureString…}
Manifest 6.1.0.0 Microsoft.PowerShell.Utility Core {Export-Alias, Get-Alias, Import-Alias, New-Alias…}
Script 1.3.2 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script 2.1.3 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}
Script 0.0 PSDesiredStateConfiguration Desk {ValidateNodeManager, ValidateNoNameNodeResources, ThrowError, ValidateNodeResourceSo…
Script 2.0.0 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get…
Binary 1.1.2 ThreadJob Desk Start-ThreadJob

PS /home/michael> get-process apache2

NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
—— —– —– —— — — ———–
0 0.00 30.39 0.71 1696 …96 apache2
0 0.00 16.04 0.00 1739 …96 apache2
0 0.00 16.04 0.04 1740 …96 apache2
0 0.00 16.04 0.00 1741 …96 apache2
0 0.00 16.04 0.00 1742 …96 apache2
0 0.00 16.04 0.00 1743 …96 apache2

PS /home/michael> get-process mysqld

NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
—— —– —– —— — — ———–
0 0.00 82.07 9.75 1546 …46 mysqld

PS /home/michael> get-process *php*

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ——    —–      —–     ——      —  — ———–
      0     0.00      28.91       0.99    1157 …57 php-fpm7.3
      0     0.00      14.00       0.00    1747 …57 php-fpm7.3
      0     0.00      14.00       0.00    1748 …57 php-fpm7.3

Close Menu