# ed machines services restart

> ed machines services restart in the Edith ed command line reference. Restarts one unit.

- Canonical URL: https://getedith.pro/docs/cli/machines-power/services-restart
- Updated: 2026-12-02

Restarts one unit.

```
ed machines services restart <machine> <unit> [--json]
```

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<machine>` | machine name, ssh alias or id | required | Which machine the unit lives on. |
| `<unit>` | unit name | required | The unit, for example `nginx.service`. |

## Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--json` | flag | off | Emit JSON on stdout instead of the human line. |
| `--help`, `-h` | flag | off | Print the help for this command on stdout and exit 0. |

```
$ ed machines services restart devbox nginx.service
restarted nginx.service on Devbox
```

## `--json` shape

```json
{
  "action": "restart",
  "applied": true,
  "machine": "Devbox",
  "unit": "nginx.service"
}
```

## Examples

```
ed machines services restart devbox nginx.service
ed machines devbox services restart docker.service
ed machines services restart devbox nginx.service --json
```

## Behaviour notes

`systemctl restart` on a stopped unit starts it, so this is the verb to reach
for when you do not care what state the unit was in. The 60 second timeout is
the one to watch: a unit with a slow `ExecStop` can outlast it, and the command
then reports a failure for something that finishes fine a moment later.

Only `start`, `stop` and `restart` exist. There is no `enable`, `disable`,
`reload`, `status` or `journal` verb; for those, use the raw form,
`ed devbox systemctl reload nginx` or `ed devbox journalctl -u nginx -n 100`.

## Where to go next

- [`ed machines power`](https://getedith.pro/docs/cli/machines-power), the rest of this group
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
