How to use the calc Command:

We can use the calc command to perform all kind of calculation right from the terminal.

Interactive mode

$ calc
C-style arbitrary precision calculator (version 2.12.7.1)
Calc is open software. For license details type: help copyright
[Type “exit” to exit, or “help” for help.]

; 5+1
6
; 5-1
4
; 5*2
10
; 10/2
5
; quit
Non-Interactive mode

$ calc 3/5
0.6

Leave a Reply

Your email address will not be published. Required fields are marked *