Do you have a math calculation that you would like to do, but all you have available is the Linux command line? Are you running an Ubuntu server or a CentOS operating system with only the command line available? What can you do if you want to calculate how many IP addresses are available in total in the IPv4 system, that is, run a calculation like 2^32.
Or, what if you would like to do a quick calculation finding out the result of 2765*2345?
It is easier than you thought as there is a built-in calculator in most Linux operating systems. You can reach the calculator by running the command bc.
The calculator will then launch and you can type in the calculations that you would like to solve. Below you can see me running the 2^32 task.
Since the current IP address system is a 32-bit system, there is a total of 4,294,967,296 IP addresses in total in this system. That is way too little for the world we live in and that is why they developed the IPv6 system in which the addresses are much longer, and complicated, and they are 128 bits. That opens up for way more IP addresses than with the IPv4 system.
What is the maximum number of IP addresses available in the IPv6 system?
Start the calculator and run the following calculation: 2^128
It is a gigantic number, meaning that we shouldn't run out of such IP addresses anytime soon.
Would you like to read more articles about Ubuntu? Click the link for more technical articles, help, tips, and more.