Where should Steam install game data on linux, to be FHS-compliant

fhssteam

I want to create a folder on my linux system for Steam to download game data to. I am doing this so the data is shared between users, and games do not have to be downloaded multiple times.

Originally, I thought I should create a /opt/steam folder. But I started reading the recent FHS 3.0 spec, and now I'm not sure if it should be:
– /usr/local/steam, or
– /var/steam (or an appropriate sub-directory of /var?)

To be FHS-compliant, where should Steam place games? And if it's between /usr/local and /var, why is one better than the other?

Thanks

Info below about FHS 3.0

  • FHS 3.0 – http://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
  • /usr/local purpose in FHS 3.0:

    4.9.1. Purpose

    The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

    Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.

  • /var purpose in FHS 3.0:

    5.1. Purpose

    /var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.

    Some portions of /var are not shareable between different systems. For instance, /var/log, /var/lock, and /var/run. Other portions may be shared, notably /var/mail, /var/cache/man, /var/cache/fonts, and /var/spool/news.

    /var is specified here in order to make it possible to mount /usr read-only. Everything that once went into /usr that is written to during system operation (as opposed to installation and software maintenance) must be in /var.

    If /var cannot be made a separate partition, it is often preferable to move /var out of the root partition and into the /usr partition. (This is sometimes done to reduce the size of the root partition or when space runs low in the root partition.) However, /var must not be linked to /usr because this makes separation of /usr and /var more difficult and is likely to create a naming conflict. Instead, link /var to /usr/var.

    Applications must generally not add directories to the top level of /var. Such directories should only be added if they have some system-wide implication, and in consultation with the FHS mailing list.

Best Answer

Oftentimes /opt is used for such a purpose.

The use of /opt for add-on software is a well-established practice in the UNIX community. The System V Application Binary Interface [AT&T 1990], based on the System V Interface Definition (Third Edition), provides for an /opt structure very similar to the one defined here.

And games are additional (i.e. nonnecessary) software.

Related Question