BYTEPREFIX(5)
β¨ BYTEPREFIX(5) β¨
okay bestie, so this is the byteprefix page from the File Formats Manual, and it's literally all about how your computer shows sizes π buckle up
π NAME π
byteprefix β configuration for display of sizes
πΈ DESCRIPTION πΈ
so there are like, two standard ways to use units in computing, and this is the whole drama:
- base 10, where 1 k = 10^3 = 1 000
- base 2, where 1 K = 2^10 = 1 024
historically, most computer programs have used base 2 units, where 1 KB = 1 024 bytes, 1 MB = 1 048 576 bytes, etc. but here's the thing β users are way more likely to expect and understand sizes in base 10, because that's literally the norm outside of computing. it's giving "everyone else was doing it right the whole time" π
this configuration file is the method for configuring programs (the ones that use libkibi) to display sizes in your preferred style. you can configure it through a configuration file or an environment variable β and the environment variable takes precedence, so it's the main character here π
when you're not using the "historic" style, IEC-style prefixes (KiB, MiB, etc.) are used for base 2 units, to disambiguate them from base 10 units (kB, MB, etc.). no cap, that disambiguation is the whole point π¦
π OPTIONS π
there are three possible styles. default is base10 β¨
base2β display all sizes in Base 2 with IEC prefixes.
1 KiB = 1 024 bytes.
1 MiB = 1 024 KiB = 1 048 576 bytes.
1 GiB = 1 024 MiB = 1 048 576 KiB = 1 073 741 824 bytes.
base10β display all sizes in Base 10, except for sizes of RAM, which use base 2 with IEC prefixes.
everything except RAM:
1 kB = 1 000 bytes.
1 MB = 1 000 kB = 1 000 000 bytes.
1 GB = 1 000 MB = 1 000 000 kB = 1 000 000 000 bytes.
RAM:
1 KiB = 1 024 bytes.
1 MiB = 1 024 KiB = 1 048 576 bytes.
1 GiB = 1 024 MiB = 1 048 576 KiB = 1 073 741 824 bytes.
historicβ display all sizes in Base 2, without IEC prefixes.
1 KB = 1 024 bytes.
1 MB = 1 024 KB = 1 048 576 bytes.
1 GB = 1 024 MB = 1 048 576 KB = 1 073 741 824 bytes.
not recommended. this style uses base units 2 with prefixes usually associated with base 10 units. while it usesKBrather than the SI (base 10)kB, there is no such distinction beyond the kilobyte range, and the units are ambiguous. π© like bestie, the ambiguity is not the vibe, do not do this one
π ENVIRONMENT π
BYTEPREFIXβ this environment variable will override the configured or default style. it should just contain one of the style names, listed in OPTIONS above. just one. one single style name. that's it π«ΆXDG_CONFIG_HOMEβ the location of the user's configuration files. if it's not set, it will be assumed to be~/.config.
π¦ FILES π¦
your preferred style can be set in a system-wide configuration file and/or in your own configuration file β and the user's own config file takes precedence, as it should π if no configuration file exists, the default style is base10.
/etc/byteprefixorXDG_CONFIG_HOME/byteprefixβ this file should contain a single line:format=style. lines beginning with#are treated as comments.
β EXAMPLE β
a user wanting base 2 display can set the following in ~/.config/byteprefix:
format=base2
slay, that's it, that's the whole setup π
π₯ SEE ALSO π₯
and that's the page bestie! this one's from libkibi, dated January 2011 πΈ go forth and configure your size display however your heart desires, and remember: historic is right there but so is the warning label π mwah π
β¨
π¦ where this page comes from
- debian bookworm: libkibi0 0.1.1-2.1 Β· ISC
- debian trixie: libkibi0 0.1.1-2.1+b2 Β· ISC
- ubuntu jammy: libkibi0 0.1.1-2.1 Β· ISC
- ubuntu noble: libkibi0 0.1.1-2.1build1 Β· ISC
- ubuntu questing: libkibi0 0.1.1-2.1build1
- ubuntu resolute: libkibi0 0.1.1-2.1build2 Β· ISC
- ubuntu stonking: libkibi0 0.1.1-2.1build2 Β· ISC
- Copyright 2011, Stefano Rivera <stefanor@ubuntu.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms