Professional Documents
Culture Documents
Ubuntu Linux
book Prepared by Prof:
Rooble Mohamed Ali
1
Lecturer notes -
Eng. Roble Mohamed Ali
Linux looks like UNIX system. Linux is developed by Linux Torvalds. Linux development
began in 1991. Linux source code is available for free on the internet. The basic Linux system is
standard environment for applications and user programming.
Definition
Linux is a modern, free operating system based on UNIX standards. It has designed to run
efficiently and reliably on common PC hardware; it also runs on a variety of other platforms. It
provide a programming interface and user interface compatible with standard UNIX systems and
can run a large number of UNIX applications, including an increasing number of commercially
supported applications.
Components of a Linux System
Any Linux system consists of three components.
1. Kernel
2. System libraries
3. System utilities
Kernel:
The Kernel is responsible for maintaining all the important abstraction of the operating system. It
includes virtual memory and processes. Kernel is most important component of the Linux
system.
2
Lecturer notes -
Eng. Roble Mohamed Ali
System libraries:
It contains standard set of functions through which application can interact with the Kernel.
System library implements much of the operating system functionality that does not need the full
privileges of Kernel code.
System utilities:
System utilities are programs that perform individual, specialized management tasks
3
Lecturer notes -
Eng. Roble Mohamed Ali
1. Hardware: The hardware at the centre of the structure provides the operating system with
basic services. The hardware constitutes all the peripherals like memory (RAM, HDD, FDD, CD
etc), processor, mouse and other input devices, terminal (i.e. VDUs), printers etc.
2. The Kernel: The operating system interacts directly with the hardware, providing common
services to programs and insulating user program complexities of hardware. The operating
system is also called as Kernel. This kernel interacts directly with the hardware. Because of this
hardware isolation of user program, it is easy to move the user programs easily between UNIX
systems running on different hardware.
3. Shell: Shell is actually the interface between the user and the Kernel that isolates the user from
knowledge of Kernel functions. The shell accepts the commands keyed in by the users and
checks for their syntax and gives out error messages if something goes
Popular shells :
C shell - csh : resembles that of the C programming language
Bourne shell sh : used on Unix and Linux
Korne shell ksh : standard configuration
Tc shell - Tcsh : similar to the C shell
Bash shell the basic shell available on all linux
Flavors of UNIX
Ubuntu Philosophy
The term Ubuntu is a traditional African concept originating from the Bantu languages of
southern Africa. It can be described as a way of connecting with othersliving in a global
community where your actions affect all of humanity. Ubuntu is more than just an operating
system: it is a community of people coming together voluntarily to collaborate on an
international software project that aims to deliver the best possible user experience.
services, Shuleworth has promised that the Ubuntu desktop operating system will always be
free, As of 2012, Ubuntu is installed on an estimated 2% of the worlds computers. this equates
to tens of millions of users worldwide, and is growing each year. As there is no compulsory
registration, the percentage of Ubuntu users should be treated as an estimate.
Proprietary software is designed, developed and marketed by a company as their own system. It
is sold for profit and functions on only one type of computer. Examples of proprietary operating
systems include Microsoft Windows and Mac OS X. The source code of these systems is not
freely available and if you tried to modify or distribute it would constitute a felony.
Ubuntu, on the other hand, is NOT proprietary software because it is actively maintained by the
FLOSS community.
What Is FLOSS?
FLOSS is the acronym for Free/Libre Open-Source Software. FLOSS software is different from
proprietary or commercial software because it is:
FREE to use
FREE to develop
This means you can download and use Ubuntu without paying money. You can then make copies
of the software and distribute it to as many people as you want. Finally, the source code of
Ubuntus operating system is freely available, so you can inspect the program and make changes
to suit your own needs.
This freedom is made possible because Ubuntu uses the GNU General Public License (or simply
GPL) which is the most widely used software license in the FLOSS community. The GPL was
written by computer programmer Richard Stallman in 1989, and explicitly states that users are
free to run, copy, distribute, inspect, change, develop and improve the software provided they
provide the same freedom to others.
Canonicals main offices are in in London, but it also has offices in Canada, the US, and
Taiwan.
As youve hopefully learned by now, Ubuntu is many things, but it is most famous for being a
computer operating system. In simplest terms, an operating system, or OS, is software that
communicates with computer hardware. What sets Ubuntu apart from proprietary operating
systems, and what makes it similar to other FLOSS operating systems, is that Ubuntu uses the
Linux kernel.
There are many reasons to use Ubuntu, but here are some of the most important ones:
Its free and open source: shared code, shared efforts, shared principles, no cost.
Its easy to use, trial and install: you dont have to be an expert.
Its beautiful, sleek, and stylish: learn more about the Unity desktop environmen
Its stable and fast: usually loads in less than a minute on modern computers.
Its up-to-date: Canonical releases new versions of Ubuntu every six months and also brings
you regular updates for free.
7
Lecturer notes -
Eng. Roble Mohamed Ali
It is supported: you can get all the support and advice you need from the global FLOSS
community and Canonical.
. Ubuntu Releases
Canonical releases new versions of Ubuntu every six months, in April and October. Each Ubuntu
release has a version number that contains the year and month of its release. This guide, for
example, discusses the latest version of Ubuntu 11.10 which was released in October of 2011.
The next scheduled release of Ubuntu, version 12.04, will be in April of 2012; the one after that
will be 12.10 in October of 2012, and so on.
In addition to version numbers, Ubuntu releases are also given alliterative code names using an
adjective and an animal. The code name for Ubuntu 11.10 is Oneiric Ocelot; for version 12.04, it
will be Precise Pangolin. So if you find yourself talking to a fellow Ubuntu enthusiast and they
are raving about Natty Narwhal, they are not talking about their love for fashionable marine
mammals, but rather version 11.04 of the Ubuntu operating system.
For a complete listing of Ubuntu versions and code names, see the table below.
One of the great features of Ubuntu (and there are many) is that it is supported within a
structured time frame. New versions of the operating system are released every six months and
are normally supported by Canonical for 18 months thereafter. These versions are referred to as
normal releases.
In addition to normal releases, Canonical also develops Long Term Support (LTS) releases which
are versions of Ubuntu that are released approximately every two years (if on schedule) and are
supported for three years thereafter. The upcoming version of Ubuntu, 12.04, will be a Long
Term Support release.
8
Lecturer notes -
Eng. Roble Mohamed Ali
Ubuntu 14.10 - the current stable support version, released in late October 2014, codenamed
Utopic Unicorn.
Ubuntu 14.04 LTS - the current long term support version, released in mid April 2014,
codenamed Trusty Tahr.
Ubuntu 12.04 LTS - a previous long term support version, released in April 2012, codenamed
Precise Pangolin.
Ubuntu 10.04 LTS - a previous long term support version, released in April 2010, codenamed
Lucid Lynx
Installing Ubuntu
There are three different ways you can install Ubuntu on to your computer:
9
Lecturer notes -
Eng. Roble Mohamed Ali
This option will replace your current operating system with Ubuntu. A complete installation will
run the fastest and smoothest on your computer, but requires a full commitment to leave behind
your old operating system.
http://www.ubuntu.com/download/ubuntu/download
Note that this method can also be used to create a dual-boot setup, but requires some knowledge
of partitioning. Keep reading for an easier method.
This option will allow you to maintain your current operating system and also run Ubuntu from
an independent storage device. This installation requires the least commitment from you and
your computer, but will probably affect the quality and speed of Ubuntus performance.
http://www.ubuntu.com/download/ubuntu/download
This option, also known as a dual boot installation, will install Ubuntu on your computer
alongside your current Windows or Mac operating system. Whenever you start your computer,
you will have the option of choosing to boot into Ubuntu or Windows/Mac OS.
This is the installation option that we will be discussing in this guide as it is the easiest way for
beginners to transition to Ubuntu. Detailed instructions will be provided for a Windows 7 dual
boot installation, but for those using Mac OS,
Installing Ubuntu alongside Windows is easy to save time , here steps with pictures
10
Lecturer notes -
Eng. Roble Mohamed Ali
2. Restart your computer. You should see a welcome screen prompting you to choose your
language and giving you the option to install Ubuntu or try it from the DVD.
b. You should also make sure you have enough space on your computer to install
Ubuntu
c. We advise you to select Download updates while installing and Install this third-
party software now
d. You should also stay connected to the internet so you can get the latest updates
while you install Ubuntu
e. If youre not connected to the internet, well help you set up wireless at the next
step
11
Lecturer notes -
Eng. Roble Mohamed Ali
Depending on your previous selections, you can now verify that you have chosen the way
in which you would like to install Ubuntu. The installation process will begin when you
click the Install Now button. Ubuntu needs about 4.5 GB to install, so add a few extra GB
to allow for your files.
If you are connected to the internet, this should be done automatically. Check your
location is correct and click Forward to proceed. If youre unsure of your time zone,
type the name of the town youre in or click on the map and well help you find it.
Click on the language option you need. If youre not sure, click the Detect Keyboard
Layout button for help
12
Lecturer notes -
Eng. Roble Mohamed Ali
Now that youve successfully installed Ubuntu and logged in for the first time, you should be
greeted with a screen that looks something like this:
13
Lecturer notes -
Eng. Roble Mohamed Ali
What Is Unity?
Unity is Ubuntus default desktop environment. In simplest terms, it is what you see when you
log-in to Ubuntu. It is within Unity that you can drag, drop, and click on various icons and
menus to interact with the Ubuntu operating system
Desktop
Launcher
Panel
14
Lecturer notes -
Eng. Roble Mohamed Ali
Desktop
The desktop is your main work space and it is here that you can open, run and rearrange multiple
programs and applications.
Launcher
The Launcher is a vertical docking station for your favourite folders and applications. It lives on
the left-hand side of the Unity desktop environment and will automatically hide itself until you
hover your mouse over it. Launcher icons indicate the specific applications that can be run and
managed through the Launcher.
Panel
The panel is the horizontal bar located at the very top of the Unity desktop environment. The
panel is important because it contains the status and application menus which allow you to
control and change settings for your system and programs.
15
Lecturer notes -
Eng. Roble Mohamed Ali
Dash
The Dash is an interface (see figure below) within Unity that allows you to search for and run
any file, folder, or application. To open the Dash, simply click on the Ubuntu button at the top of
your Launcher.
The Launcher, located on the left-hand side of the Unity desktop environment, allows you to:
Open folders
Its important to note that the Launcher will automatically hide itself if you are not actively
working with it. To make the Launcher reappear, simply hover your mouse over the left-hand
side of your screen.
To open a folder or start an application from your Launcher, simply click on the Launcher icon.
As the application begins to load, the icon will flash and become translucent before returning to
its original colour.
Once an application has loaded, a small white arrow will appear on the left-hand side of the
Launcher icon. In programs where you can have multiple sessions, like web browsers, the
16
Lecturer notes -
Eng. Roble Mohamed Ali
number of arrows on the lefthand side will indicate how many windows you have open. If an
arrow appears on the right-hand side of a Launcher icon, this indicates your active application, or
the one you are currently using.
17
Lecturer notes -
Eng. Roble Mohamed Ali
If you want to change the order or position of an application in your Launcher, you can:
1. Click and drag the Launcher icon that you want to move, and then,
2. Release the mouse button to place the icon in its new location
The Launcher comes with several default applications that you can rearrange or remove
completely. Removing an icon from your Launcher, however, will not remove or uninstall the
application from your computer. You can still access any program or application from the Dash.
18
Lecturer notes -
Eng. Roble Mohamed Ali
The Panel is the horizontal bar located at the very top of your screen and contains two main
components: the application menu on the left-hand side and status menu on the right-hand side.
Application Menu
The application menu allows you to control the active applications functionality and modify its
settings and preferences. The window title, or name of the active application or folder, is
displayed in bold. To the right of the window title is the application menu (File, Edit, View, etc.).
It is important to note that the application menu will not appear unless you hover your
mouse over the left-hand side of the panel.
This functionality of automatic hiding is called menu discoverability, and while some users may
find it inconvenient, the decision to hide the menus was an aesthetic one so that the panel would
have a clean and uncluttered look.
To close (X), minimize (-) or maximize (?) the application, click on the appropriate window
button. If your application menu is not maximized, however, the window buttons will not appear
in the panel but in the application window instead.
The Status menu, located in the right-hand side of your panel, contains system indicators which
notify you of important changes to your system and allow you to control and change preferences
for the following:
19
Lecturer notes -
Eng. Roble Mohamed Ali
network connection
sound preferences
user accounts
computer session
The Messaging indicator is the leftmost indicator in the Panel Status menu. From the Messaging
indicator, you can:
See notifications for all of these services: the envelope turns green whenever a message is
waiting for you.
20
Lecturer notes -
Eng. Roble Mohamed Ali
21
Lecturer notes -
Eng. Roble Mohamed Ali
22
Lecturer notes -
Eng. Roble Mohamed Ali
23
Lecturer notes -
Eng. Roble Mohamed Ali
24
Lecturer notes -
Eng. Roble Mohamed Ali
The Session indicator is the right most indicator in the Panel Status menu.
25
Lecturer notes -
Eng. Roble Mohamed Ali
The Dash is an interface within Unity that provides you with fast and easy access to your files
and applications. You can search your computer using titles or keywords and filter your results
based on specific categories. One of the most helpful features of the Dash is that it is able to
recognize what you have opened most recently and most often making access to all of your
favourite things that much faster.
To open the Dash, simply click on the Ubuntu button at the top of your Launcher or click the
Super Key (sometimes called the Windows Key for some reason.)
26
Lecturer notes -
Eng. Roble Mohamed Ali
The Dash has a simple interface with a few components. It is basically a large screen where you
type a query in your search bar and are provided with results below. From there, you can click on
any of the search results to open the file or run the program or you can narrow your search using
filters.
When you first click on the Ubuntu button, you will be taken to the Dash home, which contains:
Shortcuts; and
Lenses
The Global search bar is where you type in your query. It is located in the top-left of every Dash
screen and is active right when you open the dash: just start typing to search.
Shortcuts in the Dash home are clickable icons that will quickly take you to the following
programs:
27
Lecturer notes -
Eng. Roble Mohamed Ali
Lenses are essential elements of the Dash through which you can search for specific types of
files and applications. You can think of a lens as a filter for your search results. There are
currently four lenses which are accessible through icons located at the bottom of the Dash:
Applications Lens
Music Lens
You can also access the Application Lens (Media, Internet, and general applications) and Files
and Folder Lens through shortcut icons in the Dash home.
28
Lecturer notes -
Eng. Roble Mohamed Ali
The Dash allows you to search for applications, files, music, and videos, and shows you items
that you have used recently. If you have ever worked on a spreadsheet or edited an image and
forgot where you saved it, you will surely find this feature of the Dash to be useful.
To start using the Dash, click the top icon in the Launcher. This icon has the Ubuntu logo on it.
For faster access, you can just press the Super key.
To hide the Dash, click the top icon again or press Super or Esc.
To start the file manager, open Files in the Launcher. You can also search for files and folders
with the Dash in the same way you would search for applications. They will appear under the
heading Files and Folders.
3. Navigate to another folder, where you want to put the copy of the file.
4. Right-click and pick Paste to finish copying the file, or press Ctrl+V. There will now be a
copy of the file in the original folder and the other folder.
4. Right-click and pick Paste to finish moving the file, or press Ctrl+V. The file will be
taken out of its original folder and moved to the other folder.
29
Lecturer notes -
Eng. Roble Mohamed Ali
2. Click Files in the top bar, select New Window (or press Ctrl+N) to open a second
window. In the new window, navigate to the folder where you want to move or copy the
file.
Click and drag the file from one window to another. This will move it if the destination is on the
same device, or copy it if the destination is on a different device
2. Press Delete on your keyboard. Alternatively, drag the item to the Trash in the sidebar.
2. Press and hold the Shift key, then press the Delete key on your keyboard.
Because you cannot undo this, you will be asked to confirm that you want to delete the file or
folder
1. Right-click on the item and select Rename, or select the file and press F2.
2. If you know the files you want are under a particular folder, go to that folder.
4. Type a word or words that you know appear in the file name. For example, if you name
all your invoices with the word "Invoice", type invoice. Press Enter. Words are matched
regardless of case.
30
Lecturer notes -
Eng. Roble Mohamed Ali
o Click Home to restrict the search results to your Home folder, or All Files to
search everywhere.
o Click + and pick a File Type from the drop-down list to narrow the search results
based on file type. Click the x button to remove this option and widen the search
results.
6. You can open, copy, delete, or otherwise work with your files from the search results, just
as you would from any folder in the file manager.
7. Click the magnifying glass in the toolbar again to exit the search and return to the folder.
You can sort files in different ways in a folder, for example by sorting them in order of date or
file size.
The menu bar is the dark strip on the top of your screen. It contains the window management
buttons, the app menus, and the status menus.
The window management buttons are on the top left corner of windows. When maximized, the
buttons are in the top left of the screen. Click the buttons to close, minimize, maximize or restore
windows.
App menus
The app menus are by default located to the right of the window management buttons. Unity
hides the app menus and the window management buttons unless you move your mouse pointer
to the top left of the screen or press Alt+F10. This feature enables you to see more of your
content at once, which is especially valuable on small screens like netbooks.
If you want, you can change the default behavior, and have your menus attached to the window
title bar of respective application instead of the menu bar.
1. Click the icon at the very right of the menu bar and select System Settings.
2. In the Personal section, click Appearance and choose the Behavior tab.
31
Lecturer notes -
Eng. Roble Mohamed Ali
3. Under Show the menus for a window, select In the window's title bar.
Status menus
Ubuntu has several different status menus (sometimes referred to as indicators) on the right side
of the menu bar. The status menus are a convenient place where you can check and modify the
state of your computer and applications.
When you've finished using your computer, you can turn it off, suspend it (to save power), or
leave it powered on and log out.
To let other users use your computer, you can either log out, or leave yourself logged in and just
switch users.
To log out or switch users, click the system menu at the very right of the menu bar and select the
appropriate option.
To lock your screen, click the system menu in the menu bar and select Lock Screen
Suspend
To save power, suspend your computer when you aren't using it. To suspend your computer
manually, click the system menu in the menu bar and select Suspend.
User accounts
Each person that uses the computer should have a different user account. This allows them to
keep their files separate from yours and to choose their own settings. It's also more secure. You
can only access a different user account if you know the password.
32
Lecturer notes -
Eng. Roble Mohamed Ali
1. Click the icon at the far right of the menu bar and select System Settings.
3. You need administrator privileges to add user accounts. Click Unlock in the top right
corner and type your password.
4. In the list of accounts on the left, click the + button to add a new user account.
5. If you want the new user to have administrative access to the computer, select
Administrator for the account type. Administrators can do things like add and delete
users, install software and drivers, and change the date and time.
6. Enter the new user's full name. The username will be filled in automatically based on the
full name. The default is probably OK, but you can change it if you like.
7. Click Create.
8. The account is initially disabled until you choose what to do about the user's password.
Under Login Options click Account disabled next to Password. Select Set a password
now from the Action drop-down list, and have the user type their password in the New
password and Confirm password fields..
You can also click the button next to the New password field to select a randomly
generated secure password. These passwords are hard for others to guess, but they can be
hard to remember, so be careful.
9. Click Change.
1. Click the icon at the far right of the menu bar and select System Settings.
33
Lecturer notes -
Eng. Roble Mohamed Ali
3. Click the picture next to your name. A drop-down gallery will be shown with some stock
login photos. If you like one of them, click it to use it for yourself.
4. If you'd rather use a picture you already have on your computer, click Browse for more
pictures.
1. Click the icon at the far right of the menu bar and select System Settings.
The label should look like a series of dots or boxes if you already have a password set.
4. Enter your current password, then a new password. Enter your new password again in the
Confirm password field.
You can also click the button next to the New password field to select a randomly
generated secure password. These passwords are hard for others to guess, but they can be
hard to remember, so be careful.
5. Click Change.
1. Click the icon at the far right of the menu bar and select System Settings.
3. Click Unlock in the top right corner and type your password to make changes. You must
be an administrative user to delete user accounts.
4. Select the user you want to delete and click the - button.
5. Each user has their own home folder for their files and settings. You can choose to keep
or delete the user's home folder. Click Delete Files if you're sure they won't be used
anymore and you need to free up disk space. These files are permanently deleted. They
34
Lecturer notes -
Eng. Roble Mohamed Ali
can't be recovered. You may want to back up the files to an external drive or CD before
deleting them.
1. Click the icon at the far right of the menu bar and select System Settings.
3. Click Unlock and enter your password to unlock the account settings. (To give a user
admin privileges, you must have admin privileges yourself.)
5. Click the label Standard next to Account type and select Administrator.
6. Close the User Accounts window. The user's privileges will be changed when they next
log in.
35
Lecturer notes -
Eng. Roble Mohamed Ali
1. Click the icon on the very right of the menu bar and select System Settings.
2. Open Displays.
3. If you have multiple displays and they are not mirrored, you can have different settings
on each display. Select a display in the preview area.
5. Click Apply. The new settings will be applied for 30 seconds before reverting back. That
way, if you cannot see anything with the new settings, your old settings will be
automatically restored. If you are happy with the new settings, click Keep This
Configuration.
1. To adjust the time and date, click on the clock located in the menu bar and select Date &
Time Settings.
2. Change the system time zone by clicking on the map or entering your city into the
Location box.
By default, Ubuntu periodically synchronizes the clock with a very accurate clock on the Internet
so you don't have to set your clock manually.
Sound
Ubuntu usually detects the audio hardware of the system automatically during installation
Volume icon and Sound Preferences
A volume icon, sitting on the top right corner of the screen, provides quick access to a number of
audio related functions. When you left-click on the volume icon you are greeted with four
options.
Change languages
When you install Ubuntu, the language you select at installation gets installed together with
English, but you can add further languages.
36
Lecturer notes -
Eng. Roble Mohamed Ali
1. Click the icon at the very right of the menu bar and select System Settings.
3. Click Install / Remove Languages.... The Installed Languages window lists all the
available languages, with the currently installed languages checked.
4. Check the languages you want to install, and uncheck those currently installed languages
you want to remove.
Email Applications
Linux: Mozilla ,Evolution, KMail
Web Browsers
Linux: Mozilla Firefox, Opera*, Chromium, Google Chrome*, Epiphany
The most popular web browsers can be installed directly from the Ubuntu Software Center.
37
Lecturer notes -
Eng. Roble Mohamed Ali
2. Click the Ubuntu Software Center icon in the Launcher, or search for Software Center in
the Dash.
3. When the Software Center launches, search for an application, or select a category and
find an application from the list.
4. Select the application that you are interested in and click Install.
5. You will be asked to enter your password. Once you have done that the installation will
begin.
6. The installation usually finishes quickly, but could take a while if you have a slow
Internet connection.
7. A shortcut to your new app will be added to the Launcher. To disable this feature,
uncheck View New Applications in Launcher.
Remove an application
The Ubuntu Software Center helps you to remove software that you no longer use.
1. Click the Ubuntu Software Center icon in the Launcher or search for Software Center in
the Dash.
2. When the Software Center opens, click the Installed button at the top.
3. Find the application that you want to remove by using the search box or by looking
through the list of installed applications.
5. You may be asked to enter your password. After you have done that, the application will
be removed.
38
Lecturer notes -
Eng. Roble Mohamed Ali
1. Click the icon at the very right of the menu bar and select System Settings.
3. Adjust the Pointer Speed slider until the pointer motion is comfortable for you.
Ubuntu supports most new printers. You can add, remove, and change printer properties by
navigating to System Settings Printing. You can also search for Printing from the Dash
search bar. Opening Printing will display the Printing-localhost window. When you want to
add a printer, you will need to make sure that it is switched on, and plugged into your computer
with a USB cable or connected to your network.
Adding a local printer
If you have a printer that is connected to your computer with a USB cable then this is termed a
local printer. You can add a printer by clicking on the Add Printer button. In the left hand pane
of the New Printer window any printers that you can install will be listed. Select the printer
that you would like to install and click Forward.You can now specify the printer name,
description and location. Each of these should remind you of that particular printer so that you
can choose the right one to use when printing. Finally, click Apply.
Adding a network printer
Make sure that your printer is connected to your network either with an Ethernet cable or via
wireless and is turned on. You can add a printer by clicking Add Printer. the New Printer
window will open. Click the +sign next to Network Printer. If your printer is found
automatically it will appear under Network
Printer. Click the printer name and then click Forward. In the text fields you can now specify
the printer name, description and location ,Finally click Apply
39
Lecturer notes -
Eng. Roble Mohamed Ali
1. Click the icon at the far right of the menu bar and select System Settings.
2. Open Printers.
3. Right click your desired default printer from the list of available printers, and click Set as
Default.
2. Select the File Systems tab to view the system's partitions and disk space usage. The
information is displayed according to Total, Free, Available and Used.
2. Select the disk you want to check from the Storage Devices list. Information and status of
the disk will appear under Drive.
Click the SMART Data button to view more drive information, or to run a self-test.
View and manage volumes and partitions using the disk utility
You can check and modify your computer's storage volumes with the disk utility.
2. In the pane marked Storage Devices, you will find hard disks, CD/DVD drives, and other
physical devices. Click the device you want to inspect.
3. In the right pane, the area labeled Volumes provides a visual breakdown of the volumes
and partitions present on the selected device. It also contains a variety of tools used to
manage these volumes.
2. Select the disk you want to wipe from the Storage Devices list.
Make sure that you have selected the correct disk! If you choose the wrong disk, all of the
files on the other disk will be deleted!
3. In the Volumes section, click Unmount Volume. Then click Format Volume.
4. In the window that pops up, choose a filesystem Type for the disk.
If you use the disk on Windows and Mac OS computers in addition to Linux computers,
choose FAT. If you only use it on Windows, NTFS may be a better option. A brief
description of the file system type will be presented as a label.
5. Give the disk a name and click Format to begin wiping the disk.
6. Once the formatting has finished, safely remove the disk. It should now be blank and
ready to use again.
A dialup connection is when your computer uses a modem to connect to the Internet through a
telephone
Line
NetworkManager
In order to connect to the Internet using Ubuntu, you need to use the Network Manager utility.
Network Manager allows you to turn network connections on or off, manage wired and wireless
networks, and make other network connections, such as dial up, mobile broadband.
1. Click the icon at the very right of the menu bar and select System Settings.
4. If you are already connected to a wireless network, you will be asked if you want to
disconnect from that network. A single wireless adapter can only connect to or create one
network at a time. Click Create Hotspot to confirm
2. Open Network and select Wired or Wireless from the list on the left, depending on which
network connection you want to find the IP address for.
2. Select the network connection that you want to set up manually. For example, if you plug
in to the network with a cable, look at the Wired tab.
42
Lecturer notes -
Eng. Roble Mohamed Ali
3. Click the connection you want to edit to select it, then click Edit.
5. Click Add and type the IP address, network mask and default gateway IP address into the
corresponding columns of the Addresses list. Press Enter or Tab after typing each
address.
These three addresses must be IP addresses; that is, they must be four numbers separated
by periods (e.g., 123.45.6.78).
6. Type the IP addresses of the DNS servers you want to use, separated by commas.
7. Click Save. If you are not connected to the network, click the network icon on the menu
bar and connect. Test the network settings by trying to visit a website or look at shared
files on the network, for example.
2. To let others view your desktop, select Allow other users to view your desktop. This
means that other people will be able to attempt to connect to your computer and view
what's on your screen.
3. To let others interact with your desktop, select Allow other users to control your desktop.
This may allow the other person to move your mouse, run applications, and browse files
on your computer, depending on the security settings which you are currently using.
The shells allow user to directly communicate with the kernel. Shells form the most important
part of TUI or terminal or console. A shell can be described as a command line interpreter.
43
Lecturer notes -
Eng. Roble Mohamed Ali
All the strings that we enter the command line are actually input to that particular shell. Based on
the inputs, it will execute the corresponding process.
The major shells available in the Linux are,
Basic commands
This section will show you the execution of some basic commands in the Bash shell.
uname r
Type and enter the following will display the current kernel version.
Here the current kernel version is displayed below the entered command.
pwd
Present working directory. It will show you in which directory are you currently working on.
ls
List command. It will list the contents of the current directory. If no path is given it will list the
files in the current directory.
Syntax: ls path of the directory to be listed
mkdir
Make directory. It will create a new directory; the following shows the creation of a new
directory called my_linux.
Syntax: mkdir path of directory to be created
44
Lecturer notes -
Eng. Roble Mohamed Ali
Another example of creating a directory called abc, and listing the current directory to find the
abc.
You can see different colours for different names. By default the colours means:
White Files
Blue Folders
Green Executable
Pink Pictures
Red Zip folders
cd
Change directory. It is used to change the working directory.
Syntax: cd path of directory into which to be changed
Following shows the changing into and listing of the directory abc.
cat
Create a text. It can be used to create and edit a text file.
To create a text file
Syntax: cat > filename
To open a text file
Syntax: cat filename
The following shows a basic usage of cat command
cp
45
Lecturer notes -
Eng. Roble Mohamed Ali
In the above example a file calles new_text is copied into the same directory with a different
name new_text2.
mv
Move command. This command is used to cut paste a file or folder into any directory.
Syntax: mv source path destination path
The same command can be used to rename a file or directory by moving them into the same
directory with a different name.
man
Manual of all commands. This command when used with a standard command, will shows you
the manual page of that command, which includes all the details about that particular command.
Syntax: man command
Example : man ls ( will show you how to use ls command )
man man ( will show you how to use the manual itself
A few important commands
Command Usage
adduser Command for creating a new user
apt-get Command for searching and installing software packages
bzip2 Command for compressing or decompressing files
46
Lecturer notes -
Eng. Roble Mohamed Ali
Terminal in Linux
Terminal is a TUI in GUI. It is actually a tool in the GUI for command line access. It is just like
command prompt in Windows.
To get terminal, just Right click > open in terminal or Accessories > Terminal
47
Lecturer notes -
Eng. Roble Mohamed Ali
$ who or w
hostname : to dispay computer name
$ who am i
alex pts/5 Mar 27 12:33
$ finge
paul@laika:~/test$ rm BigBattle
rm rf (recursive force)
cp
cp source-file destination-file
The source-file is the name of the file that cp will copy. The destination-file is the
The cp command line in Figure 5-2 copies the file named memo to memo.copy. The
period is part of the filenamejust another character. The initial ls command shows
that memo is the only file in the directory. After the cp command, a second ls shows
Filename completion
tip After you enter one or more letters of a filename (following a command) on a command line,
press
TAB and the Bourne Again Shell will complete as much of the filename as it can. When only one
filename starts with the characters you entered, the shell completes the filename and places a
SPACE after it. You can keep typing or you can press RETURN to execute the command at this
point.
When the characters you entered do not uniquely identify a filename, the shell completes what it
49
Lecturer notes -
Eng. Roble Mohamed Ali
can and waits for more input. When pressing TAB does not change the display, press TAB again
to
display a list of possible completions. For more information refer to Pathname Completion on
page 324.
$ ls
memo
$ cp memo memo.copy
$ ls
memo memo.copy
mv
Use mv to rename a file or to move the file to another directory.
When you need to rename only one file then mv is the preferred command to use.
mv wolf.jpg wolf.pdf
cp -r /etc/*.conf ~/etcbackup
Only *.conf files that are directly in /etc/ are copied.
The head command can also display the first n lines of a file.
paul@laika:~$ head -4 /etc/passwd
51
Lecturer notes -
Eng. Roble Mohamed Ali
tail
Similar to head, the tail command will display the last ten lines of a file.
paul@laika:~$ tail /etc/services
cat
The cat command is one of the most universal tools.
create files
You can use cat to create flat text files. Type the cat > winter.txt command as shown
mv existing-filename new-filename
$ ls
memo
$ mv memo memo.0130
$ lpr report
$ cat days
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
$ sort days
Friday
Monday
Saturday
Sunday
Thursday
52
Lecturer notes -
Eng. Roble Mohamed Ali
Tuesday
Wednesday
Figure 5-6 sort displays the lines of a file in order
$ bzip2 -v letter_e
$ ls l
$ bunzip2 letter_e.bz2
gzip:
The gzip (GNU zip) utility is older and less efficient than bzip2.
$ gunzip mak*
53
Lecturer notes -
Eng. Roble Mohamed Ali
login4$ ls
To see all files and directories, including hidden ones use the -a flag with the ls command.
Hidden files have a . in front of them
login4$ ls a
To print the name of the current/working directory, use the pwd command
54
Lecturer notes -
Eng. Roble Mohamed Ali
login4$ pwd
login4$ cd ssc222
You can also use the rmdir command to remove an empty directory
cp -r
Use the man command to get more information about a command it is like using help in
Windows
$ ls -l student
Exercise -1
login1$ cd ssc229
login1$ ls
If config
56
Lecturer notes -
Eng. Roble Mohamed Ali
57