To install LibSerial the current release package on many Linux distributions you may simply use the package manager associated with your distribution:

For Debian distrbutions:

sudo apt install libserial-dev

For Arch Linux distributions:

sudo pacman -S libserial-dev

To install LibSerial from source, first clone the repository at

Using https:

git clone

Using ssh:

git clone

Next, using make, execute the following commands from your libserial directory:

make -F Makefile.dist

To install the build to your /usr/local/ directory your may simply:

sudo make install

To install to another directory, simply use the prefix argument in the configure step above:

./configure --prefix=<DIRECTORY_NAME>

The code is also easily built using CMake via a bash script:


To install, change directories to the build directory and proceed as with make:

cd build/
sudo make install