Spec-Zone.ru › Nushell

is-admin for core

Check if nushell is running with administrator or root privileges.

Signature

> is-admin {flags}

Input/output types:

input output
nothing bool

Examples

Return 'iamroot' if nushell is running with admin/root privileges, and 'iamnotroot' if not.

> if (is-admin) { "iamroot" } else { "iamnotroot" }
iamnotroot

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/is-admin.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API