An operating system is the main software that runs a computer or a mobile device. The operating system manages the hardware and gives other programs a base to run on. Examples are Windows and Unix on computers, and Android and iOS on mobile devices.
The operating system is the first program that loads when you turn the device on. Other programs use it to show things on the screen, read your input, and open and save files.
In file metadata, Operating System is a field in some archive files and network capture files. In an archive, it tells you which type of system, or which file system, was used to create the archive.
Which files carry it
GZIP and RAR archives store this field. GZIP files usually end in .gz, and RAR files end in .rar. Their MIME types are application/gzip and application/vnd.rar.
A GZIP file usually holds a single compressed file. GZIP is often used together with the TAR archive format, and the result usually ends in .tar.gz.
The header that holds this field also holds the compression method and can hold the archived file name. RAR files also show the uncompressed size.
ZIP archives keep a similar code in a field named "version made by". That code tells which system the file attributes of each entry are made for.
Network capture files in the PCAPNG format also carry a field with this name. There it is free text, such as Windows XP SP2, not a code.
Where the value comes from
No person types this value. The program that creates the archive writes it into the file.
In a GZIP file, the value is a single byte, the last byte of the fixed 10-byte header. The GZIP specification says this byte identifies the type of file system on which compression took place.
The zlib compression library writes the code of the current operating system by default. A program may also write 255, which means unknown.
The RAR 5 format describes the field as the type of operating system used to create the archive. Each file in a RAR 5 archive has its own header with this value.
What the values look like
An archive stores a number, and a metadata report usually shows the name that belongs to it. The GZIP specification defines 15 values. Here are 5 of them:
0: FAT filesystem (MS-DOS, OS/2, NT/Win32)3: Unix7: Macintosh11: NTFS filesystem (NT)255: unknown
Some of these values name a file system, such as FAT or NTFS, instead of an operating system. The names in parentheses show which systems use that file system.
RAR archives use shorter lists:
- Archives in the older RAR format, before RAR 5.0: values include
0MS-DOS,1OS/2,2Win32, and3Unix - Archives in the RAR 5.0 format:
0Windows and1Unix
The same number can mean a different system in each format. For example, Unix is 3 in a GZIP file but 1 in a RAR 5 file.
Why it matters
The value can help a program handle the files correctly on a different system. The GZIP specification says the value may help decide the end-of-line convention for text files.
In a RAR 5 archive, the value also tells a program how to read file names and attributes. A backslash is a normal character in Unix file names, but Windows file names do not allow it.
The value does not change the compressed content. A program may ignore the value when it unpacks a GZIP file, so 255 is not an error.
Do not confuse this field with the Software field. Software is free text about the program that made a file. In an archive, Operating System is a code from a fixed list.