• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ipcalc: command not found

by Deepika

The “ipcalc” command is a command-line utility that is used to perform simple operations and calculations on IP addresses and networks. It is typically used to calculate the network address, broadcast address, and other information about a given IP address and netmask.

Here are some examples of how the “ipcalc” command can be used:

  • To calculate the network address and broadcast address of a given IP address and netmask, use the command “ipcalc [IP address] [netmask]”.
  • To display the network address, broadcast address, and other information about a given IP address and netmask, use the command “ipcalc -s [IP address] [netmask]”.
  • To calculate the netmask for a given IP address and prefix, use the command “ipcalc -p [IP address] [prefix]”.

The “ipcalc” command can also be used to perform more advanced calculations such as the CIDR notation or prefix notation of a IP address and subnet mask. It is also able to support IPv6 addresses, for example “ipcalc -6 2001:0db8:85a3:0000:0000:8a2e:0370:7334/128”

If you encounter the below error while running the command ipcalc:

ipcalc: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install ipcalc
Ubuntu apt-get install ipcalc
Alpine apk add ipcalc
Arch Linux pacman -S ipcalc
Kali Linux apt-get install ipcalc
CentOS yum install ipcalc
Fedora dnf install ipcalc
OS X brew install ipcalc
Raspbian apt-get install ipcalc

ipcalc Command Examples

1. Show information about an address or network with a given subnet mask:

# ipcalc 1.2.3.4 255.255.255.0

2. Show information about an address or network in CIDR notation:

# ipcalc 1.2.3.4/24

3. Show the broadcast address of an address or network:

# ipcalc -b 1.2.3.4/30

4. Show the network address of provided IP address and netmask:

# ipcalc -n 1.2.3.4/24

5. Display geographic information about a given IP address:

# ipcalc -g 1.2.3.4

Filed Under: Linux

Some more articles you might also be interested in …

  1. “hg pull” Command Examples
  2. pacman –sync Command Examples
  3. calcurse Command Examples in Linux
  4. gpg-tui Command Examples
  5. adig Command Examples in Linux
  6. module: command not found
  7. “glab issue” Command Examples
  8. dbus-daemon Command Examples in Linux
  9. ascii Command Examples in Linux
  10. tcpdump: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright