utx(8)

utx8

Manage the user accounting database

Usage

utx boot

utx shutdown

utx rm identifier ...

Overview

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

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).

shutdown

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

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) 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), 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.

Releases

30 releases since FreeBSD 10.0-RELEASE; the text changed 17 times.

  1. 10.0
  2. 10.1
  3. 10.2
  4. 10.3
  5. 10.4
  6. 11.0
  7. 11.1
  8. 11.2
  9. 11.3
  10. 11.4
  11. 12.0
  12. 12.1
  13. 12.2
  14. 12.3
  15. 12.4
  16. 13.0–13.2
  17. 13.3–15.1
  18. 16.0

History

The utx utility replaced utxrm in FreeBSD 10.0.

Authors

Ed Schouten ⟨[email protected]⟩

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.