How To Install tcalc on CentOS 7

In this tutorial we learn how to install tcalc on CentOS 7. tcalc is The terminal calculator

Introduction

In this tutorial we learn how to install tcalc on CentOS 7.

What is tcalc

The terminal calculator is a small and helpful program to help users of the GNU/Linux terminal do calculations simply and quickly. The formula to be calculated can be fed to tcalc through the command line. Alternatively, tcalc can be run with no formula and then the free mode is started, in which the calculator will wait for user input, do the necessary calculations and print out the result, and the cycle will repeat until the user enters ‘q’ or ‘quit’. Support for reading formulas from text files is under way. The calculator works with the decimal, hexadecimal, octal, and binary number systems. It automatically identifies hex numbers if entered with a preceding “0x” or “0X”, octal by preceding the number with a zero, binaries by preceding the number with ‘b’ and decimals by absence of all of the above. Alternatively, the user can indicate the type of input by setting the ‘format’ argument.

We can use yum or dnf to install tcalc on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install tcalc.

Install tcalc on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install tcalc using yum by running the following command:

sudo yum -y install tcalc

Install tcalc on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install tcalc using dnf by running the following command:

sudo dnf -y install tcalc

How To Uninstall tcalc on CentOS 7

To uninstall only the tcalc package we can use the following command:

sudo dnf remove tcalc

References

Summary

In this tutorial we learn how to install tcalc on CentOS 7 using yum and dnf.