Install Logger On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Install Logger On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

logger

Add messages to syslog (/var/log/syslog).

Maintainer: LaMont Jones


Section: utils

Install logger

  • Debian apt-get install bsdutils Click to copy
  • Ubuntu apt-get install bsdutils Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install bsdutils Click to copy
  • CentOS yum install util-linux Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install bsdutils Click to copy
  • macOS brew install util-linux Click to copy

Add messages to syslog (/var/log/syslog).

How to use logger?

Below are few example commands for logger that you can use in the terminal.

Log a message to syslog:
logger messageClick to copy
Take input from stdin and log to syslog:
echo log_entry | loggerClick to copy
Send the output to a remote syslog server running at a given port. Default port is 514:
echo log_entry | logger --server hostname --port portClick to copy
Use a specific tag for every line logged. Default is the name of logged in user:
echo log_entry | logger --tag tagClick to copy
Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options:
echo log_entry | logger --priority user.warningClick to copy
Installing logger command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS operating systems. Once you run the command it will install the latest version of logger 2026 package in your OS.