Hauptinhalt

slrtlinux.wsl.isRunning

R2026b

Check whether WSL distribution named SLRT is running

Since R2026b

Description

wsl_running = slrtlinux.wsl.isRunning() checks whether the WSL distribution named SLRT is currently running. The function returns true if the WSL distribution named SLRT is in the Running state, and the function returns false otherwise. The SLRT distribution must exist; if it does not, the function returns an error.

example

Examples

collapse all

This example checks the running status of the WSL distribution named SLRT.

tf = slrtlinux.wsl.isRunning()

Output Arguments

collapse all

The wsl_running value is true when the WSL distribution named SLRT is running, and the value is false if the distribution is stopped.

Example: true

Data Types: logical scalar

Version History

Introduced in R2026b