Running PowerShell on Ubuntu · System & Process Management

System & Process Management

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.

Step 1 — List Running Processes (ps / Get-Process

Checking PowerShell version

Step 2 — Retrieve System Disk Details (df -h / Get-PSDrive

Get-Process example

Step 3 — List Running Processes Get-Process

Sorting processes by CPU usage

Step 4 — Sorting Processes

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.

Displaying top CPU usage processes
Filtering specific process

Step 5 — Searching for errors in syslog

ps aux output in PowerShell
Searching processes with grep
Hybrid PowerShell and Linux commands

Step 6 — echo, Write-Output, and Write-Host

Sorting and selecting process data

Step 7 — Running the manual documentation for the pwsh command

Viewing PID and session info
Inspecting resource usage

Step 8 — Running the Get-Help cmdlet for instructions

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.

Identifying system background processes

Step 9 — Review Active and Inactive systemd Services

This command lists all systemd service units on the system, showing whether each service is loaded, active, inactive, or no longer present.

Locating Linux daemons

Step 10 — Filter for Running systemd Services

Viewing related log content

Step 11 — Confirm OpenSSH Service Is Running

Viewing log content via Get-Content

Step 12 — Restart the SSH Service

Final system insight example

Back to Home