2.8. Placing arbitrary artifacts in the system using the install command

Packagers often use the install command in cases when build automation tooling such as GNU make is not optimal; for example if the packaged program does not need extra overhead.

The install command is provided to the system by coreutils, which places the artifact to the specified directory in the file system with a specified set of permissions.

The following procedure uses the bello file that was previously created as the arbitrary artifact as a subject to this installation method.

Procédure

  1. Run the install command to place the bello file into the /usr/bin directory with permissions common for executable scripts:

    $ sudo install -m 0755 bello /usr/bin/bello

    As a result, bello is now located in the directory that is listed in the $PATH variable.

  2. Execute bello from any directory without specifying its full path:

    $ cd ~
    
    $ bello
    Hello World