---
name: "utrans"
section: "1"
platform: "linux"
package: "utrans"
version: "0.7-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/utrans"
---

# utrans(1)

convert systemd units to generic unix equivalents

## NAME

`utrans` - convert systemd units to generic unix equivalents

## SYNOPSIS

`utrans [-b [=]<BACKEND>[,<BACKEND>]] [-f <TYPE>] [-h] [-v] <UNIT> <OUTPUT_DIR>`

## OPTIONS

The following commandline options are supported:-

- **-b \<BACKEND\>**

  load the specified backend(s). Can be a comma separated list. See *BACKENDS* below for further details.

- **-f \<TYPE\>**

  force; valid types are:

-

  **overwrite**: allow overwriting existing output files

- **-h**

  open manpage

- **-v**

  show version

## DESCRIPTION

`utrans` translates systemd services, sockets and timers to corresponding generic UNIX configuration and scripting as used in alternative settings that exclude systemd.

\<UNIT\> is the pathname for the unit file to translate.

- •

  Service units are converted to **[openrc-run(8)](/openrc-run/8.md)** service scripts.

- •

  Socket units are converted either to an **[xinetd(8)](/xinetd/8.md)** configuration or an **[openrc-run(8)](/openrc-run/8.md)** script using **[socket-activate(1)](/socket-activate/1.md)**, depending on the requirements of the socket.

- •

  Timer units are converted to a **[crontab(5)](/crontab/5.md)** fragment mapping **[systemd.time(7)](/systemd.time/7.md)** events to a **[cron(8)](/cron/8.md)**-compatible expressions.

## USAGE

`utrans` accepts two arguments: the **[systemd.unit(5)](/systemd.unit/5.md)** file (\<UNIT\>) and the output directory (\<OUTPUT\_DIR\>). The **[systemd.unit(5)](/systemd.unit/5.md)** file which can be one of **[systemd.service(5)](/systemd.service/5.md)**, **[systemd.socket(5)](/systemd.socket/5.md)** or **[systemd.timer(5)](/systemd.timer/5.md)**.

The script will create files in the following output subdirectories of \<OUTPUT\_DIR\> depending on the unit type:

| | |
| --- | --- |
| Unit | Output |
| Service | An **[openrc-run(8)](/openrc-run/8.md)** script is created in *init.d* and a complementary file is created in *conf.d* if needed, for sourcing additional additional environment variables. |
| Socket | Depending upon the socket's configuration, an **[xinetd(8)](/xinetd/8.md)** configuration fragment is created in *xinetd.d*, or an **[openrc-run(8)](/openrc-run/8.md)** script is created in *init.d* to start the service with **[socket-activate(1)](/socket-activate/1.md)**, . |
| Timer | A separate **[crontab(5)](/crontab/5.md)** fragment is created into *cron.d* for each timer unit. |

When the unit translation requires other units, then these are searched in the paths defined in the environment variable *$SYSTEMD\_UNIT\_PATH*, or in */usr/lib/system/system:/lib/systemd/system* by default.

## BACKENDS

Backends are used for producing different output for different settings. **utrans** finds and sources backend script fragments from the *$UTRANS\_DATA\_DIR/backends* directory or from */usr/share/utrans/backends* by default.

If the backend is prefixed with `=`, the default backends are not loaded.

The following backends are available:

| | | |
| --- | --- | --- |
| Backend | Unit | Notes |
| openrc | Service | Loaded by default |
| xinetd | Socket | Loaded by default |
| cron | Timer | Loaded by default |
| inetd | Socket | Only supports ListenStream and ListenDatagram using **[update-inetd(8)](/update-inetd/8.md)** |
| lsb | Service | Alpha quality support for scripts with LSB-style **[insserv(8)](/insserv/8.md)** headers |

Contributions of other backends are welcome: see *backends/README* for further details.

## LIMITATIONS

The following are known cases of poor or variant functionality:

- •

  Some special Executable Prefixes are ignored after warning.

- •

  Unescaping specifiers doesn't distinguish context: if you require a filesystem path, start the instance with '-'.

Patches are welcome at *https://git.devuan.org/LeePen/unit-translator*!

## SEE ALSO

[utrans-rc(1)](/utrans-rc/1.md), [openrc(8)](/openrc/8.md), [socket-activate(1)](/socket-activate/1.md)

## COPYRIGHT

BSD-2-Clause License *https://opensource.org/licenses/BSD-2-Clause*

Copyright (c) 2020, K Gopal Krishna.

Copyright (c) 2023-2024, Mark Hindley

## AUTHORS

K Gopal Krishna \<mail@kayg.org\> under the guidance of Benda Xu \<heroxbd@gentoo.org\>, Adam Borowski \<kilobyte@angband.pl\> and Mo Zhou \<lumin@debian.org\>.

This project was a part of Google Summer of Code, 2020.

Mark Hindley \<mark@hindley.org.uk\>
