System and processes

The logger command

Writes a message to the system log (journal), with an optional tag.

Syntax

logger [-t etiqueta] <mensaje>

Most useful options

-tMessage tag

Copy-ready examples

$ logger prueba de registroWrite to the log

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Then check it with journalctl to confirm it went in.

Related commands

FAQ

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course