Category: terminal

How to use the command CD in Linux Terminal – Ubuntu, Fedora, CentOS

The command CD stands for change directory. CD can be used in many ways to navigate between multiple directories just like we traverse in GUI.

cd <filename>

The above command will move to the directory specified in the angular brackets. But you have to make sure that the name given here is present in the current directory. You can see what are the folders/files in the current directory using the command LS. Also you can check your current working directory using the command PWD.

cd /path/to/another/folder

The above command will take to another folder that is far away from the current working directory. Make sure that the specified path exists. You can check the path of the current structure using the command TREE.

cd ..

The above command will move the current working directory to one level back.


The above command without any arguments will take you to the home directory no matter where your current working directory is.

There is a video example for the same, watch it below

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.