How to use bc command for addition, subtraction, multiplication and division. Use Linux terminal as calculator

Linux command line is very powerful. Let us see how can we use it as a calculator.

Open a terminal window and write bc -ql.

Here there are two options. ‘q’ stands for quiet mode which means it doesnot print un necessary things. ‘l’ stands for mathlib which will operate mostly on decimals and other maths operations.

For addition.

For Subtraction

For Multiplication

For division

To quit the bc command type in ‘quit’.

To do more using bc command open man bc there you can see about more of its usage.