factor command in Linux is used to print the prime factor of any given number. In this tutorial, you will learn factor command in Linux/Unix and uses of factor command with example.

Prime factor: A factor which is a prime number and not a composite number is a prime factor.

Load WordPress Sites in as fast as 37ms!

Prime Number: A number that can be divided exactly only by itself and 1.

Example: 3, 5, 7, 13

Factor: A factor is a number that divides another number completely with no remainder.

Load WordPress Sites in as fast as 37ms!

Prime Factorization: Prime factorization is a way of expressing a number as a product of its prime factors.

Syntax for factor command

factor number
factor option

Use the command factor –help to get help for the factor command and know the option available for factor command.

Load WordPress Sites in as fast as 37ms!
factor --help

factor --help

Use factor –version command to know the current version of factor command line utility.

factor --version

factor --version

Load WordPress Sites in as fast as 37ms!

Uses of factor command with example

Finding the factor of a single number

Using the factor command you can display the prime factor of any number. Follow the below syntax for finding the factor of any number.

factor Number

Do not forget to replace the Number with your desired number for finding factor.

Load WordPress Sites in as fast as 37ms!

factor of a number

number having multiple factor

factor of prime number having self factor

Load WordPress Sites in as fast as 37ms!

Finding Factor of multiple numbers

Using the factor command you can display the prime factor of more than one number at once. Follow the below syntax for finding the factor of multiple numbers at once.

factor numb1 numb2 numb3 numb4 .....

Do not forget to replace numb1 numb2 numb3 numb4 with your desired numbers for finding factor.

factor of multiple number

 

A
adduser | addgroup | alias | anacron | apt | aptitude | arp | at | atq | atrm | awk
B
basename | banner | batch | bc | bg | bzip
C
cat | cal | cd | chgrp | chown | cksum | chmod | clear | cmp | comm | cp
D
date | dd | df | diff | dir | dmidecode | du
E
echo | eject | env | exit | expr
F
factor | find | free
G
grep | groups | gunzip | gzip
H
head | history | hostname | hostnamectl | htop | hwclock | hwinfo
I
id | ifconfig | ionice | iostat | ip | iptables | iw | iwlist
J
K
kill | kmod
L
last | less | ln | locate | login | lp | ls | lshw | lscpu | lsof | lsusb
M
man | mdsum | mkdir | more| mv
N
nano | nc | neofetch | netcat | netstat | nice | nmap | nproc
O
openssl
P
passwd | pidof | ping | pr | ps | pwd | pstree
Q
R
rdiff-backup | reboot | rename | rm | rmdir | rnmod
S
scp | shred | shutdown | sleep | sort | split | ssh | stat | su | sudo | sum
T
tac | tail | talk | tar | tee | time | tree | top | touch | tr
U
unalias | uname | uniq | unzip | uptime | users
V
vim | vi
W
w | wall | watch | wc | wget | whatis | whereis | which | who | whoami
X
xargs
Y
yes | youtube-dl
Z
zcmp | zdiff | zip | zz

Sharing is Caring
Load WordPress Sites in as fast as 37ms!
Scroll to Top