Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fhs]

Filesystem Hierarchy Standard

113
votes
7answers
44k 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
33 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 | ...
-4
votes
1answer
1k 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
7k 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
19 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
21 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 ...
380
votes
6answers
225k 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 ...
31
votes
5answers
2k 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
36 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 /...
17
votes
1answer
8k 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/...
0
votes
1answer
432 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 ...
76
votes
9answers
23k 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
122 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. ...
44
votes
4answers
10k 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 ...
0
votes
0answers
26 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
744 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?
33
votes
6answers
31k 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 ...
29
votes
2answers
35k 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 ...
55
votes
2answers
33k 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
34 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
170 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/...
126
votes
4answers
75k 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?
40
votes
9answers
19k 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 ...
1
vote
1answer
82 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 ...
79
votes
5answers
67k 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 ...
0
votes
1answer
15 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
554 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
116 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 ...
22
votes
4answers
11k 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 ...
8
votes
1answer
8k 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 ...
8
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 ...
1
vote
1answer
211 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. ...
37
votes
4answers
4k 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
111 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 ...
3
votes
1answer
2k 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 (...
20
votes
1answer
762 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
3answers
760 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
1answer
2k 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
234 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: ...
9
votes
1answer
6k 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 ...
3
votes
1answer
147 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
81 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
1answer
271 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 ...
-2
votes
1answer
752 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 ...
22
votes
3answers
15k 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,...
0
votes
1answer
260 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 ...
0
votes
1answer
71 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?
2
votes
0answers
58 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. ...