File Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian

File Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian

file

Determine file type.

Maintainer: Christoph Biedl



Section: utils

Install file

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

Determine file type.

How to use file?

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

Give a description of the type of the specified file. Works fine for files with no file extension:
file filenameClick to copy
Look inside a zipped file and determine the file type(s) inside:
file -z foo.zipClick to copy
Allow file to work with special or device files:
file -s filenameClick to copy
Don't stop at first file type match; keep going until the end of the file:
file -k filenameClick to copy
Determine the mime encoding type of a file:
file -i filenameClick to copy
Installation of latest file command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora and Raspbian. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.