---
title: is-admin
categories: |
core
version: 0.104.0
core: |
Check if nushell is running with administrator or root privileges.
usage: |
Check if nushell is running with administrator or root privileges.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->
# `is-admin` for [core](/commands/categories/core.md)
<div class='command-title'>Check if nushell is running with administrator or root privileges.</div>
## 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.
```nu
> if (is-admin) { "iamroot" } else { "iamnotroot" }
iamnotroot
```