How To Install Tail In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Tail In Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

tail

Display the last part of a file.

Maintainer: Michael Stone



Section: utils

Install tail

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

Display the last part of a file.

How to use tail?

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

Show last 'num' lines in file:
tail -n num fileClick to copy
Show all file since line 'num':
tail -n +num fileClick to copy
Show last 'num' bytes in file:
tail -c num fileClick to copy
Keep reading file until `Ctrl + C`:
tail -f fileClick to copy
Keep reading file until `Ctrl + C`, even if the file is rotated:
tail -F fileClick to copy
Installing tail 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 tail 2026 package in your OS.