• Contact Us
  • copyright
  • About Us
  • Privacy Policy
  • Devops
  • Linux
Globedrill

bash: apt-file: command not found. Install apt-file

Linux/15 Apr, 19/5892/1
Linux

bash: apt-file: command not found. How to Install apt-file command on Ubuntu server

 

I got the error ‘apt-file: command not found.’ while trying to search a file on my Ubuntu server. apt-file is a command used on Ubuntu/Debian server to search files in packages.

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.

Example :

# apt-file search telnet

# apt-file find telnet

 
Use “list|show” to list files in packages.

Example :

# apt-file list telnet

# apt-file show telnet

Type the command ‘apt-file --help to see all the options’

Comments

  • Reply
    Vik
    May 21, 2020 at 3:49 am

    Thanks

Leave a Reply Cancel reply

.

About Us

Globedrill.com is a website that publishes articles related to Linux and Devops. Globedrill was started on April 2016.

Contact Us

Email : globedrill.c@gmail.com

Globedrill

Copyright © 2016 Globedrill. All Rights Reserved. The content in this website is copyrighted to Globedrill.com and may not be republished either online or offline.

  • About Us
  • Privacy Policy
  • Contact Us
  • copyright