I’m happy to share that I’ve been engaged on a enjoyable pastime undertaking! A PowerShell module designed to facilitate Linux system evaluation for PowerShell customers. With its standardized noun-verb instructions and object-based output, this module leverages the advantages of PowerShell to streamline evaluation and data gathering on a Linux system.
Set up it from the PowerShellGallery:
Set up-Module linuxinfo -Verbose
View it’s capabilities:
Get-Command -Module linuxinfo
CommandType Identify Model Supply
----------- ---- ------- ------
Perform Get-BatteryInfo 0.0.1 linuxinfo
Perform Get-ComputerInfo 0.0.1 linuxinfo
Perform Get-DisplayInfo 0.0.1 linuxinfo
Perform Get-FileSystemHelp 0.0.1 linuxinfo
Perform Get-NetworkInfo 0.0.1 linuxinfo
Perform Get-OSInfo 0.0.1 linuxinfo
Perform Get-SystemUptime 0.0.1 linuxinfo
Perform Get-USBInfo 0.0.1 linuxinfo
Get laptop info:
Get-ComputerInfo
BiosDate : 06/17/2022
BiosVendor : INSYDE Corp.
BiosVerson : 03.09
CPU : eleventh Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
CPUArchitecture : x86_64
CPUThreads : 8
CPUCores : 4
CPUSockets : 1
DistName : Fedora Linux
DistSupportURL : https://fedoraproject.org/
DiskSizeGb : {930, 16}
DiskFreeGb : {848, 16}
DiskUsedGb : 82
GPU : Intel Company TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)
DistVersion : 37 (KDE Plasma)
KernelRelease : 6.2.9-200.fc37.x86_64
OS : GNU/Linux
RAM : 31.9G
Getting the Working system info:
Get-OSInfo
DistName : Fedora Linux
DistVersion : 37 (KDE Plasma)
SupportURL : https://fedoraproject.org/
OS : GNU/Linux
KernelRelease : 6.2.9-200.fc37.x86_64
OSInstallDate : 2023-03-25
Past {Hardware} Data
There’s extra capabilities just like those described above, the place linuxinfo is parsing helpful system info and displaying the output as a PSCustomObject. Nevertheless, looking at a distinct sort of information:
Get-FileSystemHelp -All
Identify Worth
---- -----
root root customers residence listing
and many others system-global configuration information
mnt short-term mount factors
dev system information for {hardware} entry
bin important consumer binaries
run shops runtime info
decide elective utility software program packages
media mount level for exterior / detachable gadgets
misplaced+discovered shops corrupted filesystem information
usr consumer utilities and purposes
tmp short-term information
var variable information
lib system libraries and kernel modules
boot boot loader information
proc procfs - course of and kernel info
sys sysfs - gadgets and kernel info
srv companies knowledge directories
sbin important system binaries
residence customers residence directories
Get primary details about the linux filesystem utilizing PowerShell. Could be very helpful should you’re coming from a Home windows background.
The operate helps fast navigation utilizing the -Go
parameter, and displaying a richer assist message with the -Full
parameter.
Testing & Disclaimer
At the moment the module has been examined on Ubuntu and Fedora, so I’m pretty assured that it really works good on Debian & RHEL distributions.
Nevertheless I’ve executed no testing on arch linux, due to this fact I’m unsure how the expertise is there. It’s additionally in an early stage (model 0.0.1), with enchancment plans and new performance. Be sure you hop on the GitHub repo to be taught extra.
Purpose
I perceive that the use-case for one thing like linuxinfo is a bit restricted since Linux already has nice instruments for doing comparable duties. Nevertheless this undertaking is extra of a private journey into studying:
However most significantly, having some enjoyable with PowerShell and increasing the usefulness and worth of PowerShell.
I’d be glad should you’d prefer to strive it, and star the github repo should you really feel it’s value it.