#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-491

### Chapter 11. General Utilities

- Prev

  ISO Codes-4.20.1

- Next

  pinentry-1.3.2

- Up
- Home

# lsof-4.99.6

## Introduction to lsof

The lsof package is useful to LiSt Open Files for a given running application or process.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://github.com/lsof-org/lsof/releases/download/4.99.6/lsof-4.99.6.tar.gz

- Download MD5 sum: cae73a994aa9c075252b99bb6a613eaa

- Download size: 1.1 MB

- Estimated disk space required: 13 MB (with tests)

- Estimated build time: 0.6 SBU (with tests)

### lsof Dependencies

#### Required

libtirpc-1.3.7

#### Optional

Nmap-7.99 (with a symbolic link nc pointing to ncat in `/usr/bin`; used in tests)

## Kernel Configuration

To run the tests, the following option should be enabled in the kernel configuration:

    General setup --->
      [*] POSIX Message Queues                                        [POSIX_MQUEUE]

## Installation of lsof

Install lsof by running the following commands:

    ./configure --prefix=/usr --disable-static &&
    make

The tests should be run as the `root` user. They require that the POSIX message queues are enabled in the kernel, and that Nmap-7.99 be installed with a symbolic link `/usr/bin/nc` pointing to ncat.

    make check

Now, as the `root` user:

    make install

## Command Explanations

`--disable-static`: This switch prevents installation of static versions of the libraries.

## Contents

Installed Program: lsof
Installed Libraries: liblsof.so
Installed Directories: None

### Short Descriptions

lsof | lists open files for running processes
`liblsof.so` | contains an interface for applications to list open files

- Prev

  ISO Codes-4.20.1

- Next

  pinentry-1.3.2

- Up
- Home