How to use Linux Terminal as a computer
Do you like the simplicity of terminals in Linux more than GUI or use? If you need to do some math quickly, you should not use a computer application. You can perform your calculations using a terminal, through the tools you (probably) have installed.
Join TipsMake.com to learn how to use the terminal in Linux as a computer, regardless of which distribution you are running, via the following article!
Calculate with GNU bc
Bc in GNU bc stands for 'basic calculator'. This bc program itself originated in Unix in the 1970s. GNU bc is a more advanced and modern version that you can find on your Linux system.
If you don't have GNU bc, use the package manager that your distro uses to install it. This package is simply called bc. To start, open the terminal and type bc
before pressing Enter
. Type quit
to exit the program after you're done.
The plus, minus, backslash and asterisk are used for calculations. The first two signs (addition and subtraction) are simple, while backslashes are used instead of division and asterisks represent multiplication.
You can also use parentheses, variables, arrays, algebra expressions, etc. Readers can learn more through the GNU user guide at:
https://www.gnu.org/software/bc/manual/html_mono/bc.html
Calculation with Calc
An alternative to bc is calc, a tool based on another terminal. Like bc, calc has another old Unix tool that continues to be supported on Linux. The installation package is called apcalc on Ubuntu and Debian-based systems but can be found under the name calc elsewhere.
To open calc, just type calc
in the terminal and press Enter
. Like bc, you will need to use typical operators. For example: 5 * 5
to represent 5 x 5 calculations.
When you're done, press Enter
. The answer will appear immediately below. When you're done, enter quit
and press Enter
.
Use terminal commands directly (Echo and Expr)
You do not need to have any additional programs or packages to perform basic calculations with terminals in Linux. A typical Bash shell allows you to perform basic calculations using echo yourself. For example, you can do this if you plan to use math as part of the bash script.
You can also use expr , a tool that comes with coreutils , found on most Linux and Unix-based systems. Expr can also be used in bash scripts, like with echo.
To use echo, enter the following command in the terminal:
echo $((2*2))
In which 2 * 2 is the calculation you selected. Press Enter
and you will get the answer to your calculation.
To use expr, enter expr
, followed by your calculation. Again, this is only applicable to simple calculations (not usable with trigonometry).
For example, expr 33 * 2
will represent 33 multiplication by 2 (33 x 2). The "" backslash before an asterisk is required for multiplication here, but does not apply to other operators.
Echo and expr can be used if you only want to perform basic calculations. If you need something more advanced, choose another method listed here.
Calculate with Qalc
If you like an option with a few extra features, like currency conversion, Qalc is the right tool for you. Qalc is 'cousin' with Qalculate, a cross-platform computing tool with GUI.
Please use the distribution package manager to install the qalc package. Start by typing qalc
in the terminal and press Enter
.
Qalc is the most comprehensive and user-friendly terminal calculation application for Linux users. Qalc will also remember the calculations that have been performed, as well as present the neat answer below.
If you want to make currency conversion, you will need to start with qalc and then enter exrates
to update the previous exchange rate.
Math is not something that is easy to master overnight, but you can eliminate the hassle of fast Linux calculations, using a terminal. Tools like echo and expr, as well as some popular software like GNU bc, make it easy, quick and easy to calculate numbers.
Which Linux calculation tool is easiest for you? Do you particularly like any of these tools? Please share your comments in the comment section below!
Hope you are succesful.
You should read it
- How to install dictionaries in Linux Terminal
- How to back up and restore Linux Terminal history
- 14 interesting Linux commands in Terminal
- How to play Game Boy games on Linux Terminal
- 5 interesting entertainment games in Linux Terminal
- How to run 2 or more Terminal commands at the same time on Linux
- How to fix the problem of being unable to enter Terminal in Linux
- How to create and delete folders in Linux Terminal
May be interested
- 14 interesting Linux commands in Terminalterminal is a very powerful tool, but it can become 'interesting' through a few bash commands that quantrimang will introduce to you later. let's follow up and find out because some commands are quite useful.
- 6 interesting terminal commands on Macterminal is a handy utility, often found on unix-based computers, such as linux and macos. there are many interesting things to do in the terminal. regardless of your experience, you can use these great terminal commands on mac.
- 18 Interesting Linux Commands in Terminalterminal is a very powerful tool, but it can be made 'interesting' through a few bash commands that tipsmake.com will introduce to you below. let's follow and learn because some commands are quite useful.
- How to format a storage drive using Linux Terminalstorage devices are an integral part of computer hardware and computers in general. this tutorial will show you how to format a storage device right from the linux terminal.
- How to Create and Edit Text File in Linux by Using Terminalthis wikihow teaches you how to use the terminal app in linux to create a text file. after doing so, you can use one of linux's built-in text editors to make changes to the file. open terminal. to do so, click menu, then find the terminal...
- How to spell check in Linux Terminallinux also has a command line spell checker utility in terminal. the utility is called aspell and is installed by default on ubuntu. this is how you can use aspell to check spelling in a terminal.
- How to search Google from Linux terminal with Googlergoogler is a terminal tool that allows you to easily run google searches from your linux terminal, with lots of options to help you find exactly what you're looking for.
- How to create and delete folders in Linux Terminalfolders are essential for your linux operating system because they contain files you may use often or that the system needs to function correctly.
- 8 best free Terminal Emulator apps for Androidterminal emulator applications on android are handy when you want to execute commands within the android operating system just like on linux.
- How to play chess in Linux terminal (with Multiplayer support over SSH)while playing chess online in a browser is simple, you can also host a two-player game in your terminal, against an opponent in the same room, or via ssh, meaning your opponent can be anywhere in the world.