# shutdown command

The shutdown BASIC program initiates an orderly system shutdown
 sequence, and should be executed before turning off or rebooting any D3 system.

## Syntax

```
 shutdown {(options}
```

## Parameter(s)

| options | f | UNIX Only Invokes a :files at the end, which initiates a full restore as an alternative to reloading from the options prompt. This option displays a notification that all data will be erased and prompts for a confirmation. |
| --- | --- | --- |

## Description

Critical files are checked for
consistency, any user logged on is logged off, all process workspaces
are released, all printers are stopped, all phantom jobs are logged
off, and all updated memory frames are written to disk. The system
is shut down. The critical files are:

mds,,

dm,users,

dm,,

dm,pibs,

dm,tcl-stack,

dm,devices

dm,backgrounds

The macro user-shutdown on the dm account
is executed, if it exists. This macro should contain any user-defined
procedure to be run at shutdown time (application cleanup, network
shutdown, and so on).

You will see the following message:
```
 Do you wish to continue (Y/N/0)?
```

where

| Y | Continues to shutdown. |
| --- | --- |
| N | Returns to D3. |
| 0 | Shuts down only if line 0. |

## Example(s)

```
 shutdown
```
**For UNIX**

 You will see this output:

```

 Shutting down "production:pick0"
 Do you wish to continue (Y/N/0)?
```
Note: `production:pick0` is the name of the
virtual machine.

**For Windows**

 You will see this output:

```

 Verifying integrity of critical files...
 Do you wish to continue (Y/N/0)?
```

## See also

- [power-off command](https://d3codex.com/tcl/power-off-command/)
- [u001f user exit](https://d3codex.com/pickbasic-flashbasic/u001f-user-exit/)
- [u60ba user exit](https://d3codex.com/pickbasic-flashbasic/u60ba-user-exit/)
- [user-shutdown macro](https://d3codex.com/tcl/user-shutdown-macro/)

---
Source: https://d3codex.com/tcl/shutdown-command/ - part of the D3Codex reference.
