MRC/Tutorials/The terminal: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Created page with "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<blockquote>ls</blockquote>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:<blockquote>mkdir mrc</blockquo..."
 
Cleaned up page
Line 1: Line 1:
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<blockquote>ls</blockquote>It will show you all the folders in your current directory, including the folders *Desktop Documents Downloads Music Pictures Public Templates Videos*
== Introduction to the Terminal ==
Welcome to your first encounter with the '''terminal''' — a powerful tool that allows you to interact with your computer through text commands.


Lets make a folder for your course files:<blockquote>mkdir mrc</blockquote>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 open the terminal in Ubuntu, press:
<code>Ctrl + Alt + T</code>
Do you feel like a hacker already? This is your terminal window, and it's a gateway to controlling your system efficiently using text-based commands.
----


To navigate to this new directory we use the command `cd` which stands for "change directory". In the terminal type:<blockquote>cd mrc</blockquote>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>`.
=== Basic Commands ===
Let’s try a simple command. Type the following and press <code>Enter</code>:
<code>ls</code>
This will list all the folders and files in your current directory. You’ll likely see folders like:
<code>Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos</code>
Let’s create a folder for your course files. Type:
<code>mkdir mrc</code>
<blockquote><code>mkdir</code> stands for '''make directory'''. This command tells the computer to create a new folder named <code>mrc</code>.</blockquote>To confirm the folder was created, use:
<code>ls</code>
To move into the new folder, use:
<code>cd mrc</code>
You’ll notice your terminal prompt changes from something like:
<code><username>@<computername>:~$</code>
to:
<code><username>@<computername>:~/mrc$</code>
This tells you that you're now inside the <code>mrc</code> directory. The <code>~</code> symbol represents your '''home directory''', typically <code>/home/<your-username></code>.
----


==Terminator==
== Introducing Terminator ==
As you continue working, you’ll often need '''multiple terminal windows'''. Instead of opening several separate ones, you can use a tool called '''Terminator''', which lets you manage multiple terminals in a single window.


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:<blockquote>sudo apt-get install terminator</blockquote>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.
=== Installing Terminator ===
You can install Terminator using the '''Ubuntu Software Center''' or with the following terminal command:
<code>sudo apt-get install terminator</code>
After installation, close your current terminal and open '''Terminator''' (search for it in your applications).
----


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.
=== Using Terminator ===
You’ll notice it looks similar to the regular terminal, but it has powerful extra features. Try the following:


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 )
* Press <code>Ctrl + Shift + E</code> → splits the terminal '''vertically'''
* Press it again → another vertical split!
* Now you have '''three terminals''' side-by-side


When you need many terminals at once Terminator can help you to keep them organized.
To move between them:
 
* Use your '''mouse''', or
* Press <code>Alt + <arrow key></code> (e.g., <code>Alt + →</code> to move right)
 
The '''active terminal''' is highlighted with a red border — that's the one you’ll be typing into.
 
Want more space?
 
* Select a terminal pane and press <code>Ctrl + Shift + O</code> → splits it '''horizontally'''
 
With Terminator, you can organize multiple terminals in one window — perfect for multitasking during development, testing, or coursework.

Revision as of 14:43, 9 April 2025

Introduction to the Terminal

Welcome to your first encounter with the terminal — a powerful tool that allows you to interact with your computer through text commands.

To open the terminal in Ubuntu, press:

Ctrl + Alt + T

Do you feel like a hacker already? This is your terminal window, and it's a gateway to controlling your system efficiently using text-based commands.


Basic Commands

Let’s try a simple command. Type the following and press Enter:

ls

This will list all the folders and files in your current directory. You’ll likely see folders like:

Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos

Let’s create a folder for your course files. Type:

mkdir mrc

mkdir stands for make directory. This command tells the computer to create a new folder named mrc.

To confirm the folder was created, use:

ls

To move into the new folder, use:

cd mrc

You’ll notice your terminal prompt changes from something like:

<username>@<computername>:~$

to:

<username>@<computername>:~/mrc$

This tells you that you're now inside the mrc directory. The ~ symbol represents your home directory, typically /home/<your-username>.


Introducing Terminator

As you continue working, you’ll often need multiple terminal windows. Instead of opening several separate ones, you can use a tool called Terminator, which lets you manage multiple terminals in a single window.

Installing Terminator

You can install Terminator using the Ubuntu Software Center or with the following terminal command:

sudo apt-get install terminator

After installation, close your current terminal and open Terminator (search for it in your applications).


Using Terminator

You’ll notice it looks similar to the regular terminal, but it has powerful extra features. Try the following:

  • Press Ctrl + Shift + E → splits the terminal vertically
  • Press it again → another vertical split!
  • Now you have three terminals side-by-side

To move between them:

  • Use your mouse, or
  • Press Alt + <arrow key> (e.g., Alt + → to move right)

The active terminal is highlighted with a red border — that's the one you’ll be typing into.

Want more space?

  • Select a terminal pane and press Ctrl + Shift + O → splits it horizontally

With Terminator, you can organize multiple terminals in one window — perfect for multitasking during development, testing, or coursework.