bash: apt-file: command not found. Install apt-file
bash: apt-file: command not found. How to Install apt-file command on Ubuntu server
Using apt-file you can find in which package the file is located. Using apt-file command, you can also list and see the files of a package without installing it.
1. Log into your Debian/Ubuntu server as ‘root’ user or as any user with sudo privilege
2. Run the command ‘sudo apt-get install apt-file’ to install apt-file package on your server
You will see the below after installing apt-file package on Ubuntu Server
“The system-wide cache is empty. You may want to run ‘apt-file update’
as root to update the cache”
3. After installing apt-file you must update it’s database by running the command ‘apt-file update’. ‘Apt-file update’ command will fetch files from apt-sources.
You can use “search|find” to Search file in packages.
# apt-file search telnet
# apt-file find telnet
Use “list|show” to list files in packages.
# apt-file list telnet
# apt-file show telnet
Type the command ‘apt-file --help to see all the options’