Questions tagged [fhs]
Filesystem Hierarchy Standard
121
questions
3
votes
2
answers
158
views
Does the location of package-installed udev rules differ across Linux distributions?
Alongside an RPM package, I have been preparing a DEB package for some software which requires the installation of some udev rules.
My RPM package installs the rules in /usr/lib/udev/rules.d. My ...
0
votes
0
answers
25
views
Where can I view all distros currently compliant with the Linux Filesystem Hierarchy Standard?
The Linux Filesystem Hierarchy Standard hasn't been updated since 2015. I'm assuming a lot has changed in the ecosystem since then, and because of this, certain distros may/may not be compliant with ...
0
votes
0
answers
31
views
Can I check for FHS compliance to a specific version?
I am using Alpine 3.6.12 in a container for development. Is there a way to check for compatibility against FHS 3.0?
1
vote
1
answer
43
views
Misunderstanding of a rule about /boot folder (FHS)
In Filesystem Hierarchy Standard it is said as to the /boot folder that it must contain static files of the boot loader. And there is another rule which states that
Programs necessary to arrange for ...
0
votes
2
answers
82
views
When creating a package what is the correct location for "library" files sourced by bash scripts?
I have a "library" file (containing general functions) I source in many different bash scripts. What's the correct filesystem location to system-wide "install" this file in?
/usr/...
0
votes
1
answer
21
views
/sbin/ctrlaltdel not coming up with whereis?
My $PATH has /sbin in it, and the executable ctrlaltdel exists within /sbin/. Yet when I run whereis ctrlaltdel in the teminal, I do not find /sbin/ctrlaltdel The output I get is
ctrlaltdel: /usr/sbin/...
10
votes
3
answers
3k
views
When is mandatory use /dev/zero over /dev/null for write/discard purpose?
According with the FHS about /dev at:
6.1.3. /dev : Devices and special files
it contains:
The following devices must exist under /dev.
/dev/null
All data written to this device is discarded. ...
0
votes
0
answers
2k
views
When to clean up /var/tmp?
/var/tmp is not defined in POSIX, but is defined in FHS:
5.15. /var/tmp : Temporary files preserved between system reboots
5.15.1. Purpose
The /var/tmp directory is made available for programs that
...
0
votes
2
answers
751
views
Where should a shell script for a custom systemd service be installed?
I have recently created my first custom systemd service to run a script early in my machine's boot sequence. The custom .service file is being copied to /etc/systemd/system, which I understand to be ...
0
votes
2
answers
59
views
What directory specifications need to be followed on servers?
On PCs, the XDG Desktop specifications allow the individual desktops to set different folders for various data. When writing an application that will only ever be run on servers, should one simply ...
2
votes
1
answer
234
views
What is the correct place for driver sources?
I have some sources I want to compile using make. The sources will be compiled into a driver I'm going to use. What is the correct place for such files? /usr/share? /opt? /usr/local/...?
Edit: the ...
1
vote
2
answers
121
views
Which directories should be on the same filesystem as the root "/" filesystem?
I read an article and it states that "bin" "dev" "etc" "lib" "root" "sbin" directories should be in the same filesystem as the root ...
0
votes
1
answer
431
views
What's the most appropriate directory where to place development software shared between users?
About share data (files and directories) among users within the same machine, has sense use the /srv directory it according with:
What's the most appropriate directory where to place files shared ...
1
vote
1
answer
97
views
Is there a recommended path for storing temporary files in a tmpfs/ramdisk which also does not need to be persisted after boot?
I would previously just use /tmp however this seems to persist after boot, it also seems to be have the disadvantage about literally writing to the disk as opposed to a ramdisk / tmpfs.
I thought ...
2
votes
1
answer
278
views
Is it safe to remove /usr/lib32 and /usr/libx32, on 64bit only Debian Linux 10
Is it safe to remove /usr/lib32, /usr/libx32 directories and their links on /lib32, libx32, on 64bit only (no multiarch enabled) Debian Linux 10? They are empty.
Since this new file system hierarchy ...
1
vote
0
answers
37
views
Where do I put log files of scripts or executables ran as user?
What would be a good place to put log files for executables that run as local user?
I notice there are a bunch of system-like directories in my home folder, ~/.config has things that for a system-wide ...
1
vote
2
answers
92
views
What if I wanted /etc to be called something else?
Aside from the kernel itself, the Filesystem Hierarchy Standard is perhaps the only major feature common to all linux systems. Some obscure distributions modify it only slightly: stali, for example, ...
0
votes
2
answers
367
views
Can I boot over symlinks?
So I have multiple drives in my pc, but because of the Filesystem Hierarchy Standard it is very impractical to store progams and similar on those drives. I personally also just don't like having ...
10
votes
2
answers
10k
views
Can I remove all the recent kernel versions at /lib/modules/
I saw that in /lib/modules/ I have 7 directories that related to the out of date kernel versions, can I fully delete them? It will not make any changes or hurt my system?
$ ls /lib/modules
5.4.0-26-...
1
vote
1
answer
135
views
Systemd: Logic behind configuration files in /usr/lib/
I was searching for the configuration for purging the /tmp and /var/tmp directories on a CentOS 7 default installation. After some searching, I came across the file /usr/lib/tmpfiles.d/tmp.conf which ...
3
votes
0
answers
720
views
Where should I put web application code in the file-system hierarchy [closed]
What would be the most FHS compliant and standard location for putting the source code of a web-app, let's say a Flask app, be? I've looked around and haven't found any definitive and satisfactory ...
2
votes
0
answers
34
views
RHEL based distros and FHS (and postgres)
Under CentOS, i see postgres config files are located in '/var/lib/...' (instead of '/etc'). In FHS specifications, under '/var/lib' (chapter 5, section 8.1) it is specified:
This hierarchy holds ...
2
votes
1
answer
1k
views
Why does the /root/ directory have 700 permission by default?
I just noticed that the /root/ has 700 permission by default on Ubuntu, Debian as well as Nixos. Why is this handled differently than other directories for example /bin/?
What is so special about /...
2
votes
1
answer
9k
views
GLIBC_2.29 can not be found for avrdude even after downloading it
I have a bit of a struggle with using avrdude to flash my microcontroller.
It dependends of libm.so.6 GLIBC_2.29 which it cannot find. It looks under /usr/lib/libm.so.6 where this file does actually ...
0
votes
0
answers
94
views
Where should an FHS-compliant program ideally place all its files?
After reading the FHS, I have concluded on the following table:
+----------------+-------------------+---------------------------------+-----------------------+
| Part | Sofware in /opt | ...
1
vote
0
answers
43
views
Installer support for sharing /usr or /usr/share
According to the Filesystem Hierarchy Standard (FHS), /usr is "shareable between various FHS-compliant hosts" (and /usr/share is even shareable between different architectures of the same OS).
Are ...
1
vote
2
answers
263
views
What is a FHS compliant installation dir for vendor-provided binaries?
A software vendor has to create a Linux filesystem hierarchy standard (FHS) compliant Debian package.
What installation dir has to be used for binaries?
Software placed in /bin or /usr/bin may be ...
0
votes
0
answers
98
views
Why doesn't Guile have /usr/local in path?
I've noticed when compiling and installing modules for Guile in /usr/local that they cannot be found, while setting the prefix to /usr they work as intended. Is there a reason why Guile doesn't have /...
1
vote
1
answer
3k
views
What is the /usr directory in Linux?
FHS-3.0 describes it as:
Shareable, readonly data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to.
I am a bit confused by what this means. ...
0
votes
0
answers
34
views
Where to write data which should persit until next application startup?
To be compliant with the FHS I'm going to install my application in usr/local and the corresponding subdirectories. Where should the application write data which persits until the next application ...
1
vote
0
answers
52
views
Docker and Linux architecture,var directory
I worked on Docker and Jenkins project and Now I am looking at /var directory of the docker container named jenkins
docker exec jenkins ls -l var
total 40
drwxr-xr-x 2 root root 4096 Aug 26 ...
3
votes
0
answers
183
views
Is the directory /apps/ a legacy of anything?
Several times, I have seen in (quite) big projects, software installations made under
/apps/
First I thought it was a fantasy, refusing FHS normalisation.
https://en.wikipedia.org/wiki/...
2
votes
1
answer
277
views
What does <qual> stand for in the FHS?
The Linux FHS (Filesystem Hierarchy Standard) refers to directories of the following form:
/lib<qual>
It describes such directories as follows:
There may be one or more variants of the /lib ...
8
votes
2
answers
2k
views
Why there are no READMEs in the Linux filesystem hierarchy?
The Linux filesystem hierarchy (FHS) contains a lot of important directories. For example, I just discovered /sys/class/input while playing with my PS/2 keyboard settings.
But all those important ...
0
votes
1
answer
22
views
nsroot, what directories need to be host-specific?
I'm playing with an nfsroot boot for multiple hosts; Ubuntu has some dated docs that recommend:
#/etc/fstab
none /tmp tmpfs defaults 0 0
none /var/run ...
4
votes
2
answers
2k
views
What is meant by "locally installed package" in the world of Unix?
I've been scratching my head over the File System Hierarchy Standard recently and in numerous occasion, when talking about the /usr/local directory, I came across the term "locally installed packages"....
8
votes
1
answer
3k
views
What is the user equivalent of the global /opt directory?
I'm wondering if anybody has agreed on a user equivalent of the global /opt directory, for third-party packages that are distributed as a tarball to be unpacked as a single directory. Examples include ...
3
votes
0
answers
260
views
Are {/bin, /lib, /sbin} symlinks into /usr in Ubuntu?
I am a little confused by this question about moving files from /bin to /usr/bin on an Ubuntu 17.04 system. Reading the Ubuntu wiki says:
For Quantal, merged /usr should be supported. On new ...
21
votes
1
answer
30k
views
What's the difference between a binary file and a library?
I'm trying to understand the Filesystem Hierarchy Standard. I have looked up both binaries and libraries, and as I currently understand it:
binaries are files of computer-readable code in binary ...
1
vote
1
answer
541
views
Is subdirectory in /usr/bin really forbidden by FHS
Lintian tag description:
The Filesystem Hierarchy Standard forbids the installation of new directories in /usr/bin other than /usr/bin/mh.
However, all I can find the linked document is
This ...
33
votes
1
answer
3k
views
How did the ~/.local/bin thing start? How widespread is it?
I find more and more tools that put executables into ~/.local/bin. I am old and for me ~/bin is the place in my $HOME for executables.
Where did this crazy new fashion originate? Why are people doing ...
2
votes
3
answers
2k
views
Why isn't the var directory user-specific?
I'm quite new in the UNIX world, so feel free to let me know if my question is silly.
So-called Filesystem Hierarchy Standard states that the /var directory is supposed to keep data like logs and ...
1
vote
2
answers
498
views
Where should sshfs mounts be placed in the filesystem?
I have some sshfs mounts which I want to put in a Linux filesystem location following the Filesystem Hierarchy Standard.
The standard is strangely silent on where network mounts should be placed:
...
4
votes
1
answer
6k
views
Purpose of /net directory
I notice on my system (Manjaro Linux) that:
I have an empty directory named /net
This directory is not mentioned in the Filesystem Hierarchy Standard
What is the intention behind this directory (...
4
votes
1
answer
7k
views
Why isn't /usr/local/lib on the library path by default? [closed]
Under the FHS, system packages (e.g. RPMs) install libraries to /usr/lib (or /usr/lib64).
Similarly, libraries compiled using the old "configure;make;make install" routine, which are not part of the ...
13
votes
2
answers
3k
views
Where should an /opt package write logs?
I am installing a custom package to /opt/package_name, storing configuration files in /etc/opt/package_name and static files in /var/opt/package_name/static/ - all following the conventions suggested ...
4
votes
1
answer
2k
views
Should I install a custom webapp in /opt or /srv?
My understanding is that custom/non-distro software should be installed in /opt. However in a Django deployment tutorial [1] I found a suggestion to install a Django webapp to /srv which is described ...
-2
votes
1
answer
97
views
"Why does "/home" have " / " at the beginning if for example the " / " is on a different partition? [duplicate]
Lets assume my system has the root ( / ) partition located on "/dev/sda1" and the /home partition is located on "/dev/sda2", Why does "/home" have " / " at the beginning since " / " is on a ...
1
vote
1
answer
657
views
(block) size of /dev, /etc, /proc, /home, explanation? [duplicate]
Can somebody explain, why a standard folder has always 4kB and some special directories have more or less?
some examples:
/dev 3280B, 0 Blocks, 16 Links
/etc 12288B, 24 Blocks, 119 Links
/proc ...
14
votes
4
answers
4k
views
What are the FHS compliant mount points?
I'm wondering what the FHS compliant mount points for internal harddrives and networkshares are? Many different tutorials are suggesting to mount them in subdirectories to /mnt or /media
According ...