How To Install libbsd-dev on Kali Linux

In this tutorial we learn how to install libbsd-dev on Kali Linux. libbsd-dev is utility functions from BSD systems - development files

Introduction

In this tutorial we learn how to install libbsd-dev on Kali Linux.

What is libbsd-dev

libbsd-dev is:

This library provides some functions commonly available on BSD systems but not on others like GNU systems.

The currently provided functions are:

  • _time32_to_time, _time_to_time32, _time64_to_time, _time_to_time64, _time_to_long, _long_to_time, _time_to_int, _int_to_time.
  • TIMEVAL_TO_TIMESPEC, TIMESPEC_TO_TIMEVAL.
  • MD5Data, MD5End, MD5File, MD5FileChunk, MD5Final, MD5Init, MD5Pad, MD5Transform, MD5Update.
  • arc4random, arc4random_addrandom, arc4random_buf, arc4random_stir, arc4random_uniform.
  • bsd_getopt.
  • be16dec, be32dec, be64dec, le16dec, le32dec, le64dec.
  • be16enc, be32enc, be64enc, le16enc, le32enc, le64enc.
  • bit_alloc, bit_decl, bit_clear, bit_ffc, bit_ffs, bit_nclear, bit_nset, bit_set, bitstr_size, bit_test.
  • closefrom.
  • expand_number, dehumanize_number, humanize_number.
  • explicit_bzero.
  • errc, verrc, vwarnc, warnc.
  • fmtcheck.
  • fgetln, fparseln, fgetwln, flopen, flopenat, fpurge, funopen.
  • freezero.
  • getbsize.
  • getmode, setmode, strmode,
  • getpeereid.
  • getprogname, setprogname.
  • gid_from_group, group_from_gid.
  • heapsort, radixsort, mergesort, sradixsort.
  • nlist (ELF and a.out support).
  • pidfile_open, ppidfile_filen, oidfile_write, pidfile_close, pidfile_remove.
  • readpassphrase.
  • reallocarray, reallocf, recallocarray.
  • setproctitle (initialized via libbsd-ctor or setproctitle_init).
  • sl_init, sl_add, sl_free, sl_find.
  • strlcpy, strlcat.
  • strnstr.
  • nvis, snvis, stravis, strenvisx, strnunvis, strnunvisx, strnvis, strnvisx, strsenvisx, strsnvis, strsnvisx, strsvis, strsvisx, strunvis, strunvisx, strvis, strvisx, svis, unvis, vis.
  • strtoi, strtonum, strtou.
  • timeradd, timersub, timerclear, timerisset, timercmp.
  • timespecadd, timespecsub, timespecclear, timespecisset, timespeccmp.
  • uid_from_user, user_from_uid.
  • wcslcat, wcslcpy.

Also included are some queue macro definitions not present on includes from glibc.

There are three methods to install libbsd-dev on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libbsd-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libbsd-dev using apt-get by running the following command:

sudo apt-get -y install libbsd-dev

Install libbsd-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libbsd-dev using apt by running the following command:

sudo apt -y install libbsd-dev

Install libbsd-dev Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libbsd-dev using aptitude by running the following command:

sudo aptitude -y install libbsd-dev

How To Uninstall libbsd-dev on Kali Linux

To uninstall only the libbsd-dev package we can use the following command:

sudo apt-get remove libbsd-dev

Uninstall libbsd-dev And Its Dependencies

To uninstall libbsd-dev and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove libbsd-dev

Remove libbsd-dev Configurations and Data

To remove libbsd-dev configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge libbsd-dev

Remove libbsd-dev configuration, data, and all of its dependencies

We can use the following command to remove libbsd-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libbsd-dev

Dependencies

libbsd-dev have the following dependencies:

References

Summary

In this tutorial we learn how to install libbsd-dev package on Kali Linux using different package management tools: apt, apt-get and aptitude.