file2 command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
file2: command not found
or when using sudo you get the following error message
sudo: file2: command not found
Solutions to file2: command not found
How To Fix file2: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu file2 is provided by file-kanji package.
file-kanji is:
This package contains file2 command. File2 command tests the classification of Japanese text files into JIS, UTF-8, EUC-JP, SJIS, ascii, and UNKNOWN. If the file package is installed, the file command is executed instead of UNKNOWN.
To fix this problem, we can install more using the command below.
sudo apt-get -y install file-kanji
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install file-kanji.
sudo apt -y install file-kanji
Or if you have aptitude installed you can use the following command.
sudo aptitude install file-kanji
Summary
In this tutorial we learn how to fix file2 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.