I am writing installation script for my program, which is supposed to run on Linux/Unix OS. What is the default directory for the following files:
- Executable files (programs). Program should be executed by typing its name from the command line.
- Shared libraries.
- Third-party shared libraries (the program is not open source, so I need to redistribute third-party libraries).
- Read-only program configuration files for all users.
- Configuration data available for read/write access for all users.
The listing varies depending on the Linux filesystem.
1)
/bin,/usr/bin,/usr/local/bin2/3)
/lib,/usr/lib,/usr/local/lib3./usr/share/lib4)
/etcis a read-only spot for configuration data.5)
/usr/local/etcor usually in the/homedirectory under the dot directory name, if the profile allows the bin directory to be located under the/home/user_id/binwhere ‘user_id’ is the relevant login id.. for an example for user ‘jdoe’, his configuration could be written to/home/jdoe/.configsor~/.configsDo not rely on this, for the most part the LSB filesystem dictates that there shall be at minimum:
/bin,/etc,/usr,/lib,/homeFor instance, the
/usrcould be on a different partition, likewise the same for/homeEdit: Thanks to dtrosset for pointing out my blooper….