3

I am rather new to Debian file system placing convention. I see that configuration files for applications are usually stored in /etc/{application_name}/

Is this a "go-to" place when storing actual files of the application?

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
Maxim V. Pavlov
  • 663
  • 3
  • 11
  • 29
  • Just for a thought, but look for an applications that uses a similar technologies to what you are creating that are already in the Debian repo. Look at the structure and layout and then follow the examples from other applications. – Zoredache Aug 25 '15 at 17:35
  • Related (or perhaps duplicate): [Should I install Linux applications in /var or /opt?](http://serverfault.com/a/96420/218590) – masegaloeh Aug 26 '15 at 03:18

3 Answers3

5

Packaged application have their own locations, typicall under /usr/ or /var/lib/, with executables (or links to them) under /bin/ or /usr/bin/

For self-compiled or self-written application, you can use /usr/local/bin/ for the executables and /usr/<appname>/ for the application itself (or its asset files).

Some more (albeit somewhat outdated) informations: https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • 1
    I guess you can find the most up to date and complete information in the official [refspec of the Linux Foundation LSB Workgroup](http://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html) – Henrik Pingel Aug 25 '15 at 18:27
3

This is covered in the Debian Policy Manual. According to the section on configuration files, generally acceptable locations are /etc or /etc/{app_name}.

James Sneeringer
  • 6,835
  • 24
  • 27
1

As mentioned above by shodanshok /usr/local is a good place to store an application that is not a package (deb, rpm). Hovewer, if you would rather have your app in one directory (instead of /usr/local/etc for config files, /usr/local/bin for executables), you can place it in /opt directory. This is often the directory of choice in case of apps that come with their own custom installers.

Konrad Gajewski
  • 1,518
  • 3
  • 15
  • 29