Installing bc (calculator programming language) in Crostini (Linux container) on a Chromebook

toddogasawara
OgasaWalrus
Published in
1 min readAug 4, 2019

The Debian Linux container that comes with and runs in Crostini on Chromebooks comes with a lot of Linux tools. However, one favorite of my does not: bc — An arbitrary precision calculator language. bc stands for Basic Calculator. But, it is far more than that. It is a full programming language that be embedded in shell scripts or used from an interactive command line.

Here’s how you install it in a Crostini terminal window:

sudo apt install bc

That’s it! As installed, sudo did not need or ask for a password to be passed to it before running the installation.

And, here’s how you run it from inside of the Terminal window:

bc -l

The -l flag brings in the standard math library.

You can find the GNU man page for bc here:

--

--

toddogasawara
OgasaWalrus

Editor MobileViews; retired former State of Hawaii Director of Operations for IT