A seemingly better place to store your application state data would be / var, or more specifically, /var/lib. This also comes from the Hierarchy Standard. You could create a /var/lib/myapp, or if you’re also using things like lock files or logs, you could leverage /var/lock or /var/log.
The /usr/share hierarchy is for all read-only architecture independent data files. As you’re modifying data, this goes against the read-only nature of the /usrsubsystem. A seemingly better place to store your application state data would be /var, or more specifically, /var/lib.
This begs the question “Where should I put the data stored in an app?”
We can find out! if an app is running as an ACTUAL user, the data should be stored under that users $HOME. If it is a system user, the install (as root or similar) should give that user ownership of its files and directories under /var, and add the user to any groups needed for access to additional devices/directories/files.
However, in Ubuntu, that needs to be explicitly done by the user. Show activity on this post. Your home directory is the only place where you can store files permanently. Applications typically store their configuration and automatically saved data in a file or directory called .application-name in your home directory.
Where does linux store programs?
Software in Linux is a little different in paradigm from Windows or Mac. In those, an executable and all its supporting files are installed into a single folder: Windows normally keeps them in c: Program Filesprogram name, Apple in /Applications/program. , and app. Under Linux, there’s a more communal structure.
Where are my programs stored in Linux?
Like your browser cache, your bookmarks, your email archive, and so on. These you will generally find in hidden files and folders in your home folder. (for KDE) to show hidden files and folders. The static files of your programs (executables, graphics, and so on) are generally stored in /usr.
Where are applications stored in GNOME?
Applications typically store their configuration and automatically saved data in a file or directory called .application-name in your home directory. (Some applications save in groups, e. g, ~/.gconf contains data from many Gnome applications.).
Some articles claimed By convention, software compiled and installed manually (not through a package manager, e. g apt, yum, pacman) is installed in /usr/local. Some packages (programs) will create a sub-directory within /usr/local to store all of their relevant files in, such as /usr/local/openssl.
Where does linux store temporary files?
Linux, like nearly all operating systems, accumulates many temporary files. It may be helpful to know more about these files. Some users may want to know how to manage the temporary files to increase storage space. Thankfully, the temporary files and cache are stored under /var/, /tmp/, and ~/.cache/. /var/ contains long-term temporary files that are kept between reboots.
Where do I put temporary media files in Linux?
However, the standard location for temporary media is inside the /media directory. /dev — Device Files Linux exposes devices as files, and the /dev directory contains a number of special files that represent devices.
You should be asking “Where are the temprorary Internet Files stored in Linux?”
I most browsers that run on Linux store the cache (temporary files, etc, etc) under your home directory in a hidden directory that is labeled depending on what browser you are using.
Thankfully, the temporary files and cache are stored under /var/, /tmp/, and ~/.cache/. /var/ contains long-term temporary files that are kept between reboots.
Anyway, the standard temporary directory in a typical Linux system is /tmp. It is the equivalent of C: Temp in the sense that it is only the default temporary directory, not universal. Even if /tmp is available, if a user (or the system) has set the TEMP environment variable, the value of that variable should be used instead.
Where are system settings stored in Linux?
These you will generally find in hidden files and folders in your home folder. (for KDE) to show hidden files and folders. The static files of your programs (executables, graphics, and so on) are generally stored in /usr. System settings are stored in /etc.