Questions tagged [fhs]

Filesystem Hierarchy Standard

Filter by
Sorted by
Tagged with
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. ...
user avatar
0 votes
0 answers
85 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 ...
user avatar
  • 3,573
0 votes
2 answers
72 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 ...
user avatar
0 votes
2 answers
27 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 ...
user avatar
  • 133
2 votes
1 answer
151 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 ...
user avatar
0 votes
2 answers
45 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 ...
user avatar
  • 1,082
0 votes
1 answer
65 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 ...
user avatar
1 vote
1 answer
47 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 ...
user avatar
2 votes
1 answer
128 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 ...
user avatar
  • 2,211
1 vote
0 answers
25 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 ...
user avatar
  • 123
1 vote
2 answers
72 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, ...
user avatar
0 votes
2 answers
167 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 ...
user avatar
3 votes
2 answers
5k 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-...
user avatar
0 votes
1 answer
81 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 ...
user avatar
  • 1,634
2 votes
0 answers
252 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 ...
user avatar
  • 141
2 votes
0 answers
23 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 ...
user avatar
2 votes
1 answer
559 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 /...
user avatar
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 ...
user avatar
  • 456
0 votes
0 answers
72 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 | ...
user avatar
0 votes
0 answers
38 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 ...
user avatar
  • 405
1 vote
1 answer
203 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 ...
user avatar
0 votes
0 answers
85 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 /...
user avatar
1 vote
1 answer
2k 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. ...
user avatar
  • 1,073
0 votes
0 answers
32 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 ...
user avatar
1 vote
0 answers
46 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 ...
user avatar
3 votes
0 answers
180 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/...
user avatar
  • 325
2 votes
1 answer
250 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 ...
user avatar
  • 8,979
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 ...
user avatar
0 votes
1 answer
20 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 ...
user avatar
  • 3,844
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"....
user avatar
6 votes
1 answer
2k 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 ...
user avatar
  • 537
3 votes
0 answers
230 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 ...
user avatar
  • 4,791
19 votes
1 answer
25k 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 ...
user avatar
  • 193
1 vote
1 answer
381 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 ...
user avatar
29 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 ...
user avatar
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 ...
user avatar
1 vote
2 answers
442 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: ...
user avatar
  • 24.6k
4 votes
1 answer
5k 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 (...
user avatar
  • 24.6k
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 ...
user avatar
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 ...
user avatar
  • 2,495
2 votes
1 answer
1k 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 ...
user avatar
  • 2,495
-2 votes
1 answer
93 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 ...
user avatar
  • 151
1 vote
1 answer
522 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 ...
user avatar
  • 111
14 votes
4 answers
3k 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 ...
user avatar
  • 2,725
-2 votes
1 answer
1k views

Showing read only /var partition on Debian

I have seen an industrial computer running Debian, to protect the flash disk from writes and have the system in a defined state after every boot, the whole disk was mounted read-only, there are no ...
user avatar
  • 117
0 votes
1 answer
634 views

Is /sys content obsolete in Linux?

EDIT: By obsolete I don't mean bad/unnecessary (I agree with /proc being a mess). Modularity is a good thing and I love it. I mean is: information of the system, held (in /sys) that is findable ...
user avatar
  • 305
49 votes
4 answers
8k views

What's the difference between /tmp and /run?

According to FHS-3.0, /tmp is for temporary files and /run is for run-time variable data. Data in /run must be deleted at next boot, which is not required for /tmp, but still programs must not assume ...
user avatar
1 vote
1 answer
289 views

Where to place application plugins (.so)?

Where should I deploy application plugins? Nobody will ever use them. Does it make sense to put them in /usr/lib?
user avatar
59 votes
4 answers
37k views

What is the purpose of /usr/libexec?

Executables are stored in /usr/libexec on Unix-like systems. The FHS says (section 4.7. /usr/libexec : Binaries run by other programs (optional)": /usr/libexec includes internal binaries that ...
user avatar
  • 3,408
2 votes
0 answers
161 views

Is there a standard way for getting the media mount path (like /media/user, /run/media/user...)?

In an application, I need to find out where removable media is mounted. On Ubuntu, this happens in /media/username/ . On Arch, it is /run/media/username/ . On other systems, its just /media/ etc. ...
user avatar
  • 131