Aim of the article: Introduce the reader to the usage terminal in Linux.
Linux has always been known for its powerful commands. A number of linux lovers just can't get themselves to use the mouse once they get used to using the command line.
The command also help use create scripts, which in turn help us automate a number of tasks.
The terminal is the interface where you can enter the commands and view the results. The terminal works only with commands and mouse is not supported ( except for select copy and paste).
If you have installed ubuntu you can open a terminal by going to
Applications-> Accessories -> Terminal.
Other distributions might have it under a different path. For eg: the red hat variations have the terminal under "system tools".
Once you click on the terminal, a white window should pop up with a blinking balck cursor. This is your Terminal.
Behind the blinking cursor will be your username, followed by the directory you are currently working in and then the $ prompt.
For eg if the user name you have logged in with is "user1"
desktop is the name of your computer.
what follows after : is your current directory. ( We will come to meaning of ~ later).
The "$" signifies the end of the prompt, from where you can start typing your command.
Before starting to learn commands lets learn how to navigate in the terminal using the keyboard.
type any thing on the open terminal. What ever you type will appear on the screen.
- You can delete what you have typed by using the backspace.
- You can move ahead or behind on the line using the arrow keys.
- You can delete specific characters in between by moving the cursor to the character and using the delete key.
- To execute or run the command you enter on the terminal hit enter.
- In our case now as we have not entered a correct command we will get an error
bash:testingtheterminal: command not found
Which means the computer did not understand what you asked it to do.
- Now if you use the up arrow key, you will be able to go back to the command you executed before. Which means the terminal remembers what ever you do and you can use the up and down arrow keys to move to the commands you executed before and need not type it again and again.
- To copy some text from the terminal using a mouse select the text-> right click the mouse->click on copy. The text will be copied and can be pasted to where ever you want.
- Mouse can also be used to scroll up and down in the terminal. Open the terminal and keep hitting the enter key as until the prompt exceeds the window.Now you can scroll up and down the terminal using the scroll wheel of your mouse.
- You can open any number of terminals simultaneously, you can also have tabs in the terminals. Click on the file option in your terminal, you will find and option for new tab.
- There are a few advanced options also available which makes working on terminals even more simpler, we will explore them as we learn the commands.