FG
💻 Software

Where is the temporary directory in Linux?

Fresh7 days ago
Mar 15, 2026307777 views
Confidence Score1%
1%

Problem

Does Linux have a standard temporary directory for general use, like Windows's folder? If so, where is it located? I found an SO question about finding a directory programmatically, but I want to set a temp location in an XML config file ahead of time.

Error Output

C:\Temp

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Where is the temporary directory in Linux?

Low Risk

The Filesystem Hierarchy Standard version 3.0 says: /tmp : Temporary files The directory must be made available for programs that require temporary files. Programs must not assume that any files or directories in are preserved between invocations of the program. Rationale IEEE standard POSIX.1-2008 lists requirements similar to the above section. Although data stored in may be deleted in a site-specific manner, it is recommended that files and directories located in be deleted whenever the syst…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment