How To Install Bat?

How To Install Bat?

bat

Print and concatenate files.
A `cat` clone with syntax highlighting and Git integration.

Maintainer: Debian Bacula Team



Section: utils

Install bat

  • Debian apt-get install bacula-console-qt Click to copy
  • Ubuntu apt-get install bacula-console-qt Click to copy
  • Arch Linux pacman -S bat Click to copy
  • Kali Linux apt-get install bacula-console-qt Click to copy
  • CentOS yum install bacula-console-bat Click to copy
  • Fedora dnf install bat Click to copy
  • Raspbian apt-get install bacula-console-qt Click to copy
  • macOS brew install bat Click to copy

Print and concatenate files. A `cat` clone with syntax highlighting and Git integration.

How to use bat?

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

Print the contents of a file to the standard output:
bat fileClick to copy
Concatenate several files into the target file:
bat file1 file2 > target_fileClick to copy
Append several files into the target file:
bat file1 file2 >> target_fileClick to copy
Number all output lines:
bat -n fileClick to copy
Syntax highlight a json file:
bat --language json file.jsonClick to copy
Display all supported languages:
bat --list-languagesClick to copy
Install the latest version of bat in Debian, Ubuntu, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the bat just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of bat from the respository and install it in your computer/server.