In Unix and Linux, the global temporary directories are /tmp and /var/tmp. Web browsers periodically write data to the tmp directory during page views and downloads. Typically, /var/tmp is for persistent files (as it may be preserved over reboots), and /tmp is for more temporary files.
What is the purpose of TMP files?
Temporary files, also referred to as TMP files, are automatically created and deleted from a computer. They store data temporarily which means they need less memory and thus improve the performance of a computer.
How does tmp folder work in Linux?
The /tmp directory in Linux based systems contains necessary files that are temporarily required by the system as well as other software and applications running on the machine. For example, when you are writing a document, all the content inside that document is saved as a temporary file inside the /tmp directory.