PowerShell provides powerful tools for monitoring system performance, inspecting running processes, sorting output, and filtering results — all from within the Ubuntu terminal. This section demonstrates how to retrieve system information, sort CPU usage, and search for specific processes.
ps / Get-Process
df -h / Get-PSDrive
Get-Process
By piping Get-Process into Sort-Object, you can sort active processes by CPU time or memory usage. This example sorts by CPU descending to reveal the most resource-intensive processes.
You can combine Sort-Object with Select-Object -First N
to display only the top processes.
This is an excellent lightweight alternative to running top or htop.
Running the Get-Help cmdlet is pretty much the on-demand technical manual
It is used to display information about PowerShell concepts and commands, including cmdlets, functions, aliases, and scripts.
PowerShell is a "discovery-based" shell, the Get-Help cmdlet is designed so you don't have to memorize every command; you only need to know how to ask the system for instructions.
This command lists all systemd service units on the system, showing whether each service is loaded, active, inactive, or no longer present.