---
name: "utx"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/utx"
---

# utx(8)

manage the user accounting database

## NAME

**utx** – manage the user accounting database

## SYNOPSIS

**utx** **boot**

**utx** **shutdown**

**utx** **rm** *identifier* *...*

## DESCRIPTION

The **utx** utility can be used to perform operations on the user accounting database, as done by [pututxline(3)](/pututxline/3.md).

The first argument to **utx** indicates an action to be performed:

- **boot**

  Write a boot time record to the user accounting database. This option should typically only be used by [rc(8)](/rc/8.md).

- **shutdown**

  Write a shutdown time record to the user accounting database. This option should typically only be used by [rc(8)](/rc/8.md).

- **rm**

  Remove stale sessions from the user accounting database, by referring to their *identifier*. Stale sessions can occur if a login service exits prematurely or fails to remove the session from the accounting database.

  Utilities such as [w(1)](/w/1.md) will not display the identifier corresponding with a login session, since its value is typically only of use by the process managing the record. The following command can be used to obtain all records from the user accounting database's active session table, including its identifiers:

  ```
  getent utmpx active
  ```

  Identifiers can either be supplied in hexadecimal form as displayed by [getent(1)](/getent/1.md), or as a string if the identifier allows such a representation.

Because this utility requires write-access to the user accounting database, its use is limited to the super-user.

## SEE ALSO

[getent(1)](/getent/1.md), [w(1)](/w/1.md), [pututxline(3)](/pututxline/3.md)

## HISTORY

The **utx** utility replaced **utxrm** in FreeBSD 10.0.

## AUTHORS

Ed Schouten ⟨*ed@FreeBSD.org*⟩
