24.9 C
Guru Unix /Linux and GNU supporter

Install mlocate in FreeBSD

if you came from Linux word then is mlocate is very familiar for you , is one of the best ways to find files and Folders, in Linux the the package called mlocate and is you can install via Linux package management

In FreeBSD, the Package management cannot find mlocate command

root@osradar:~ # pkg  install  mlocate
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'mlocate' have been found in the repositories
root@osradar:~ #
- Advertisement -

not be disappointed

the mlocate command in installed by default in FreeBSD, but u have to rebuild the database first, maybe you are thinking updatedb should work . NOO!!

root@osradar:~ # updatedb
updatedb: Command not found.
root@osradar:~ #

mm! What is the command to rebuid mlocate the database in FreeBSD

I found that PC-BSD’s base configuration /etc/defaults/periodic.conf check if the weekly mlocate activated


Rebuid the database manually

[root@osradar /osradarweb]# /etc/periodic/weekly/310.locate

Rebuilding locate database:

it will take some minutes to make the DB ready, after that the mlocate command should work correctly.

[root@osradar ~]# locate  nagios4

Please Enjoy !!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


  1. ur article get many twists and turns, and the inpatient me repeat every mistake u made and finally found that the true answer is at bottom of the article. xD


Please enter your comment!
Please enter your name here

Latest article