Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Fundamentals of

Computing
Introduction to Ubuntu
Outlines

• Overview
• Opening the terminal
• Basic Commands
Let us Learn Ubuntu
Ubuntu Getting Started
Opening the terminal
On Ubuntu you can find a launcher for the terminal by clicking on the
Activities item at the top left of the screen, then typing the first few
letters of “terminal”.
Opening the terminal
You should end up with a window like this:
Interacting with the terminal
1- pwd
pwd (print working directory) command displays the full pathname
of the current working directory.
You should see a directory path printed out (probably something like
/home/YOUR_USERNAME)
2- ls

ls (list) command lists all files and folders in your current working
directory.
If there are three files in the current directory, the output will be like
this
3- mkdir

mkdir (make directory) command allows you to create a new


directory. You can specify where you want the directory created – if
you do not do so, it will be created in your current working directory.
4- cd
cd (change director) command used to change the current working
directory.
Using this command is easy, just type cd followed by the folder
name.
You can use full paths to folders or simply the name of a folder within
the directory you are currently working
5- gedit

Text Editor (gedit)


To create or open (if exists) a specific file
The example below create or open (if exists) a file called ana.c, then
the file is ready to be edited
gedit ana.c
6- cat
It is used to display the content of a file in the Terminal, starting from
the first row and finishing on its last row.
7- cp

cp (copy) command allows you to copy a file. You should specify both
files: the file that you want to be copied and the location that you
want it copied to.
Syntax: cp source_file_name destination_file_name
cp Example
8- rm

rm (remove) command removes the specified file.

You might also like