All Ports Collection is stored at /usr/ports directory, according to their respective category-based directory. If you know the name of the port that you need, but don’t know which category it’s located, whereis command will be helpful:
whereis file_name
For example,
# whereis phpMyAdmin phpMyAdmin: /usr/ports/databases/phpMyAdmin
The whereis command returns the exact location of the port specified.
FreeBSD Ports Collection also has built-in search function. In /usr/ports directory (you need to be in /usr/ports directory to use the search mechanism), run make search name=program-name or make search key=keyword to search for a particular port.
For example,
# make search name="phpMyAdmin" # make search key="phpMyAdmin"
Note: Without the ” and ” will work too.
Both will return details of the ports matched, if any. One of the result if “Path”, which will tell you where is the port located.
The keyword search is a more in-depth searching that searches port names, comments, descriptions and dependencies. It can be used to find ports which relate to a particular subject if you do not know the name of the program you are looking for.
Alternatively, FreeBSD also maintains an up-to-date searchable list of all the available applications, arranged by category. You can search for your application by name and browse all applications that are within the category.
FreshPorts also allowed users to search for FreeBSD’s ports by keywords. FreshPorts tracks and lists the change made to the ports tree, and allows users to watch one or more ports, and can email you when your selected port has been updated.