Questions tagged [fhs]

Filesystem Hierarchy Standard

Filter by
Sorted by
Tagged with
2
votes
0answers
44 views

Where should I put web application code in the file-system hierarchy

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 ...
91
votes
5answers
77k views

Difference between /bin and /usr/bin

I read this up on this website and it doesn't make sense. http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/basic/node32.html When UNIX was first written, /bin and /usr/bin physically resided ...
437
votes
7answers
285k views

What is the difference between /opt and /usr/local?

According to the Filesystem Hierarchy Standard, /opt is for "the installation of add-on application software packages". /usr/local is "for use by the system administrator when installing software ...
25
votes
3answers
20k views

Permissions/ownership of /usr/local/bin

From what I understand, the right place to put your own scripts is /usr/local/bin (for instance a script I use to back up some files). I notice that this folder is currently (by default) owned by root,...
2
votes
0answers
9 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 ...
11
votes
1answer
14k 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 ...
2
votes
1answer
71 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 /...
0
votes
0answers
29 views

Is $HOME/.local/bin now the preferred location of user-made binaries and scripts or does $HOME/bin still meant fulfull this role? [duplicate]

When I create my own binaries and executable scripts, is the $HOME/.local/bin the preferred convention or should I still be placing them in $HOME/bin? Putting them into .local/ would help to de-...
41
votes
9answers
22k views

What is the /boot partition really for?

I'm reading a relatively old text on Linux partitions and file systems (the LPIC 1 Certification Bible). It says: Some versions of the Linux boot loaders cannot access a kernel that is outside ...
22
votes
1answer
1k 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 ...
46
votes
4answers
14k views

Is the slash (/) part of the name of the Linux root directory?

Is the slash (/) really part of the name of the Linux root directory? Or is it just a symbol for it? What about /etc and so on? Update Suppose /dev/sda2 is the block device of a Linux root ...
30
votes
4answers
17k 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 are ...
2
votes
1answer
3k 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 ...
14
votes
4answers
2k 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 ...
123
votes
7answers
53k views

What does the .d stand for in directory names?

I know many directories with .d in their name: init.d yum.repos.d conf.d Does it mean directory? If yes, from what does this disambiguate? UPDATE: I've had many interesting answers about what the ....
0
votes
0answers
40 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 | ...
-3
votes
1answer
3k views

Why is the /opt directory rarely used? [duplicate]

In the Linux FHS, it says all third party packages should use /opt. However, I didn't see anybody is using /opt. Also, /opt is not in $PATH in anyway, so I think the OS is not intended to let us use /...
8
votes
4answers
8k views

Why did my package get installed to /opt?

A while back I installed couchdb from source on my debian machine. It seemed to install okay and everything worked. A few weeks later I wanted to upgrade and installed from a .deb using dpkg. ...
13
votes
2answers
2k 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 ...
0
votes
0answers
23 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 ...
0
votes
1answer
72 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 ...
32
votes
5answers
3k views

What are the alternatives to the FHS?

I'm a long time Linux user for over 15 years but one thing I hate with a passion is the mandated directory structure. I don't like that /usr/bin is the dumping ground for binaries or libs in /usr/lib, ...
0
votes
0answers
56 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 /...
19
votes
1answer
10k views

what is the distinction between /media, /mnt and /run/mount?

In FHS-2.3, we have /media that holds mount points for removable media such as CD-ROMs and we have /mnt that holds temporarily mounted filesystems. On the other hand, we have /run/media and /run/...
2
votes
1answer
916 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 ...
88
votes
9answers
34k views

What's the most appropriate directory where to place files shared between users?

Or: where can I put files belonging to a group? Suppose there are two users on a Unix system: joe and sarah. They are both members of the movies-enthusiast group. Where should I put their movie files?...
1
vote
1answer
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. ...
0
votes
0answers
29 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 ...
3
votes
4answers
798 views

Is the Filesystem Hierarchy Standard a UNIX standard or a GNU/Linux standard?

The Filesystem Hierarchy Standard says where to put stuff in a UNIX distribution. Is the FHS used/designed for use outside of GNU/Linux, or is it mostly limited to GNU/Linux?
36
votes
6answers
35k views

where is `cd` located? [duplicate]

In a bash sub shell I get the following error when running cd sudo: cd: command not found This is expected because I don't have a path. Usually to work around this I just provide the full path like ...
30
votes
2answers
41k views

What is the “/usr/local/src” folder meant for?

I wanted to put my work files (code) in /usr/local/src, but I think it's already a folder that has some other semantic meaning. What is that? Should I put source code there, or is there a better ...
69
votes
2answers
47k views

Where should a local executable be placed?

I have an executable for the perforce version control client (p4). I can't place it in /opt/local because I don't have root privileges. Is there a standard location where it needs to be placed under $...
1
vote
0answers
38 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
0answers
176 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/...
144
votes
4answers
96k views

What is the difference between /tmp and /var/tmp?

On most FHS systems, there is a /tmp folder as well as a /var/tmp folder. What is the functional difference between the two?
1
vote
1answer
155 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
2answers
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
1answer
17 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 ...
3
votes
2answers
779 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"....
3
votes
0answers
149 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 ...
1
vote
1answer
217 views

Where to drop libraries according Filesystem Hierarchy Standard

I operate a Linux-based build system. The build system itself is based on Jenkins, Nexus, Maven, Ant and Shell scripting. Some projects need some special tools and libraries for building. ...
44
votes
4answers
5k 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 ...
1
vote
1answer
190 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 ...
2
votes
1answer
3k 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 (...
2
votes
3answers
1k 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 ...
2
votes
1answer
4k 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 ...
0
votes
2answers
299 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: ...
11
votes
1answer
8k views

How should executables installed under /opt be added to the path?

Can programs installed under /opt be safely symlinked into /usr/local/bin, which is already in the PATH by default in Ubuntu and other Linux distros? Alternatively, is there some reason to create a ...
2
votes
1answer
205 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
1answer
86 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 ...