MRC/Tutorials/The terminal

From Control Systems Technology Group
Jump to navigation Jump to search

We will now introduce you a tool called the terminal. On Ubuntu press ( ctrl + alt + t ). Do you feel like a hacker already? This is the terminal, it allows you to interact with your computer via text. For example try typing

ls

It will show you all the folders in your current directory, including the folders *Desktop Documents Downloads Music Pictures Public Templates Videos* Lets make a folder for your course files:

mkdir mrc

mkdir stands for "make directory". We are telling the computer to make a directory called "mrc". To check that it has indeed been created use `ls` To navigate to this new directory we use the command `cd` which stands for "change directory". In the terminal type:

cd mrc

You will notice that the prompt has changed from `<username>@<computername>:~$` to `<username>@<computername>:~/mrc$`. This indicates the current directory. `~` is short for `/home/<current user>`.

Terminator

You will soon find out that you will have to work in multiple terminals in parallel. A convenient tool to avoid having a large amount of terminals is Terminator, a program that allows you to have multiple terminals in one window. You can install it via the Ubuntu software center, or from the terminal:

sudo apt-get install terminator

Now close the terminal and open a new one. What is this!? It looks like a terminal but it is a little different. press ( ctrl + shift + e ). The terminal splits vertically! Wow, try it again. (ctrl + shift + e), and it splits into more. You now have three terminals to work with.

You can move between them with your mouse or by pressing ( alt + <arrow_key> ). Your active window is highlighted red. That is the one you will type into.

But our terminals are getting quite narrow, it would be nice if we could also split them horizontally. Try selecting the largest terminal and pressing ( ctrl + shift + o )

When you need many terminals at once Terminator can help you to keep them organized.