# Factor (Unix)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Factor_(Unix)
> Markdown URL: https://mediated.wiki/source/Factor_(Unix).md
> Source: https://en.wikipedia.org/wiki/Factor_(Unix)
> Source revision: 1305052020
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{lowercase}}
{{Infobox software
| name                   = factor
| logo                   = 
| screenshot             = 
| screenshot size        = 
| caption                = 
| author                 = [Robert Morris](/source/Robert_Morris_(cryptographer)),<br />[Ken Thompson](/source/Ken_Thompson)<br />([AT&T Bell Laboratories](/source/AT%26T_Bell_Laboratories))
| developer              = Various [open-source](/source/open-source_software) and [commercial](/source/commercial_software) developers
| released               = {{Start date and age|1974}}
| latest release version = 
| latest release date    = 
| operating system       = [Unix](/source/Unix), [Unix-like](/source/Unix-like), [Plan 9](/source/Plan_9_from_Bell_Labs)
| platform               = [Cross-platform](/source/Cross-platform)
| genre                  = [Command](/source/Command_(computing))
| license                = 
| website                = 
}}
On [Unix](/source/Unix), [Plan 9](/source/Plan_9_from_Bell_Labs), and [Unix-like](/source/Unix-like) computer systems, '''factor''' is a utility for [factoring](/source/Factorization) an integer into its [prime factors](/source/prime_factors).<ref>{{man|1|factor|Plan 9}}</ref>

==History==
''factor'' first appeared on [5th edition](/source/Version_5_Unix) [Research Unix](/source/Research_Unix) in 1974, as a "user maintained" utility ([section](/source/Manual_page) 6 of the [manual](/source/Manual_page)).<ref>[http://www.vector.comm.sfu.ca/pups/PDP-11/Distributions/research/Dennis_v5/v5man.pdf manual page] from Fifth Edition Unix (section 6: "user maintained programs")</ref> In the [7th edition](/source/Seventh_Edition_Unix) in 1979, it was moved into the main "commands" section of the manual (section 1). From there, the ''factor'' utility was copied to all other variants of [Unix](/source/Unix), including commercial Unixes and [BSD](/source/BSD). In some variants of Unix, it is classified as a "game" more than a serious utility, and therefore documented in section 6.<ref>[http://man.cat-v.org/unix-6th/6/factor factor manual page] from Sixth Edition Unix (section 6: "user contributed")</ref>

A [free software](/source/free_software) version of the ''factor'' utility was written for the [GNU](/source/GNU) project by Paul Rubin, in 1986. It is now available on all [Linux](/source/Linux) distributions as part of the [GNU Core Utilities](/source/GNU_Core_Utilities). In 2008, GNU ''factor'' started to use the [GNU MP](/source/GNU_Multiple_Precision_Arithmetic_Library) library for [arbitrary-precision arithmetic](/source/arbitrary-precision_arithmetic), allowing it to factor integers of any size, not limited by the machine's native datatypes.

The command is available as a separate package for [Microsoft Windows](/source/Microsoft_Windows) as part of the [UnxUtils](/source/UnxUtils) collection of [native](/source/Native_(computing)) [Win32](/source/Windows_API) [ports](/source/porting) of common GNU Unix-like utilities.<ref>{{Cite web|url=https://unxutils.sourceforge.net/|title=Native Win32 ports of some GNU utilities|website=unxutils.sourceforge.net}}</ref>

==Syntax==
 factor [number]

The command can be used by supplying an integer value. Various projects, including simple ones such as printing prime numbers, are facilitated by using this command.

==References==
{{Reflist}}

==External links==
*[https://www.gnu.org/software/coreutils/manual/html_node/factor-invocation.html GNU's factor manual page]
*[https://www.freebsd.org/cgi/man.cgi?query=factor&format=html FreeBSD's factor man page]

{{Unix commands}}
{{Core Utilities commands}}

Category:Unix software
Category:Plan 9 commands

---
Adapted from the Wikipedia article [Factor (Unix)](https://en.wikipedia.org/wiki/Factor_(Unix)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Factor_(Unix)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
