Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

4.3 Finding Your Application

Before you can install any applications you need to know what you want, and what the application is called.

FreeBSD's list of available applications is growing all the time. Fortunately, there are a number of ways to find what you want:

  • The FreeBSD web site maintains an up-to-date searchable list of all the available applications, at https://www.FreeBSD.org/ports/. The ports are divided into categories, and you may either search for an application by name (if you know it), or see all the applications available in a category.

  • Dan Langille maintains FreshPorts, at https://www.FreshPorts.org/. FreshPorts tracks changes to the applications in the ports tree as they happen, allows you to “watch” one or more ports, and can send you email when they are updated.

  • If you do not know the name of the application you want, try using a site like FreshMeat (https://www.freshmeat.net/) to find an application, then check back at the FreeBSD site to see if the application has been ported yet.

  • If you know the exact name of the port, but just need to find out which category it is in, you can use the whereis(1) command. Simply type whereis file, where file is the program you want to install. If it is found on your system, you will be told where it is, as follows:

    # whereis lsof
    lsof: /usr/ports/sysutils/lsof
    

    This tells us that lsof (a system utility) can be found in the /usr/ports/sysutils/lsof directory.

  • Additionally, you can use a simple echo(1) statement to find where a port exists in the ports tree. For example:

    # echo /usr/ports/*/*lsof*
    /usr/ports/sysutils/lsof
    

    Note that this will return any matched files downloaded into the /usr/ports/distfiles directory.

  • Yet another way to find a particular port is by using the Ports Collection's built-in search mechanism. To use the search feature, you will need to be in the /usr/ports directory. Once in that directory, run make search name=program-name where program-name is the name of the program you want to find. For example, if you were looking for lsof:

    # cd /usr/ports
    # make search name=lsof
    Port:   lsof-4.56.4
    Path:   /usr/ports/sysutils/lsof
    Info:   Lists information about open files (similar to fstat(1))
    Maint:  [email protected]
    Index:  sysutils
    B-deps: 
    R-deps:
    

    The part of the output you want to pay particular attention to is the “Path:” line, since that tells you where to find the port. The other information provided is not needed in order to install the port, so it will not be covered here.

    For more in-depth searching you can also use make search key=string where string is some text to search for. This searches port names, comments, descriptions and dependencies and 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.

    In both of these cases, the search string is case-insensitive. Searching for “LSOF” will yield the same results as searching for “lsof”.


 
 
  Published under the terms of the FreeBSD Document Project