主要内容

slrtlinux.wsl.shutdown

R2026b

Shut down all or selected WSL distribution on Linux target device

Since R2026b

Description

slrtlinux.wsl.shutdown(distroName) shuts down the selected WSL distribution on the Linux target device. If the distribution name is omitted, the function shuts down all WSL virtual machines on the Linux target device.

example

Examples

collapse all

This example shows how to shut down all currently running WSL distributions or shut down the WSL distribution named SLRT.

slrtlinux.wsl.shutdown('SLRT'); % shut down WSL distribution named SLRT
slrtlinux.wsl.shutdown(); % shut down all WSL distributions

Input Arguments

collapse all

The optional WSL distribution name identifies the distribution to terminate. If this argument is omitted, all WSL distributions are shut down.

Example: 'SLRT'

Version History

Introduced in R2026b