0% found this document useful (0 votes)
174 views132 pages

Ubuntu The Complete Manual 2016

331572308 Ubuntu the Complete Manual 2016

Uploaded by

donald1976
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views132 pages

Ubuntu The Complete Manual 2016

331572308 Ubuntu the Complete Manual 2016

Uploaded by

donald1976
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 132

The Complete Manual

The essential handbook for Ubuntu users


Welcome to
Ubuntu
The Complete Manual
Many people who want to make the move from
Windows to a Linux distribution choose Ubuntu as
their first step. It provides a clean, attractive GUI with
Unity, and usability by the bucket-load. It is the perfect
environment in which to begin learning about the
command line and creating a more customisable
workspace. Meanwhile you still get many of the
benefits you are used to in Windows and other
desktop systems. This book serves as an introduction
to the beauty and power of Ubuntu. From the default
software to the best FOSS apps to download from
the Software Centre, we’ll tour the top programs and
applications, so soon you’ll be flying with Ubuntu.
Ubuntu The Complete Manual
Imagine Publishing Ltd
Richmond House
33 Richmond Hill
Bournemouth
Dorset BH2 6EZ
 +44 (0) 1202 586200
Website: www.imagine-publishing.co.uk
Twitter: @Books_Imagine
Facebook: www.facebook.com/ImagineBookazines

Publishing Director
Aaron Asadi

Head of Design
Ross Andrews

Editor In Chief
Jon White

Production Editor
Fiona Hudson

Senior Art Editor


Greg Whitaker

Designer
Perry Wardell-Wicks

Photographer
James Sheppard

Printed by
William Gibbons, 26 Planetary Road, Willenhall, West Midlands, WV13 3XT

Distributed in the UK, Eire & the Rest of the World by


Marketforce, 5 Churchill Place, Canary Wharf, London, E14 5HU
Tel 0203 787 9060 www.marketforce.co.uk

Distributed in Australia by
Gordon & Gotch Australia Pty Ltd, 26 Rodborough Road, Frenchs Forest, NSW, 2086 Australia
Tel +61 2 9972 8800 www.gordongotch.com.au

Disclaimer
The publisher cannot accept responsibility for any unsolicited material lost or damaged in the
post. All text and layout is the copyright of Imagine Publishing Ltd. Nothing in this bookazine may
be reproduced in whole or part without the written permission of the publisher. All copyrights are
recognised and used specifically for the purpose of criticism and review. Although the bookazine has
endeavoured to ensure all information is correct at time of print, prices and availability may change.
This bookazine is fully independent and not affiliated in any way with the companies mentioned herein.

Ubuntu The Complete Manual © 2016 Imagine Publishing Ltd

ISBN 978 1785 464 195

Part of the

bookazine series
Contents
What you can ind inside the bookazine

Getting started 70 Use Startup Disk Creator


Make a bootable USB
8 Get to know Ubuntu
Find out about all the essential features

74 Unleash Archive Manager


Understand this accessory

76 Using Disk Usage Analyzer


View performance data

78 Monitor Software
& Updates
Keep your system up to date

Ubuntu essentials

20 Navigate the 46 Sharing files in Ubuntu


Ubuntu desktop Transfer your files with ease
Familiarise yourself with Unity
50 Manage drives with Disks
22 Dual boot with Ubuntu Maximise this handy feature
Run the OS alongside Windows
54 Get to grips with the
26 Customise the desktop command line 80 Work with
Personalise your workspace Understand basic commands Universal Access
Make Ubuntu more
30 Discover System Settings 62 Use GNOME Terminal user friendly
Personalise system details & Xterm
Explore all the basics 82 Configure network
34 Tweak security settings connections
Ensure your data is protected 66 Secure files with Déjà Dup Set up a new connection
Create a copy of your data
38 Find your way 84 Connect with Online
around Dash Accounts
Master this handy search bar Enjoy convenient integration

42 Understand the 86 Use System Monitor


file system Monitor all your system
Learn about file organisation resources

6
Ubuntu apps Master
88 Explore the Ubuntu 108 20 LibreOffice essentials the Linux
Software Centre
Download and install apps
Work more productively with
the LibreOffice suite platform
96 Browse with Firefox
Explore the Internet’s depths
116 Text editing with gedit
Understand this built-in app
today
100 Manage emails with 120 View images with
Thunderbird Shotwell
All your email needs covered Manage all your shots here

104 Communicate with 124 Listen to songs with


Empathy Rhythmbox
Utilise this clever messenger Keep your tunes in one place

“Getting up to speed might take a bit of


time, but you will eventually see it’s more
than worth it”
7
Getting started Get to know Ubuntu

Get to know
Ubuntu
This free, open-source operating system has gained
a lot of momentum in recent years
Ubuntu is a user-friendly Linux-based operating system that has
found its place in every corner of the world. Best of all, Ubuntu is
absolutely free, including future updates. It is also extremely light
on PC hardware, so you can install it on computers that are three
to four years old and it’ll still run smoothly. So it’s for good reason
that Ubuntu is the most widely used Linux operating system –
for desktops and in the cloud. It boasts both community and
professional support, and Ubuntu is suitable for both desktop and
server use. But that’s not all:
Ubuntu is everywhere. Almost all computer manufacturers are
shipping models based on Ubuntu.
Ubuntu is well supported. Few other Linux distros provide the
same kind of long-term support. It is more important than ever to
provide long-term support when it comes to open source projects.
Ubuntu is easy to use. It’s easy to pick up and use, even if you
come from a Windows background (Fig 1).
Ubuntu is pretty stable. For most users, Ubuntu just works. This is
because the OS is being tweaked and ixed all the time. Since all the
latest packages are not integrated during the development cycle, it
also helps in providing better stability.

Fig 1 (right) The Ubuntu interface is easy


to navigate and use

8
Get to know Ubuntu Getting started

Start with the trial version Boot Ubuntu from a


Try out Ubuntu before installing it disc or USB stick
As a newcomer to Ubuntu,
System requirements vary among Ubuntu products. For the Ubuntu you will be able to try it out
desktop release 16.04, a PC with at least 512MB of RAM and 5GB of before installing it. This can
disk space is highly recommended. For less powerful computers, it’s be done using either an
Ubuntu DVD in the drive or a
best to use one of the other Ubuntu distributions. USB stick with Ubuntu on it
Ubuntu can be booted from a USB drive or CD and used without in a USB port.
even installing it. Let’s take a look at the diferent ways to download 01 If using a DVD, put the
and use the Ubuntu trial version… Ubuntu DVD into the drive
and restart the computer.
You will see a welcome
Live booting and virtual machines screen which prompts you to
One of the easiest ways to get started with Ubuntu is by creating select your chosen language.
There will also be an option
a live USB drive, CD or DVD. After placing Ubuntu onto it, you can to install Ubuntu or try it
insert your USB stick or disc into any computer, then restart it. The from the DVD.
computer should then boot from the removable medium and you 02 If you want to use a
can use Ubuntu without making changes to the hard drive. USB drive, note that the
You may be wondering how to create a live Ubuntu USB drive or latest computers can start
up from a USB stick. Here
disc. For this, you can download the latest Ubuntu disk image from you’ll also see a welcome
Ubuntu’s website. Use the UNetbootin tool to put Ubuntu on your screen that prompts you to
USB lash drive or burn the downloaded ISO image to a disc. All you choose a language and gives
an option to either install
need to do now is to restart your computer from the removable Ubuntu or try it from the
medium you provided and select the ‘Try Ubuntu’ option. USB stick.
03 Irrespective of whether
you are using the DVD
or USB stick method, the
next step is to select your
preferred language and then
click on ‘Try Ubuntu’. Your
live desktop will then appear
(as shown in the picture seen
to the left, Fig 2).
04 As a final step, when you
are ready to install Ubuntu,
you just need to double-click
on the icon on your desktop:
’Install Ubuntu 16.04 LTS’.

Fig 2 (above) If successful, you will be presented with the standard Ubuntu desktop

9
Getting started Get to know Ubuntu

Like any other operating system, Ubuntu can also be run in a


virtual machine on your computer. In this way, you’ll be able to try
Linux without even restarting your computer, although you should
note that virtual machines are slower than running the operating
system on your computer itself.
To create an Ubuntu virtual machine, irst you need to
download and install VirtualBox. Create a new virtual machine
with it, select the Ubuntu operating system, and provide the ISO
ile you downloaded from Ubuntu’s website when prompted.
The installation process is pretty self-explanatory and you can go
through it in the virtual machine as if you were installing Ubuntu on
a real computer.

“You’ll be able to try Linux without even


Fig 3 (below) Install Ubuntu or try it
restarting your computer”
out with the trial version

10
Get to know Ubuntu Getting started

Adopting the full version Internet connection


New versions are released every six months
and are supported for 18 months It is important to have an
Internet connection during
the Ubuntu installation
process. If you are not
As noted previously, Ubuntu is a very popular Linux distribution with
connected to the Internet,
many years of experience and a huge user base. After becoming the installer will ask you to
comfortable with the initial aspects of Ubuntu, it is time to take choose a wireless network,
if one is available. You can
a look at Ubuntu’s full version. Before you start with Ubuntu, you
follow these three steps in
need to obtain a copy of the Ubuntu installation image. In addition, such a scenario…
you will have to ensure that your system meets the minimum
01 Select ‘Connect to this
requirements. The most common method of obtaining Ubuntu is network’ and choose your
to download the Ubuntu DVD image directly from the oicial site, network from the list.
ubuntu.com/download. To download and install it, you just need 02 In the ‘Password’ field,
to select whether you require the 32-bit or 64-bit version and then enter your router’s WEP or
WPA key.
click ‘Start download’.
It is important to understand these two versions that Ubuntu 03 Then click ‘Connect’ in
order to continue.
is available in: 32-bit and 64-bit. They difer from each other in the
way the computer processes information. So if your computer has
a 64-bit processor, you will need to install the 64-bit version. On
the other hand, if you have an older computer or you do not know
the type of the processor in your computer, it is advisable to opt to
install the 32-bit version.
Although 5GB of free space on your hard drive is required for
installing Ubuntu, the recommendation is to have 15GB or more.
This will mean you’ll have enough space to install extra applications,
as well as to store your own documents, music and more.
If you have an Internet connection, the installer will ask you now
whether you want to ‘Download updates while installing’. It is highly
recommended to perform this step. Fig 4 (below) Make sure you have the
available drive space before installing

11
Getting started Get to know Ubuntu

"DDPVOUTFUVQ 0QUJPOTGPSJOTUBMMBUJPO
You can install Ubuntu alongside another OS or replace it
6CVOUVOFFETUPLOPX
TPNFJOGPSNBUJPOBCPVU
ZPVTPUIBUJUDBOTFUVQUIF The Ubuntu installer will automatically detect any existing operating
QSJNBSZVTFSBDDPVOUPO system installed on your machine, and present installation options
ZPVSDPNQVUFS"TZPVNJHIU
to suit your system. Please note that the following options below
FYQFDU XIFODPOGJHVSFE 
ZPVSOBNFXJMMBQQFBSPO entirely depend on your speciic system and may not all be
UIFMPHJOTDSFFOBTXFMMBT available to you:
UIFVTFSNFOV
0OUIJTTDSFFOZPVXJMMOFFE t*OTUBMMBMPOHTJEFPUIFSPQFSBUJOHTZTUFNT
UPQSPWJEFUIFGPMMPXJOH
t6QHSBEF6CVOUVyUP
JOGPSNBUJPOUP6CVOUVy
t&SBTFyBOEJOTUBMM6CVOUV
t:PVSOBNF
t4PNFUIJOHFMTF
t8IBUZPVXBOUUPDBMMZPVS
DPNQVUFS
t:PVSEFTJSFEVTFSOBNF Out of the above four options, the most preferred is ‘Upgrade
t:PVSEFTJSFEQBTTXPSE Ubuntu … to 16.04’. This is because this option will allow you to
"GUFSUIFJOTUBMMBUJPO keep all your precious documents, music, pictures and any other
JTDPNQMFUFBOEZPVS personal iles on the computer. Installed software will be retained
DPNQVUFSIBTSFTUBSUFE  when possible and system-wide settings will be cleared.
ZPVXJMMCFHSFFUFEXJUIUIF
MPHJOTDSFFOPG6CVOUV5IF The ‘Erase disk and install Ubuntu’ option can be used if you want
MPHJOTDSFFOXJMMQSFTFOUZPV to erase your entire disk. As expected, this will delete any existing
XJUIZPVSVTFSOBNF BOE operating system that is installed on that disk and install Ubuntu in
ZPVXJMMOFFEUPFOUFSUIF
QBTTXPSEUIBUZPVQSPWJEFE its place.
QSFWJPVTMZJOPSEFSUP When you choose the ‘Something else’ option, you will be able
QSPDFFE$MJDLUPFOUFSZPVS to conigure the partitions as you need before installing Ubuntu.
VTFSOBNFBOEQBTTXPSE
ZPVDBOUIFOQSFTT&OUFSUP It can be noted here that in order to reduce the time required
BDDFTTUIF6CVOUVEFTLUPQ for installation, Ubuntu will continue the installation process in the
0ODFZPVS6CVOUVEFTLUPQJT background while the user conigures all the important user details
SFBEZ ZPVNBZCFJOUFSFTUFE like username, password, keyboard settings, the default time zone
JOWJFXJOHUIFIJEEFOGJMFT and so on.
5IJTDBOCFFBTJMZEPOFCZ
DMJDLJOH7JFX0QUJPOT4IPX
)JEEFO'JMFT
“After successfully installing Ubuntu,
"GUFSTVDDFTTGVMMZJOTUBMMJOH
6CVOUV ZPVNBZBMTPXBOU you may also want to encrypt your
UPFODSZQUZPVSIPNFGPMEFS
*UUBLFTWFSZMJUUMFUJNFBOE
home folder. It takes very little time
JTQSFUUZTUSBJHIUGPSXBSE and is pretty straightforward. This is
5IJTTUBHFJTDPOTJEFSFEUP
CFBOJNQPSUBOUTUFQUPUBLF considered to be an important step
CFGPSFZPVQSPDFFEBOZ
GVSUIFSXJUI6CVOUV
before you proceed any further”
12
Get to know Ubuntu Getting started

You may notice that Ubuntu


is a little different to some
other operating systems.
The most important thing
to understand is the Ubuntu
packaging system. Typically
it includes:
/usr
/var
/bin
/sbin
/lib
The other thing to note here
is cron job management.
The jobs that are the under
the purview of the system
administrator can be found
in the /etc directory. If you
have a root cron job for
daily, weekly or monthly
runs, make sure to place
them under /etc/cron.
{daily,weekly,monthly}.
Fig 5 You can choose to
employ the Terminal These jobs can be invoked
from /etc/crontab.

Navigate Ubuntu There is a tool called ‘Ubuntu


After Install’, which can be
Decode the menu bar, Launcher, Dash, home used to install some of the
directory and more best and most essential
software after installing the
Ubuntu desktop. It boasts a
After taking a look at the initial aspects of Ubuntu, now it’s time bunch of useful applications,
and will automate the
to delve deeper into the operating system. To start with, you may installation process on a
notice many similarities between Ubuntu and other operating newly installed machine
systems – mainly because they are all based on the concept of in order to obtain a near
perfect desktop. This tool
a GUI (graphical user interface). It is a good idea to understand will save a lot of your time
the applications and menus in Ubuntu so that you can become and effort, and installs all
comfortable with using its GUI. Any GUI-based operating system latest versions of software on
your Ubuntu system.
makes use of a desktop environment. The main features provided
by a desktop environment are related to the look and feel of the
system and how easily a user can navigate the desktop.
Let us take a quick look at the menu bar in Ubuntu. The menu
bar incorporates the most common functions used in Ubuntu.
Each installation of Ubuntu may contain slightly diferent icons
based on a number of factors, including the type of hardware.

13
Getting started Get to know Ubuntu

For example, some programs add an icon to the indicator area


automatically during installation. You should note that every
application features its own menu system wherein diferent
actions can be executed within it (such as File, Edit, View and so
on). Appropriately, the menu system for an application is known
as the application menu.
Another thing that we need to understand in Ubuntu is the
‘Launcher’ – the vertical bar of icons available on the left side of
the desktop (Fig 6). With the help of this Launcher, one can easily
access the various applications, mounted devices and trash. Note
that any application that is running will have its icon placed in
the Launcher bar.
In Ubuntu, we commonly come across something called
‘Dash’. If you have used Windows in the past, you can consider
Dash as something similar to the Windows Start menu. The Dash
will help you to ind the applications and iles you’re looking
for on your machine. To explore the Dash, you need to click on
the topmost icon on the Launcher. Now you will be able to see
a window with a search bar on the top as well as the recently
accessed applications, iles and downloads.
Fig 6 (above) To run any application from the Launcher,
you just need to click on the application’s icon

Fig 7 Type to search for files or folders and suggested


results will appear in the Dash menu

14
Get to know Ubuntu Getting started

Fig 8 (above) Conduct a computer and Internet-wide search from the Dash

Fig 9 (above) Navigate to the browser app for more advanced searches

15
Getting started Get to know Ubuntu

As mentioned above, Dash is a very powerful tool that can be


used to search for iles and applications on your computer. Find iles
or folders by simply typing a portion of the ile or folder name (Fig 7,
page 14). As you type, the results will appear in the Dash.
As expected, a standard Ubuntu installation comes with many
applications, but users can additionally download thousands of
applications from the Ubuntu Software Centre. The Applications
lens on the Dash will automatically categorise installed applications
under ‘Recently Used’, ‘Installed’ or ‘More Suggestions’.
You can also enter the name of an application (or a part of it)
into the search bar in the Dash, and the names of applications
matching your search criteria will appear (Fig 8, page 15). Even if you
don’t remember the name of the application, type a keyword that
is relevant to that application and the Dash will be able to ind it.
Another thing that we need to understand here is that in addition
to searching your local machine for iles and applications, Dash can
help in searching various online resources.
Now let’s take a look at how to browse the iles on your machine.
Fig 10 (below) Search the home directory for
In addition to using Dash to search for iles, one can also access
files on your machine them directly from their directory. The home directory (Fig 10) is

16
Get to know Ubuntu Getting started

used to store all of your personal iles (instead of system-related iles).


Sometimes, you may need to make use of the ‘Files’ ile manager
window. Whenever you select the Files shortcut in the Launcher,
Ubuntu will open this ile manager.
As you can see from the screenshot opposite, this window comes
with the following features:
menu bar: It is located at the top of the screen. With this
menu bar, one will be able to browse and remove
bookmarks, open a new window, connect to a server,
quit etc.
title bar: This indicates the name of the currently
selected directory.
toolbar: This displays your location in the ile system, a search
Fig 11 (below) Most customisation options are
button etc. available in the System Settings menu

17
Getting started Get to know Ubuntu

“Although Ubuntu provides a nice GUI,


to fully utilise the power of the OS you’ll
need to understand the ‘terminal’”
Sometimes, you may need to customise your Ubuntu desktop.
Most customisation can be achieved via the Session Indicator
and then selecting System Settings to open the System Settings
application window (Fig 11, page 17).
Once you are done with working on your machine, you can
select from the options to log out, suspend, restart or shut down
through the Session Indicator.

Understand the terminal


Go further by utilising the command line

Although Ubuntu provides a nice GUI, to fully utilise the power


of the OS you’ll need to understand the ‘terminal’. Any operating
system has two types of user interface:
GUI: This is the desktop, windows, menus and toolbars that you
click to get things done.
Command-line interface (CLI): The terminal is Ubuntu’s CLI. It
can be considered as a method for controlling some aspects of
Ubuntu using only commands that you type on the keyboard. Even
Ubuntu file system though users are able to perform most day-to-day activities without
structure ever opening a terminal, it is considered to be very powerful tool
and is therefore well worth investigating. With it, you will be able to
Ubuntu uses the Linux file perform many useful tasks.
system and it is based on a
series of folders in the root
directory. These folders Troubleshooting tasks: If you face any diiculties while using
contain important system Ubuntu, you may need to use the terminal. If you need to perform
files that cannot be modified
unless you are running as operations on multiple iles at the same time, then the terminal
the root user or use the is the preferred method. System administration and software
sudo command. With this development skills can be signiicantly improved by having a good
restriction, computer viruses
will not be able to change understanding of the CLI. A terminal can be opened either by
the core system files, and hitting Alt+Ctrl+T or by right-clicking on the desktop and selecting
normal users will not be ‘Terminal’ from the menu.
able to accidently change
anything that is critical. Please note that all the commands in the terminal follow the
same approach: you can type the command, possibly followed
18
Get to know Ubuntu Getting started

4FDVSJOH6CVOUV
Ubuntu is considered to be
so secure primarily thanks to
the following reasons…
t.BOZWJSVTFTEFTJHOFEUP
primarily target Windows-
based systems do not affect
Ubuntu systems.
t4FDVSJUZQBUDIFTGPSPQFO
source software like Ubuntu
are often released quickly.
t0QFOTPVSDFTPGUXBSFMJLF
Ubuntu allows security flaws
to be easily detected.
t5IFCBTJDTFDVSJUZ
concepts such as file
Fig 12 (above) Use the terminal to conduct actions using the command line
permissions, passwords
and user accounts are also
by some parameters, and then press Enter in order to perform the BWBJMBCMFXJUI6CVOUV
speciied action (Fig 12). In most cases, some type of output will Understanding these
be displayed in order to conirm that the action was completed concepts will help you in
securing your computer.
successfully, although this can depend on whether the command
is executed.
Ubuntu ofers various text editors which are installed by default.
The most commonly used command-line editor is called Vim. The
table below gives quick information about some of the important
iles in Ubuntu.
Another concept that users need to know about is mounting
and unmounting removable devices. Mounting a device means
associating a directory name with the device, and this in turn
allows you to navigate to the directory to access the device’s iles.
When you’ve inished using a device, you can safely unmount it.
Unmounting a device disassociates the device from its directory,
allowing you to eject it.

File A quick description


/etc/issue (JWFTJOGPBCPVU6CVOUVWFSTJPOUIBUZPVBSFDVSSFOUMZ
running

/etc/apt/sources.list $POUBJOTUIFBWBJMBCMFTPVSDFTGPSTPGUXBSFJOTUBMMBUJPO

lsb_release -a 1SJOUTPVUUIF6CVOUVWFSTJPOZPVBSFSVOOJOH

/usr/share/tomcat *OTUBMMBUJPOEJSFDUPSZGPS5PNDBU

19
Ubuntu essentials Navigate the Ubuntu desktop

Navigate the
Ubuntu desktop
Find everything you need on the intuitive and attractive
Ubuntu desktop interface, Unity
When Ubuntu irst introduced its Unity desktop,
some users threatened to move back to
Windows Vista. But as time went by, the desktop Quick-launch apps
became more reliable: as of 12.04 LTS, there Right-click on the symbol of a
running application to open a
is no real reason to dislike Unity. Unity initially short menu. Selecting ‘Lock to
Launcher’ from the available
started out as a research product trying to create options ensures that the symbol
will always remain in the bar
a GUI that was better suited to netbooks: their for quick access to that specific
application, even if it is not
extremely wide displays did not work particularly currently running

well with traditional desktop managers that


had been intended for workstations utilising
View app status
the standard 4:3 displays. This explains two All of the running applications are
shown below the Dash symbol.
important changes to the interface: irst of all, The arrows located on the left
side of the icon let you know
the Launcher was moved to the side of the the number of windows that are
currently open. On dual-screen
screen to preserve the valuable vertical real workstations, an ‘empty’ arrow
here indicates that the window
estate. Secondly, the menu bars of the various is not located on the display that
is showing this particular version
diferent applications were grouped together of the bar

into one top bar that is always dedicated to the


currently enabled application. This is one of the
main diferences you will ind from Windows and
other distros in terms of usability, but it is one
that you will become accustomed to over time.
While getting up to speed with Unity might
take users a bit of time, rest assured that you will Trash
Just where you’d expect to find it,
the trash can is always visible at the
eventually see are more than worth it. bottom of the quick launch bar

“Unity initially started out as a research product trying to create


a GUI that was better suited to netbooks”
20
Navigate the Ubuntu desktop Ubuntu essentials

The Dash The menu bar The keyboard Wallpaper


Unity’s start menu is keyboard-driven Move your mouse cursor As with practically any
and opening it in this way can save time. up to the very top of the
cheatsheet other distro or OS, your
Unity comes with a set of helpful
Savvy users will open it using the Windows screen to enable the menu wallpaper is a blank
keyboard shortcuts that increase
key on their keyboard. You can get a real display. This is a really canvas to put your own
productivity and get things done
productivity boost by following it up with a helpful tool for accessibility stamp on. The default
faster. Press and hold on the
few characters describing the app you are as less dexterity is required Ubuntu offering isn’t too
Windows key to display a list of
looking for, for example by entering ‘Thun’ to complete it. Simply flick shabby, though
shortcuts in the middle of the screen
after tapping the Windows key virtually the cursor to the top of the
that is currently active
ensures that the Thunderbird icon appears screen and let Unity take
right in the middle of the application list care of any overshoot

Active workspace The indicator menu


Front and centre is the window you’re Ubuntu will display symbols
working on. To switch to another without alerting you about any events
closing the current window, just click on and/or important system
or search for the app you want to open state changes that are taking
next. It can be minimised if you hover at place or need your attention.
the top of the window – the classic three Click on any of these icons
buttons will appear with options to close, when they appear to reveal
minimise or maximise. Be aware that a short menu providing you
clicking the close option will mean you with further options about the
need to start the program again situation at hand

21
Ubuntu essentials Dual boot with Ubuntu

Dual boot
with Ubuntu
Get Ubuntu running alongside your existing
Windows installation
Most users who want to try Ubuntu already have desktop PCs or
laptops with the Windows OS. Ubuntu can be installed alongside
Windows and both systems will coexist just ine, without interfering
with each other.
Ubuntu’s installation wizard has an advanced disk partition stage,
where you can either trust the installer to automatically shrink the
Windows partition and let Ubuntu use the freed space, or you can
do it manually. Shrinking NTFS partitions from Linux is considered
stable enough and if you didn’t have any problems with your C
drive in Windows (such as severe fragmentation), Ubuntu will resize
it correctly. The installer will create the mandatory root partition (/)
in the free disk area and sometimes also create separate partitions
for user data (/home) and swap space.
After the installer copies Ubuntu iles to the root partition, it’ll
perform post-installation arrangements and install the GRUB2
bootloader into the master boot record (MBR) of the hard drive
on older systems, or GRUB2-EFI into the dedicated FAT32 partition
on modern systems with Windows 8 or 10 and a GPT-formatted
drive. The Ubuntu installer supports the Secure Boot feature of
many modern Windows PCs and installs the GRUB2-EFI bootloader
correctly. After rebooting, you’ll see the GRUB2/GRUB2-EFI interface,
where you can choose Ubuntu or Windows.
You will ind that it’s possible for you to access Windows iles from
Ubuntu, but not vice versa.

“Ubuntu can be installed alongside Windows and both


systems will coexist just ine”
22
Dual boot with Ubuntu Ubuntu essentials

Discover bootloader menu Find out how to use the GRUB2 bootloader

Meet the GNU GRUB The default entry


GRUB in Ubuntu looks nearly If you do nothing, GRUB will load the default
identical on systems with a BIOS menu entry, which is the first one in the list.
or UEFI setup. The version of the It always points to the latest installed kernel
program is displayed on the top version with default parameters

Boot Windows Reveal the power of GRUB


Select the last entry to boot Windows. GRUB You can instantly change boot settings by
will redirect you to the Microsoft standard pressing the E key, editing an entry and then
bootloader that sits on the Windows partition pressing F10. This is a one-time solution: GRUB
will discard such custom settings after reboot

“You will ind that it’s possible for you to access Windows iles
from Ubuntu, but not vice versa”
23
Ubuntu essentials Dual boot with Ubuntu

Discover
bootloader menu
The automatic partitioning Fig 1 (above) The installation type has
been automatically detected
option in the Ubuntu
installer is definitely more
comfortable for non-tech- Dare to go for manual setup
savvy users, but it does have
Ubuntu’s installation program has been polished in recent years
certain limitations, such as
the inability to add an extra and now looks very smooth. Soon after completing basic steps
Home partition or define (like language selection), a user faces the irst real obstacle during
the swap space manually.
the ‘Installation type’ step. You can see above that Ubuntu has
Let’s use the fully fledged
partitioning method by automatically detected our Windows 7 copy and ofered the simple
choosing the ‘Something solution that does not require any extra user input (Fig 1). Here you
else’ option in the previous
can let the installer automatically guess what OS you already have
step, or by clicking the
‘Advanced partitioning tool’ and how to keep it intact. It’s safe, and you’ll be able to deine how
link in the ‘simple’ mode. much space you want to allocate for Ubuntu in the next step.
First, you’ll need to resize
Note the second option with the red Warning label – we are
the NTFS volume and make
it smaller by some number going to install Ubuntu and keep Windows working, so do not
of gigabytes. Make sure that choose this. The last option is a path to a more expert-like drive
you don’t have excessive
allocation program. Dual-booting in UEFI mode introduces more
hard disk fragmentation
in Windows, otherwise routines for the Ubuntu installer. If you’re unsure what to choose,
you may turn your NTFS go with auto mode. If your system uses a BIOS interface, you can
volume in Ubuntu installer
repartition your drive manually.
unusable. Try to guess how
much space you’ll need in
the unallocated area after
shrinking. For instance,
10GB looks like the bare
minimum – go with at least
“The automatic partitioning option in
twice as much as that for the
Ubuntu root partition. Think
the Ubuntu installer is deinitely more
ahead to cover aspects like comfortable for non-tech-savvy users,
swapping and a separate
partition for /home.
but it does have certain limitations”

24
Dual boot with Ubuntu Ubuntu essentials

Select target drive for the bootloader Create Ubuntu


This option only requires your attention if it’s the case that you have
partitions
more than one hard drive inside or attached to your computer.
Otherwise, if you had previously installed custom operating systems Many older articles
onto your Windows desktop PC or laptop, you might ind it useful concerning the installation of
to get to grips with this option as well. First of all, in order to boot Linux strongly advise users
to create a swap partition
correctly, Ubuntu needs a properly installed GRUB bootloader. with a size twice that of the
You can install it on a hard drive (eg /dev/sda) or on a drive RAM volume (for instance,
partition (eg /dev/sda3). If you have a relatively modern UEFI/Secure 2GB if you have 1GB of
RAM). However, modern
Boot setup, then Ubuntu will act diferently: it will install GRUB2-EFI computers generally have
on /dev/sda1, which is a FAT32 partition, and mount it as /boot/ei. larger amounts of RAM and
Furthermore, a special loader entry in your computer’s UEFI internals therefore this rule is not that
important any more. That
will be made by the means of the ‘eibbotmgr’ utility. Don’t worry being said, you could go
though, Ubuntu does all of this automatically. without the swap partition
altogether unless you feel
that you really need it. The
separate partition for your
“If you go with a single root partition, that home folder in Ubuntu is
means all your personal iles and settings another aspect to consider.
If you go with a single root
will be kept together” partition, that means all your
personal files and settings
will be kept together with
the rest of the system on a
single partition (/), just like
if you only had the C: drive
in Windows for storing
everything. Sometimes it
is more sensible to create
another partition and mount
it as /home – this means
that your files and settings
will not get lost, even if you
decide to reinstall or remove
Ubuntu in the future.

Fig 2 (above) Install GRUB bootloader onto a hard


drive or drive partition

25
Ubuntu essentials Customising the desktop

Customising
the desktop
Change desktop settings and add a personal touch
to Ubuntu’s exterior

The default desktop environment in Ubuntu is called Unity. It


provides users with a consistent and easy-to-use graphical interface
for performing everyday tasks. The default settings are quite simple,
based on studies into the features people ind comfortable and
intuitive. However, with so many people with so many diferent
tastes, Unity allows all essential features, such as appearance and
behaviour of the desktop, to be customised to the user’s liking.
This is done with the Look and Feel settings, localisation, input
options as well as privacy-related settings. Some of the above
don’t afect Ubuntu behaviour – such as various aesthetic settings
(theme, icons), but some do.
It is worth mentioning that sometimes people need more
precise control over their Ubuntu installation and require some
extra features that are not part of the out-of-the-box Ubuntu. For
that reason, there are diferent ways to work around it in the form
of commands ($ gsettings) and even stand-alone tweakers (eg
Unity-tweak-tool). Such extras let you change advanced settings
like fonts, window control placement, desktop efects and more.
Next you can ind out how you can change the most common
settings and resolve frequently occurring issues.

Adjust the Launcher

01 The taskbar panel or the Launcher works just fine, but sometimes you
need to get rid of some of the default icons and add your favourite apps
instead. To remove an icon, right-click on it and select the ‘Unlock from Launcher’
option. To add an application to the taskbar you first need to find it in the Dash
and drag it to the desired position on the taskbar. You can also drag and rearrange
the existing icons on the taskbar. Use the Appearance>Look section in System
Settings to change the taskbar icon size. If you make it smaller, more icons will fit
there, which is helpful for small displays. Also, check the Behaviour tab for auto-
hiding option, enabling multiple workspaces and more.

26
Customising the desktop Ubuntu essentials

“With so many people with so many diferent tastes, Unity


allows all essential features, such as appearance and behaviour
of the desktop, to be customised”

Tweak desktop settings Use related sections in Ubuntu’s System Settings app

Unity Tweak Tool Window manager


It’s not included right out of the There are ways to can change
box, but it is instantly available in Change specific the behaviour of window
the standard Ubuntu online repos- settings manager in Unity. Shadows,
itory. Get it with $ sudo apt-get Unity is made up of various translucency, animations, hot
install unity-tweak-tool different elements, including corners, snapping, focusing Default wallpaper
the main taskbar which is along rules, etc You can set the default Ubuntu
the right side of the screen, wallpaper to a photo (or maybe
the main menu with a search a drawing) of your choice in
feature (Dash), the top panel the Appearance section of the
and the task switcher standard System Settings

Appearance settings A Register Editor


Here you can change GTK style, for Ubuntu Change the theme
window decoration theme System settings Use the command $ sudo
This defines how various
and fonts separately, change Unity Tweak Tool offers apt-get install dconf-
UI controls look, and this
mouse cursor look and move advanced system settings, eg editor to install a twin panel
includes buttons, scroll bars,
window buttons to another enabling desktop icons, extra settings manager. It behaves
menu background, window
edge of a window security measures, control similarly to the Register Editor
decorations and lots of
over scroll bars as well as in Windows OS and lets you
other details
mouse behaviour adjust many hidden settings

27
Ubuntu essentials Customising the desktop

Fig 1 (above) You can use hot corners


to streamline your Ubuntu experience Change privacy settings Change look and feel

02 Ubuntu includes certain


mechanisms for gathering
users’ data and collecting statistics
03 Changing the interface theme
can dramatically alter the
working experience. It is perfectly
– of course, this is meant entirely for safe: you don’t change how your
the sake of better usability in future desktop works, you change how it
Ubuntu releases. Some find this looks. By default, Ubuntu ships with
behaviour controversial, so let’s adjust three themes: Ambiance (the default
it a little. In System Settings>Security one), Radiance (light colours) and
and Privacy go to the Files & High Contrast (for visually challenged).
Applications tab and uncheck or You can add more by installing new
maybe turn completely off files and themes via command line (adding
applications usage statistics. On the a PPA with a theme and installing its
Search tab you can actually turn the package for example), or download
online search results in Unity Dash on themes manually from sites like
or off. For example, if you don’t like gnome-look.org. Ubuntu looks for
shopping suggestions while looking themes in the system-wide /usr/share/
for a local app on your computer, themes directory and in ~/.themes
simply turn it off. inside your home.

28
Customising the desktop Ubuntu essentials

Fig 2 Get more customisation


control with dconf Editor

Use hot corners Rule the indicators

04 The Unity desktop lets you assign an action to any corner of the screen,
plus to any of its sides. In order to do this, we need to access advanced
window manager settings. Launch Unity Tweak Tool and go to Window
05 The ‘System Tray’ area resides
the far-right corner of the
top bar. Some indicators can be
Manager>Hotcorners. There are eight areas (four corners and four sides) with configured individually but for more
a drop-down menu next to each, letting you choose what action will be control you will need to deal with
performed once you move your mouse to the respective area of the screen. dconf-editor (Fig 2). This twin-panel
You can set a corner or a side to toggle the desktop (for example, minimise all app has a categories list on the left
windows or bring them back on), spread windows or show workspaces. All and the contents on the right allows
changes are applied instantly, and you can check by driving your mouse to a you adjust aspects of Unity indicators.
corner or side where an action has been assigned. Go to com>canonical>indicator and
explore the parameters of each one.
You can turn indicator presence on
“Check hot corners have been applied the top bar on and off by toggling
the ‘visibility’ parameter and change
by driving your mouse to a corner or side indicators’ display format by playing
with ‘show-*’ parameters. This way
where an action has been assigned” you can keep your system tray area
clean and tidy.

29
Ubuntu essentials Discover System Settings

Discover
System Settings
Discover system details, manage user accounts and
conigure hardware

The System Settings application houses various settings and acts


the same way as the Control Panel in Windows. You can launch
System Settings from the farthest indicator in the top bar, or even
from the command line ($ unity-control-center). Of course, the
set of system-related settings here isn’t the only place where you
can change such settings, but it is the most convenient and safe
place to do it. Traditionally in Linux (and Ubuntu is no exception),
system settings could be changed via editing coniguration iles
in the /etc directory, or by issuing certain commands while being
in root. While these work in Ubuntu, it requires advanced skills
and sometimes involves putting your Linux installation at risk. The
System Settings shell in Ubuntu contains a limited number of neatly
designed items that help you manage essential system-related
settings with ease and minimum skill. The System subsection
contains settings for Backup, System Details, Landscape Service,
Software Sources, Time & Date, Universal Access and User Accounts.
Some of the above are applicable for enterprise Ubuntu users
(such as the paid subscription for technical support, which is called
Landscape), while other settings are covered in detail in separate
chapters (Backup, Time & Date, etc). This overview focuses on Details
and User Accounts as well as on certain hardware-related settings.

“The System Settings shell in Ubuntu


contains a limited number of neatly
designed items that help you manage
essential system-related settings with
ease and minimum skill”
30
Discover System Settings Ubuntu essentials

View important subsections Conigure your Ubuntu installation

Navigation Search for a setting


It’s not included right out of the If you cannot find the required
box, but it is instantly available in settings but you know its name,
the standard Ubuntu online reposi- type it into the search bar and
tory. Get it with $ sudo apt-get see how System Settings filter
install unity-tweak-tool the results according to your
input on the fly

Personal settings Hardware settings System-related


Most settings here are user- You might set up extra settings
specific. You can also change peripherals, input devices, Backups, system details,
look and feel settings here, change power settings, or even updates and software sources,
adjust privacy, manage online manage colour profiles for accessibility options, time
accounts etc printers and displays and date and more, can be
managed within this category

31
Ubuntu essentials Discover System Settings

Fig 1 See system details in System Settings

Manage Ubuntu users Explore system details


and change some defaults
If your PC is mainly used as a
private or personal computer then
Sometimes you need to know more information about your version of
perhaps you are the only user in
Ubuntu. Is it 32 or 64 bit? How much memory is there in your PC? In order
the system. Here’s what you do
to prevent you from getting lost, there is a dedicated subsection in System
you need to do if you want to
Settings that’s called Details. The main screen in Details shows a summary
create another user for testing
of the most important specs of your system, including CPU name and clock,
purposes, or for guest logins. If
graphics driver, hard disk volume and more (Fig 1). You can also update your
there is actually already more than
system with the Install Updates button on the right. There are other useful
one person that accesses the PC
tabs in Details – see the list on the left side of the screen. Go to Default
(in a public place for example),
Applications to change your default web browser, email client, music player
you’ll need the correct number
or image viewer. Similarly, on the Removable Media tab you can define
of login accounts. These are
what Ubuntu should do when an optical disc (CD/DVD/BD) is inserted.
managed in the User Accounts
Again, all changes are then applied immediately.
subsection. By default, you can
only see the list and the settings,
but can’t change anything. To add
or remove users you must click
the ‘Unlock’ button and enter the
“Sometimes you need to know more
root password. After that you’ll information about your version of
be able to click the tiny ‘+’ and ‘-‘
buttons displayed at the lower Ubuntu. Is it 32 or 64 bit? How much
left corner of the screen, watch
an activity log of other users (the
memory is there in your PC? To avoid
History button) and toggle their getting lost, head to System Settings”
automatic login.

32
Discover System Settings Ubuntu essentials

Fig 2 (above) Ubuntu should


Set up a printer Tune up power settings automatically detect both local and
network printers

Ubuntu automatically detects and These settings mostly affect laptop


configures local printers in case it has users, but they can help optimise
a driver for them. Most consumer desktop power consumption as
printers are supported without any well. Under the Hardware category
problems in Linux, so if you open the of System Settings, go to Power
Printers subsection, you should see and use the first drop-down menu
the icon for a configured printer. You to set up the inactivity period
can edit the printer’s preferences, – this is the period after which
change its driver, or you can create your computer will automatically
several instances of the same printer suspend. The second option
with different settings. Press the down lets you disable the battery
‘Add’ button and follow the wizard indicator for example. When your
to set up a local or remote printer – laptop always runs from AC, there
much of it’s automatic (Fig 2). If you is no need for this. Another power-
need more control or you want to related tunable is screen brightness.
resolve a printing issue, use $ sudo Either follow the link on the Power
service cups restart. This is the tab or open up the Brightness &
command for restarting the system- Lock subsection directly. Here you
wide printing service in Ubuntu. To can set a period of inactivity, after
enjoy the feature-rich CUPS admin which the display will be turned off
interface instead, try going to http:// automatically and the computer will
localhost:631 in your web browser. be locked. You can define whether
Note that all changes to printer the user is required to provide a
settings require the root password of previously set password to unlock
your Ubuntu system. the computer.

33
Ubuntu essentials Tweak your security settings

Tweak your
security settings
Make sure your Ubuntu setup provides proper
privacy protection

Privacy is a cornerstone of secure computing. Your data should


be protected, your computer should prevent unauthorised access
and you should be aware of the personal data that’s sent from
your system to remote servers. Ubuntu provides a good balance
between usability and security. For example you cannot log in to
Unity directly; instead you can actually use the ‘sudo’ preix to run
commands as an administrator. For regular desktop activities there
is the System Settings>Security & Privacy subsection, where you can
change many settings. Most relate to password protection, keeping
logs and history for iles and applications, online search results in
Ubuntu Dash and diagnostics information that Canonical would
use to ix bugs and collect users’ statistics. The reasons as to why
you may want to change anything may vary. Maybe you don’t want
others to see what you have been using recently or maybe online
search results in Dash distract you. There is another security setting
in Ubuntu outside its System Settings shell. When you launch
Firefox for the irst time it asks you to choose what data you’d like to
share. By default Firefox sends crash and help reports to Mozilla, but
you still decide and approve them.

Generate a stronger password

01 There is no sense in setting your Ubuntu password as something simple


such as 12345678 or P@ssw0rd. It is sensible to invent a combination of
symbols that is unique, complex, long enough and most importantly something
that you are sure you will not forget. A good password contains lower and
uppercase letters, special characters and digits. Thankfully, Ubuntu can help you
deal better with stronger passwords via the APG utility. Install it with $ sudo
apt-get install apg and run simply with $ apg. APG will prompt you to
enter a random word of your choosing, and then converts your suggestion into a
stronger combination of characters, but still something readable and not too hard
to remember by heart, such as WoudElIc6 (Woud-El-Ic-SIX).

34
Tweak your security settings Ubuntu essentials

Fig 1 Enable the Ubuntu Firewall and


tweak settings

Enable uncomplicated
“A good password contains lower and firewall
uppercase letters, special characters and
digits. Thankfully, Ubuntu can help you” 03 Firewall is an effective tool for
blocking network intrusions
from the outer world and limiting
suspicious network activity in both
directions by blocking certain network
Enable automatic security updates packets in IPv4 and IPv6 protocols.
Linux has the ‘iptables’ tool for doing

02 Let’s go a little further and make Ubuntu receive important security updates
without any interaction with a user. This feature is very useful because not all
updates are installed without your awareness, but only security-related ones that fix
this job, but it is not very intuitive for
newcomers. Luckily, Ubuntu has a nice
front end to iptables called UFW – the
vulnerabilities, critical bugs, memory leakage and so on. To enable this feature, first Ubuntu FireWall (Fig 1) in its standard
start by installing the package along with the required scripts: repositories. Install it with:

$ sudo apt-get install unattended-upgrades. $ sudo apt-get install ufw


gufw
Next, enable updates with the following command:
You can control it either from
$ sudo dpkg-reconfigure -priority-low unattended-upgrades. command line ($ sudo ufw --help),
or within a graphical interface (search
All you have to do is to add unattended upgrades command to your Cron list on for ‘firewall’ in Dash or simply launch
a daily/weekly/monthly basis. Find more details at bit.ly/1EtLKFF. $ gufw).

35
Ubuntu essentials Tweak your security settings

“Ubuntu provides a good balance between usability and


security. For example you can’t log in to Unity directly; you can
use the ‘sudo’ preix to run commands as an administrator”

Find the security settings Check out the Security & Privacy tools

Usage activities
Protect your PC record
If your PC suspends or turns Here is the global switch that
off the display after a period of triggers file and application
inactivity, you can set Ubuntu Related settings usage logging. You can turn it
to require a password in order The first link takes you to the off with just one mouse click, What about online
to resume using the PC User Accounts subsection, or alternatively decide to make search results?
where you can change your more precise adjustments A rather controversial feature,
password; the second link is for which is why Canonical decided
Power settings, where you can to put in the Off mode in 16.04.
change the time period before You can always change the
you system suspends trigger’s position here

Choose what to Diagnostic reporting


include Canonical needs your feedback
There are default places inside Exclude specific in order to make Ubuntu better.
your home directory for Music, directories If something goes wrong (eg a
Pictures, Downloads, etc. You and apps program crashes), Ubuntu will
can decide what items you Use the ‘+’ and ‘-’ buttons to send details of the problem in a
want to include in Ubuntu select specific directories report to its headquarters
logging. Aside from directories, or applications that Ubuntu
there are also chat logs and will not log or trace. You can
office documents even create sophisticated
combinations of apps

36
Tweak your security settings Ubuntu essentials

Configure ‘sudo’ Fig 2 (above) Get root privileges by


using the ‘sudo’ prefix

04 The ‘sudo’ is a command that you can put before another command in
order to make it run with root privileges (Fig 2). You can use sudo anytime
and for any command but practically you only need to do so if you haven’t got
enough permissions with your regular user account – for managing printers, or
in case you need to write a file into a directory outside your home for example.
Ubuntu comes with sudo enabled by default, which lets you run any command,
but requires entering your current password (not the root password, root is
disabled in Ubuntu by default). You can change the sudo settings by issuing the $
sudo visudo command, which will open the /etc/sudoers file in the Nano editor.
You can discover the magic of sudo with $ man sudo, but there are also instant
solutions you can use by changing the following line:

username ALL=(ALL) ALL

to the one below:

username ALL=(ALL) NOPASSWD: ALL

to stop sudo asking for a password.

37
Ubuntu essentials Find your way around Dash

Find your way


around Dash
The nerve centre of the desktop, these essential tips
and tricks will have you using Dash like a pro

It is very common for people switching from a Windows platform


to a Linux system to look for the ever-popular Start menu. Generally,
the Start menu serves as the starting point of your interaction
with the computer, and once you get used to it, it feels like the
most natural way to work on the computer. Thankfully, Unity – the
standard desktop environment for Ubuntu systems – ofers Dash.
Think of Dash as the equivalent Start menu of your Ubuntu system.
Dash allows you to search for applications, iles, music and videos,
and shows you items that you have recently used. Dash also helps
you to launch application and ile shortcuts.
To start Dash, simply click on the Ubuntu logo on the top-left
portion of the menu bar. You can also press the super key on your
keyboard (marked with the Windows logo) to launch it. To exit Dash,
all you need to do is click the ‘esc’ button.
Dash segregates the search results as a series of scopes (or lenses).
These are used to provide views to your iles, folders, applications
and data. There are a few basic scopes installed by default with an
option to disable them. Switching of a scope means you won’t
see any results from that scope in your search results. With so many
conigurable features, it is evident that Dash is more than a search
box for inding iles, but rather it provides a view of the whole
operating system.

“Generally, the Start menu serves as the


starting point of your interaction with the
computer, and once you get used to it, it
feels like the most natural way to work”
38
Find your way around Dash Ubuntu essentials

Fig 1 (above) Search results in Dash


Dash scopes and lenses are separated into logical categories

Dash serves as the universal window for finding content, but as there are several
types of content on the computer, the results are segregated into smaller scopes
or lenses (Fig 1). Dash has a series of scopes that logically separate the results and
provide views to your files, folders, applications and data. The following scopes are
installed by default: Home, Applications, Files, Videos, Music, Photos and Online
(social media).
When you launch Dash, you’ll see a search bar on the top. This is common to all
scopes. Simply start typing and a list of results will appear below. Note that this is the
home lens. The home lens is the default and will appear unless you explicitly select
another lens. You can explicitly select a lens by clicking one of the options on the
bottom bar (when Dash is active). Other lenses will only show the items from the
corresponding scope that is relevant to your search query. For example, if you type
text as a search query, home lens will show the results from all over the computer,
but if you change it to an application lens, you’ll see the text editor as the first result.

Dash keyboard shortcuts


There are several shortcuts you can use to speed up your interaction with
it. For example, press the super key and hold it for a while; a list of numbers
will appear against the Launcher. You can open any of the applications by
simply pressing the associated number on the keyboard. While you hold the
super key, you will see a window with several shortcuts listed.
To go straight to the applications lens, simply press the super key and the
letter A at the same time. Similarly for the music lens, press the super key
and M at the same time. For videos, press the super key and V.
Super key+C takes you to photo lens and Super key+F opens the file lens.
If you would rather switch between lenses on the fly, you can use Ctrl+Tab
to switch between lenses once you are inside Dash.

39
Ubuntu essentials Find your way around Dash

Fig 2 (above) It’s possible to


customise your Dash search results Managing lenses in Dash
using the Ubuntu Software Centre
Though Dash offers a lot of flexibility in showing search results, you may wish to
remove some of the results listed, or add some that are either hidden by default,
or simply don’t exist. There is a small application available in the Ubuntu Software
Centre to help you to do this. Let’s install it first. Open Dash. Change the scope
to Applications and search for the main menu. In the results that appear, click on
the link to the Ubuntu Software Centre. Click Install on the top-right corner of the
page to install the software. Now, open the main menu application using the
Launcher or Dash.
You can now enable, disable and even permanently delete items or whole
categories from here. Check out the categories in the left-hand column. You can
uncheck items or categories to hide them, and check to make them searchable
again. This will not install or uninstall any software, but just stop results from
showing in the Dash search results (Fig 2). This way, you can be sure of not
breaking anything important.

Filtering Dash responses


The top-right corner of each lens has the filter option. You can click on the ‘Filter results’
link to expand the options. Note that the options are contextual – that is to say that
there are options under different lenses. In the Home tab the filter option lets you
choose which categories are shown and the online sources from where results can
be pulled.
The filters for the Applications tab include the ability to filter by type (such as
graphics), games, Internet applications and so on. The filters also enable you to narrow
down the search between applications that are already installed and applications that
appear in the Ubuntu Software Centre. Similarly, if you are in the Files lens, you will be
able to filter the results by type, size and the last edited time. Music lens filters by genre
and decade. Photo lens filters based on the date that the photo was taken.

40
Find your way around Dash Ubuntu essentials

“The top-right corner of each lens has the ilter option. You can
click on the ‘Filter results’ link to expand the options. Note that
the options are contextual”

Navigate the Dash display Get familiar with the display and ilter options

Text area
This is the space where Reference
you type your queries into This is the Dash result section
Dash. As you type in the that displays references related
text, you will see the space Weather to the search query. You can
below being populated Dash automatically detects the see the definition, images and
with results dynamically scopes that may be relevant to more related to the search Categories
the search query. Since there is a query here You can select the categories
place called Dash, it automatically from which you’d like to
displays the weather forecast for view results by choosing the
that location categories here

Applications Scopes
This section displays results Dash, by default, shows results
related to the applications from all the available scopes.
scope. You’ll see all the You can limit the results to
applications that match the More suggestions specific scopes by selecting Sources
search query here This is the section that displays them here This section allows you to
results from online shopping select the sources from where
websites and other sources Dash will look for results when
that are relevant to the search you enter a search query
query entered

41
Ubuntu essentials Understanding the file system

Understanding
the file system
Learn about the ile system in Ubuntu to keep
everything organised
One of the most complex things about any Linux-based computer
is probably its ile system. There are so many iles and folders that
serve so many diferent purposes. To a newcomer just getting
started with Linux, all this appears like a huge maze. This calls for a
basic, yet clear understanding of how iles and folders are organised
in Linux, and speciically Ubuntu. This is exactly what we are going
to do in this guide. Let’s start with the basics.
Ubuntu (like all Unix-like systems) organises iles in a hierarchical
tree, where relationships are thought of in terms of child and
parent. Directories can contain other directories as well as regular
iles. Any element of the tree can be referenced by a path name
– absolute or relative. An absolute path name starts with the
character ‘/’ (identifying the root directory, which contains all
other directories and iles), then every child directory that must be
traversed to reach the element is listed, each separated by a ‘/’ sign.
A relative path name is one that doesn’t start with ‘/’; in that case,
the directory tree is traversed starting from a given point, which
changes depending on context, called the current directory. The
fact that all iles and directories have a common root means that,
even if several diferent storage devices are present on the system,
they are all seen as directories somewhere in the tree, once they are
mounted to the desired place.

“There are so many iles and folders that


serve so many diferent purposes. To
a newcomer just getting started with
Linux, all this appears like a huge maze”
42
Understanding the file system Ubuntu essentials

“Ubuntu (like all Unix-like systems) organises iles in a


hierarchical tree, where relationships are thought of in terms of
child and parent”

Understand file listing Learn the meaning of each column in the ile listing output

Special files
File listing command Wherever you issue the ‘ls’
‘ls’ lists all the files in the command in Linux, you’ll see
First column current directory and the ‘-la’ these two files listed on the
The first character indicates extension shows the files in top. However, these aren’t
whether it is a directory or long format, along with all the visible if you inspect the same File names
a file. The other nine characters hidden files. When executed directory via the GUI. The This is where all the directory/
indicate the permissions from the root directory, it single dot indicates the current file names are listed. You can
for file owners, groups and shows all the directories in the directory; double dot, the see all the top-level Linux
everybody else top-level hierarchy parent directory default directories here

Second column Third & fourth Fifth column Sixth column


This column indicates the column This column shows the size This shows the timestamp
number of links or directories The third column shows the in bytes. You may modify of the last modification of
inside the directory owner of the file, and the this by using the ‘-h’ option the directory
fourth column indicates the together with ‘-l’; this will have
groups that the file belongs to the output in kB, MB and GB
for a better understanding
of the size

43
Ubuntu essentials Understanding the file system

Fig 1 (above) Explore Ubuntu’s file system


arrangement using the terminal
Filesystem Hierarchy Standard

01 The Ubuntu file system is based on the Filesystem Hierarchy Standard


(FHS). This defines the main directories and their contents in Linux
operating systems (Fig 1). For the most part, it is a formalisation and extension
of the traditional BSD file system hierarchy. The Linux Foundation – a non-profit
organisation consisting of major software and hardware vendors, such as HP,
Red Hat, IBM and Dell – maintains the FHS. At the time of writing, the current FHS
version is 3.0, released on 3 June 2015.

The root directory

02 Unix abstracts the nature of tree hierarchy entirely, and the root directory is
the base of all the folders in the Ubuntu hierarchy. Indicated by the ‘/’ sign,
the root directory contains all the other folders (Fig 2). Though the root directory
is conventionally referred to as ‘/’, the directory entry itself has no name – its name
is the empty part before the initial directory separator character (/). All file system
entries, including mounted file systems, are ‘branches’ of this root. It is because
of this layout that all the absolute paths in Unix systems start with ‘/’. Even if there
are several physical or virtual storage devices attached to your computer, all the
folders will be shown under the root directory.
Note that this is not to be confused with the /root directory that serves as the
home directory for the root users.

44
Understanding the file system Ubuntu essentials

Fig 2 You may be more


familiar with the folder layout

Various directories under /

03 Let ‘s now see the various important directories present under the root directory and get an idea of which ones
serve what purpose.
/bin is a place for most commonly used terminal commands, such as ls, mount, rm, etc.
/boot contains files needed to start up the system, including the Linux kernel, a RAM disk image
and bootloader configuration files.
/dev contains all device files, which are not regular files but instead refer to various hardware devices on the system,
including hard drives.
/etc contains system-global configuration files, which affect the system’s behaviour for all users.
/home this is the place for users’ home directories.
/lib contains very important dynamic libraries and kernel modules.
/media is intended as a mount point for external devices, such as hard drives or removable media (CDs, DVDs etc).
/mnt is also a place for mount points, but it is dedicated specifically to ‘temporarily mounted’ devices such as network
file systems.
/opt can be used to store additional software for your system which is not handled by the package manager.
/proc is a virtual file system that provides a mechanism for the kernel to send information to processes.
/root is the superuser’s home directory; it’s not in /home/ to allow for booting the system even if /home/ is not
available.
/run is a temporary file system available early in the boot process where ephemeral run-time data is stored. Files under
this directory are removed or truncated at the beginning of the boot process. 
/sbin contains important administrative commands that should generally only be employed by the superuser.
/srv can contain data directories of services such as HTTP (/srv/www/) or FTP.
/sys is a virtual file system that can be accessed to set or obtain information about the kernel’s view of the system.
/tmp is a place for temporary files used by applications.
/usr contains the majority of user utilities and applications, and partly replicates the root directory structure, containing
for instance, among others, /usr/bin/ and /usr/lib.
/var is dedicated to variable data, such as logs, databases, websites and temporary spool (email etc) files that persist from
one boot to the next. A notable directory it contains is /var/log, where system log files are kept.

45
Ubuntu essentials Sharing files in Ubuntu

Sharing files in
Ubuntu
Learn to create ile servers to share data from your
Ubuntu system
The default Ubuntu ile manager Nautilus ofers an easy-to-use
interface to help you share iles across systems. Behind the scenes,
however, Samba is running the show.
Samba is a software suite for seamless ile and print services. It
implements the Server Message Block (SMB)/Common Internet File
System (CIFS) protocol for Unix systems, supporting ile and printer
sharing across Windows, OS X and other Unix systems.
Samba is freely available, unlike other SMB/CIFS implementations,
and so is widely used on various systems. You can facilitate the ile
sharing between Ubuntu and Windows computers by coniguring
Samba as a ile server on one of the systems.
Samba can do several other things including acting as a server
for SMB clients: you can share printers, including PDF pseudo-
printers so all the computers in your network may write PDF iles.
Samba can also act as a domain controller in a Windows network
(authenticating users, and so on) and even help using a Windows
domain controller to authenticate the users of a Linux/Unix
machine. However we will focus only on the ile sharing aspect of
Samba in this feature.
Samba is not installed by default in Ubuntu 16.04 and so to start
ile sharing you’ll have to install Samba. We’ll see the installation
process and the steps to set up ile sharing in next sections.

“You can facilitate the ile sharing


between Ubuntu and Windows
computers by coniguring Samba as a
ile server on one of the systems”
46
Sharing files in Ubuntu Ubuntu essentials

Fig 1 (above) Install Samba


Samba server configuration with just one mouse click

01 To share a directory, you must have permission to access the directory. For
demonstration purposes, let’s take a folder from the user’s home directory,
such as Documents.
Go to your home directory. Right-click on the Documents directory and in
the pop-up menu, select Local Network Share. Then check the ‘Share this folder’
checkbox. If Samba is not installed, you will get a pop-up menu: ‘Sharing service is
not installed’. Select ‘Install additional software’ and then click Install (Fig 1). If you
get an error message that the samba .deb could not be found, open a terminal
and update apt-get like this:

$ sudo apt-get update

Try again and Ubuntu will download and install Samba. Let’s try sharing the folder
again. Right-click on the Documents directory and in the pop-up menu, select
Local Network Share. Next, check the ‘Share this folder’ checkbox. And then click
the Share button. That’s it; the directory should now be shared and accessible
from Samba clients. You can also install Samba GUI for Ubuntu. Just type:

$ sudo apt-get install system-config-samba

…or search for Samba in the Ubuntu Software Centre and install it from there.
Once installed, just search Dash for system-config-samba.

47
Ubuntu essentials Sharing files in Ubuntu

Samba clients

02 Ubuntu and Gnome make it


easy to access files from a Samba
server share. To start with, go to the files
explorer and locate the ‘Browse Network’
link on the left vertical menu bar. Open
this link and you will see a Windows
network icon. Double-click to open it.
The next window shows all the domains/
workgroups found on your network.
Inside each domain/workgroup you will
see all the computers on the domain/
workgroup with sharing enabled.
Double-click on a computer icon to
access its shares and files.
Fig 2 (above) Use the configuration
file to enable sharing
Samba configuration file

03 We have learnt about sharing files via the GUI, but directly editing the
configuration file gives you several more options and flexibility to implement
things exactly how you want to. So, let us now learn how to enable sharing via the
configuration file. The main Samba configuration file is located in /etc/samba/smb.
conf (Fig 2). The default configuration file has a significant number of comments
in order to document various configuration directives. First, edit the following key/
value pairs in the [global] section of the config file:

Workgroup = EXAMPLE
Security = user

Note that the ‘security’ parameter is further down in the [global] section, and is


commented by default. Also, change the ‘workgroup’ value from EXAMPLE to
something that better matches your environment. Then, to share a directory, create
a new section at the bottom of the file, or uncomment one of the examples:

[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755

Let’s look at the meaning of each section…


comment: a short description of the share. You can adjust it to fit your needs.
path: the path to the directory to share. This example uses /srv/samba/
sharename because, according to the Filesystem Hierarchy Standard (FHS), /srv is
where site-specific data should be served. Technically, Samba shares can be placed
anywhere on the file system as long as the permissions are correct, but adhering to
standards is recommended.
browsable: enables Windows clients to browse the shared directory
using Windows Explorer.

48
Sharing files in Ubuntu Ubuntu essentials

guest ok: allows clients to connect to the share without supplying a password.


read only: determines if the share is read only or if write privileges are granted.
Write privileges are allowed only when the value is no, as is seen in this example. If
the value is yes, then access to the share is read only.
create mask: determines the permissions new files will have when created.
Now Samba is configured, the directory needs to be created and permissions
changed. In a terminal, enter:

$ sudo mkdir -p /srv/samba/share


$ sudo chown nobody:nogroup /srv/samba/share/

Finally, restart Samba to enable the new configuration:

$ sudo restart smbd


$ sudo restart nmbd

Sharing files with Samba GUI Learn to share iles with Samba

Standard toolbar Share name Samba share directory


Menu bar Once you click on ‘Add file to share’,
In the top-right you will find This section has the basic settings to add You can set the name for the you’ll get a pop-up. In the Directory
quick links to settings, add file files to share and set preferences like directory selected above in section, just browse and select the
and help options server group and view all Samba users this section directory you’d like to share

Shared files Permissions Save or cancel changes


Here you can see the list of If you’d like the directory you are Click OK in order to save the changes to the Description
all the files that are available sharing to be writable/visible, just Samba configuration file and start sharing. If Set the description for the
under Samba sharing tick the corresponding checkboxes you hit Cancel, the changes are discarded shared directory here

49
Ubuntu essentials Manage drives with Disks

Manage drives
with Disks
Manage hard drives, SSDs and removable media
with Ubuntu’s Disks tool

Disks manages both local and removable drives, repartitioning


them as well as doing backup images and restoring from them. It
is quite a straightforward tool, with device list on the left and the
currently selected device’s details on the right. You can use it to ind
out the model and size of your hard drive, how many partitions it
has, its serial number, health status (SMART) and more. Users often
launch Disks when they need to do some manipulations with the
hard drives, SSDs or removable mass storage with the USB interface.
Its illustrative visualisation of a drive’s volumes is really useful. If
you are not aware about Primary or Extended partitions, you will
instantly catch the idea after looking at the graphical scheme under
the ‘Volumes’ label in Disks. You can do many advanced tasks with
just a few mouse clicks, such as benchmark your drive, put it in a
standby mode, create or delete partitions and so on.
Another tool in Disks is its ability to create images from drives
(*.img) and to restore such images into other drives. This feature lets
you clone all data, logical structure and a bootloader to, say, a newly
acquired hard drive that you wish to use as a replacement drive.

Format a USB portable drive

01 Sometimes new hard drives arrive with no partitions at all and Disks will
show them as a monotonous rectangle labelled as ‘Unknown’. You may
now choose what you want to do. if you go with an upper ‘gear’ button and
format the whole disk, you will only create a partition table, not volumes. There is
the legacy MBR (Master Boot Record) type, and the modern GPT (GUID Partition
Table). The first one is compatible with everything, the other is required by new
PCs with UEFI boot and also by large disks (>2TB). Next, you may want to create
the actual volume by clicking on a volume-specific ‘gear’ button below and again
choosing the Format option. If you plan to access your disk from Windows, use
the NTFS filesystem. Otherwise, for Linux-only usage, the best option would be to
go with Ext4.

50
Manage drives with Disks Ubuntu essentials

“Users often launch Disks when they need to do some


manipulations with the hard drives, SSDs or removable mass
storage with the USB interface”

Manage your drives Disks ofers a very neat layout with lots of powerful features

See what is Linux filesystem


connected Here you can see the drive Extra
Disks shows you all connected name as well as its size. The features
drives that it can support (and bold label shows you the More details The ‘gear’ button hides lots of
that is almost everything). The total capacity of the currently These helpful five lines show extra features, including options
Devices bar lets you select selected drive, while the next you the selected drive’s model, for creating and restoring disk
multiple drives and apply line shows the name of the size in bytes, partitioning type images, benchmarking tool,
some actions to multiple drives drive, which you can address in (MBR or GPT), serial number drive settings dialog and if
at a time console commands and assessment information supported, SMART self-tests

Separate controls for Partition details Volumes count and


each partition Once you select a partition, you drive structure
This tiny button only works can see its name, size, available Here you can find out how your
for the currently selected free space, filesystem type and drive is partitioned, whether
partition. It actually allows mountpoint. Click the link to there are any extended
you to unmount or deactivate open the partition contents in volumes or a swap partition.
a partition and provide a set Ubuntu’s file manager The size of the rectangles
of options for formatting, corresponds to the size of the
removing and benchmarking respective partitions

51
Ubuntu essentials Manage drives with Disks

Benchmark your drive

02 Conducting performance tests is fun but challenging, especially for non


tech-savvy users. The Disks application in Ubuntu has a built-in tool that
means you can benchmark your drive for read and write speed at any time. First
you need to unmount either all volumes (for the whole drive), or a volume you’d
like to test. For that reason, you cannot benchmark the root partition of your
current Ubuntu system, but there are no other limitations for the rest. Click on the
‘gear’ tab and select the ‘Start Benchmark’ option and then ‘Start Benchmarking’.
You’ll get a graph with the red curve for average write rate, blue curve for read
rate and green spots for access time (Fig 1). It can help you detect a dying drive
before it is too late, and also to compare real-world specs of the newly bought
Fig 1 (below) Disks’ Benchmark tool drive with its whitepaper.
will analyse your drive’s performance

52
Manage drives with Disks Ubuntu essentials

Adjust drive standby settings

03 Drive settings can be sensitive to both desktop and laptop computers.


Putting a drive into standby mode not only helps save some watts but
also reduces heating, and even makes the system quieter. Regardless of the
default behaviour of your drive in Ubuntu, you can explicitly set it to go to sleep
after a certain length of time. Click on the ‘gear’ icon and go to Drive Settings,
where you can move the ‘Apply Standby Timeout Settings’ switcher to the ‘on’
position. Now you drag the slider and set the preferred timeout value, after which
the drive will go on to standby (Fig 2). Similarly, you can decide whether you want
to enable or disable write caching – just go to the ‘Write Cache’ tab and choose
the desired mode. When caching is enabled, your drive works faster but may get
corrupt your files in case of power outage.

Create an image and restore from it

04 A hard drive image is a very handy thing compared to plain file backups.
It stores all drive structure, bootloader records and all other drive details,
letting you replicate your setup onto another physical drive. Again, in case of an
ageing drive, which you feel can break at any time, there’s no better way to save
it other than create an image. Depending on what ‘gear’ button you use, you
can either create an image of the whole drive, or just the current partition. When
you choose the ‘Create Disk Image’ option, Disks will prompt you to choose a
destination directory for the image file. Note that it must be saved on another
physical drive. Later on you’ll be able to restore the drive form the image file using
the ‘Restore Disk Image’ option. Fig 2 (below) Use Disks to apply
timeout settings on your system

53
Ubuntu essentials Get to grips with the Linux command line

Get to grips
with the Linux
command line
Well-chosen words can save you jumping through
GUI hoops, so ensure you use the right commands
The command line may be an older interface, but the reason
it’s survived is the power to tell the computer, in a few apposite
commands, exactly what you want. For example, a single command
can copy all of the MP3 and MP4 iles in a directory to a backup
disk or a machine elsewhere on the network – or anywhere else on
the Internet.
Many people’s irst encounter with a computer – perhaps at
university in the 1970s or 1980s – was seated at a dumb terminal,
known as a console, connected to a distant, and very large,
computer. Nowadays, computers can be the size of a credit
card – like the Raspberry Pi – but the old-fashioned terminal is
remembered in the form of the terminal program that gives you a
command-line interface to Ubuntu.
Depending on which lavour of Ubuntu you are running, the
terminal may have a diferent name, but type ‘term’ into the app
search of Unity Shell, or your menu, and you will bring up at least
one choice of terminal. Open this up and you should see a fairly
empty-looking window. Don’t be scared of that blinking cursor –
usually the ‘$’ sign, known as the ‘dollar prompt’. It’s waiting to do
whatever you tell it. You just need to know the right words – or
commands – to get it going.
Here’s an easy one for you to try irst: type evince into the
terminal - we’ll put the instructions you need to type into bold, so
you can see commands more clearly; always press Enter afterwards,
to let Ubuntu know it’s now got to do something.
Provided you didn’t mistype, you’ll have just opened Ubuntu’s
PDF reader, without using a GUI menu or shortcut item.
54
Get to grips with the Linux command line Ubuntu essentials

Fig 1 (left) The mv command is


used in order to move files from one
location to another

Files, folders, and familiar things


Time to get the command line working for you, on
your iles and folders
Look Inside
To look inside your Documents folder, open a terminal and type ls Documents.
Don’t forget to press Enter. You’ll see a listing of all of the files in Documents. Type You don’t need to open an
ls and you’ll see a listing of the files in your home directory – that’s because application to look inside a file.
when you open a terminal, it places you in that directory. You can change by The file command will let you
using the change directory command – cd – like this: cd Documents. Now ls see what sort of file it is. cat
alone will show you your files. sends the contents of the file
The cd- command will take you back, because the ‘-’ is a shortcut to tell cd to scrolling by, or more gives them
go back to where you were before. You could also type cd ~, as ~ is short for your to you a page at a time. less
home folder – /home/jo/ or whatever. pwd will remind you where you are now. does the same thing, with more
Configuration files – the ones called dotfiles, because their names are prefixed controls, and leaves you stuck if
by a dot – are normally hidden from listing. In most file managers you can toggle you don’t know to press Q to quit.
them into view with Ctrl+H (on a few, it’s Ctrl+.). At the terminal, it’s ls -a. Q will also exit man pages; for
The . and .. are shortcuts to ‘this directory’ and ‘parent directory’, or the one other apps, Ctrl+C is a good bet
above – hide them by using -A in place of -a. Those letters after the hyphen are for quitting. Sometimes you just
called command-line switches: try ls -l, for long listing. We’ll tell you about want to see the first or last few
some of that cryptic-looking info it displays later. lines of a file – head and tail are
Moving and copying files uses mv and cp commands. We’ll see cp in use the commands you need, each
overleaf, but for now we will replicate Fig 1 and attempt to move our files to a defaulting to ten lines. tail -n
new location: 30 /var/log/syslog shows you
the last 30 things registered by
cd ~ that log file. Real power comes
touch random.txt with grep (Fig 2, page 56), to
mv random.txt newname.txt search for a term inside a file. Try
mv newname.txt Documents/ grep ls ~/.bash_history to
ls pull out all the instances of ls that
ls Documents you have used so far.

55
Ubuntu essentials Get to grips with the Linux command line

Fig 2 (above) The grep command enables


you to search for terms inside files

Fig 3 (right) Most commands have


manuals, accessed with the man command

Tab complete
If you think that’s a lot of typing, try hitting the Tab key after a couple of
letters of each word. Where there’s only a single possible completion, the
word will be automatically filled in. Two tab clicks brings up suggestions
where there are multiple possibilities.
If you want to know more about a command, they (almost) all have
manuals – or man pages (Fig 3). man ls will tell you all about options for ls;
ls will tell you about the manual command itself.

56
Get to grips with the Linux command line Ubuntu essentials

Fig 4 (above) Nano is included in


Using Nano Ubuntu and most other Linux distros
by default

Looking inside a file is all very well, but often we need to quickly change
something inside it.
In this example, we’re going to use Nano, a command-line text editor (Fig
4). There are many more powerful editors – and many a little friendlier, too
– but Nano is included in Ubuntu, and many other flavours of Linux, so it’s
handy to know the basics.
We’ll edit the ~/.bashrc file, a collection of customisations for the shell
environment; don’t worry that much of it won’t yet make sense. To offset
the risk of damage to your command environment, back up the file first: cp
.bashrc .bashrc.bak – then nano .bashrc.
Find the section with the alias commands near the end. Note that the
ones with a # in front of them are inactive (said to be commented out)
– remove the # to get one to work next time you log in or open a new
terminal session.
You can use the arrows to navigate to the text you want to edit; delete
and type in new text as required. Nothing too strange so far, until you’ve
finished: note those two lines at the bottom of letters preceded by a ^
(caret). These are the keyboard commands – the ^ represents the Ctrl key –
type ^O (hold down the Ctrl key and hit O), and your work will be saved; hit
^X and you’ll exit Nano.
You can set a temporary alias directly, which will last until you close the
terminal down (Fig 5):

alias myplace=’ls -lAhF /home/richard/’

57
Ubuntu essentials Get to grips with the Linux command line

Fig 5 (above) Setting a temporary


alias means it will last until the Permissions, please
terminal is closed
Ubuntu files are protected from alterations by other users on a shared
machine. All files and folders belong to a user – it doesn’t have to be a person,
it could be a piece of software, like a web server – and a group. Permissions
on each file relate to whether a user, group or anyone else can read, write
or execute the file; this is abbreviated as rwx permissions. For directories,
execute permission is just permission to open. Execute a file means run it as
a program – so a JPG picture file doesn’t have permission to run, nor does
a spreadsheet file, meaning the embedding inside one of malicious code is
much harder to accomplish for virus writers.
From whichever directory you are currently in, create an empty file –
touch testfile will do the trick – then ls -l. The long listing shows you
permissions (see opposite), and you can see the default permissions of a
newly created file. Enter mkdir testfolder and you can see the permissions
of a newly created directory. Remove the file with rm testfile – you’ll need
the recursive switch to remove a directory: rm -r testfolder.

No attachment?
While the protection offered by permissions is very useful, they are also
there to trip up the unwary. For example, using sudo, you may have copied
files from another user’s home folder. Unless you change the ownership
(see opposite), you may be left scratching your head when you try to attach
the files to an email, and they just won’t stick – because you don’t even
have permission to read the files!

58
Get to grips with the Linux command line Ubuntu essentials

“Permissions on each ile relate to whether a user, group


or anyone else can read, write or execute the ile; this is
abbreviated as rwx permissions”

Octal code
Long listing The rwx – read / write / execute
Running ls -l lets you see who owns permissions – are given respective
a file or folder, and who has permission values of 4, 2 and 1. To give a file read
to read, write and run software. Three + write + execute permissions, 4, 2 and
groups of rwx in the listing apply, 1 are added to give 7. For just read and
respectively, to the named user, the execute, 4 + 1 = 5. Applying the former
named group, and everyone else left to user and group, and the latter to
‘other’, chmod 755 file.txt.

Give me the file Run with it


If you’ve copied a file into your folder A file becomes a program when it can
using sudo, you may have left it with be run. You write or download a shell
root ownership. Change the ownership script, say backup.sh, and try to run it
with chown jo myfile.txt – for - ./backup.sh – and nothing happens.
example – and the group with chown You need to give it executable
:audio myfile.mp3. Fill both sides positions: to save the octal adding, you
of the ‘:’ to change user and group can just chmod u+x backup.sh. You
ownership together can also call it with sh backup.sh.

59
Ubuntu essentials Get to grips with the Linux command line

Fig 6 (above) The Linux command


line may seem complicated at first Give me more software
but you will soon master it
Despite every flavour of Ubuntu having a graphical program to install
software onto the system, you’ll usually see projects supplying the
command-line way of getting their software. The reason for this is that the
command-line instructions are direct and unambiguous. Let’s try it out, and
you’ll see what we mean.
Ubuntu, as you may have read elsewhere within these pages, is based
upon Debian, one of the earliest GNU/Linux distributions, dating back
to 1992. It’s an open collaborative project between over a thousand
developers across the world co-operating over the Internet, which has
contributed to its longevity. So too has the Debian package management
system, and the command-line program to manage fetching and installing
the packages. Apt – the Advanced Package Tool – keeps track of all of the
software in Ubuntu’s repositories, and takes care of any dependencies on
other packages when you install. It’s what the Ubuntu Software Centre uses
behind the curtain of that graphical interface.
Every step that involves installing software on your system needs root, or
superuser, permissions: on Ubuntu this is done by prefixing the command
with ‘sudo’. On some other systems you would log in as root user; you can
temporarily do this on Ubuntu by running sudo -s or sudo bash, but we
don’t recommend it, as it’s easy to get into the habit of running with root
permissions, and to accidentally cause some damage.
Update Ubuntu’s knowledge of the latest available packages with
sudo apt-get update. You can look under /etc/apt/ to see the source
files where Ubuntu remembers which repositories to look in. You can

60
Get to grips with the Linux command line Ubuntu essentials

Fig 7 (above) Use the command line


to manually add a new repository

“Apt – the Advanced Package Tool


– keeps track of all of the software in
Ubuntu’s repositories, and takes care of
any dependencies on other packages”
edit these manually to add more, and to change version for upgrading
(proceed with care!). But the simplest way to add a new repository is with
apt-add-repository: sudo apt-add-repository ppa:jon-hedgerows/
get-iplayer. After which you’ll need to run sudo apt-get update again,
before installing from the repository: sudo apt-get install get-iplayer
(Fig 7). The get-iplayer script is a command-line piece of software for
timeshifting BBC radio (and TV) programmes; apt-get upgrade will install
all of the security updates and bugfixes that have been made recently.
This is something you should run regularly (but to save you the trouble,
Ubuntu tells you that updates are available, and regularly asks permission to
get them). Run apt-cache search terminal to find alternative terminal
programs, and apt-cache show eterm to examine one of them. Now you
know the basics, explore a little more.

61
Ubuntu essentials Use GNOME Terminal & Xterm

Use GNOME
Terminal &
Xterm
Explore the basics and beneits of the terminal
emulators in Ubuntu

Ubuntu ships with two terminal emulators. One is GNOME Terminal,


a widely used program and probably the only known terminal
application for many Ubuntu users. GNOME Terminal is one of many
GTK-based apps that Unity desktop shares with GNOME Shell –
many tools and accessories are the same in Unity and GNOME.
GNOME terminal looks clean and minimalist, but it has enough
settings that let you conigure this small application to suit your
needs and tastes. Choose Edit>Proile Preferences to edit the current
‘Default’ proile for the sake of diferent behaviour or a custom look
and feel. GNOME Terminal makes interaction comfortable between
graphical applications and the Bash shell thanks to the support of
drag and drop for text strings, copy and paste with both keystrokes
and context menus, and mouse scrolling in terminal mode.
Xterm is entirely diferent; it is a tiny, old-school thing that hasn’t
changed much since 1984, and was initially developed before the
X Window System saw the light. Xterm uses the same Bash shell
as GNOME Terminal does, so the commands behave in exactly the
same way in both terminals. Xterm is very helpful in an emergency;
if your main desktop fails to load and you just need to get to
graphical mode, use something like $ xinit xterm. It never breaks!

“GNOME terminal looks clean and


minimalist, but it has enough settings to
tailor to suit your needs and tastes”
62
Use GNOME Terminal & Xterm Ubuntu essentials

Fig 1 (above) Personalise your


Change Bash to something else GNOME Terminal by adding colour

01 Every Linux distribution uses Bash (Bourne-again shell) in text mode and
graphical mode within a terminal emulator, including Xterm and GNOME
Terminal. Bash has a very rich set of supported commands, but the most useful
feature comes from its popularity; all Linux users use their terminals with the
same syntax. However, there are other shells – such as a highly customisable ZSH
with an even wider feature set, or CSH with a built-in scripting language – that
have similarities with the C language. To change the default shell from Bash to
something else in GNOME Terminal, go to Edit>Profile Preferences, switch to the
Title and Command tab, enable the ‘Run a custom command instead of my shell’
option and put the name of your desired shell in the Custom Command field.

Change fonts, colours and background

02 Let’s make the GNOME Terminal look a little more personal by changing
text font, colour and background (Fig 1). Go to Edit>Profile Preferences and
switch to the Colors tab. Uncheck the ‘Use colors from my system theme’ option
and choose any combination of colours for text, text in bold and background.
There is a list of good presets in the ‘Built-in schemes’ drop-down menu; it can
save you from an agony of choosing. To change the font itself, go to the General
tab and uncheck the ‘Use the system fixed width font’. After that, you’ll be able to
select another Mono font.

63
Ubuntu essentials Use GNOME Terminal & Xterm

“Bash has a very rich set of supported commands, but the


most useful feature comes from its popularity; all Linux users
use their terminals with the same syntax”

Save yourself time Working with terminal emulators is easier than you’d think

Edit your
terminal profile Try a fail-safe Non-distracting
Change the title, cursor solution scrollbars
shape, scrolling options and Xterm is relatively old, GNOME Terminal drew ugly,
command behaviour, as well however, it delivers a pure Bash thick scrollbars in the past.
as colours, fonts, some historic experience without any bells Sometime later, Canonical
legacy stuff (like Backspace and whistles. Xterm comes in applied its overlay bars, and
and Delete-key behaviour) every OS that uses X.org (all removed the 1-pixel outline
and more Linux distros do) around the terminal frame

The icon says it all Enjoy the convenience of


You won’t confuse Xterm with any GNOME Terminal
other terminal emulator thanks GNOME Terminal fits well into the
to that distinctive icon, boasting Ubuntu design with its recognisable
support for 256 colours on that Ubuntu Mono font and deep-purple
expressive cathode-tube display background. However, you can
change these and other settings with
several mouse clicks

64
Use GNOME Terminal & Xterm Ubuntu essentials

Learn some helpful shortcuts

03 Knowing tricks for GNOME Terminal in Ubuntu can save time and increase
productivity. We start with the simplest: launch the application using the
Ctrl+Alt+T sequence anywhere in Unity. When browsing your files in Nautilus,
it is useful to open a terminal window for the current directory. Nautilus can do
it when you right-click on an empty space within a view area and select ‘Open
in Terminal’, but this feature is not enabled by default in Ubuntu. Fix it with the
following command:

$ sudo apt-get install nautilus-open-terminal

then restart the file manager. When you need to copy or paste text, use Ctrl+Ins
and Shift+Ins respectively, instead of laboriously right-clicking menus. To clear
the input, you can either cancel a command with Ctrl+C, or clear what has been
written with Alt+R.

Have some fun

04 Working in the terminal goes long into the history of Linux and UNIX,
so it’s no wonder we have a decent number of discovered Easter eggs
and jokes that bring in some fun and help you to feel more comfortable in the
terminal. Start with $ sudo apt-get install moo to bring up a jolly cow (Fig 2),
find another Easter egg with $ aptitiude moo and then $ aptitude --v moo
and add an extra ‘v’ three more times to see a snake that has eaten an elephant.
The $ sl shows a steam locomotive and finally the $ fortune | cowsay
shows a cow that tells your fortune. However, to finish up, let’s do something
massive and change our boring GNOME Terminal to a Hollywood Technodrama
showcase, mimicking an FBI command centre (Fig 1, page 63):

sudo apt-add-repository ppa:hollywood/ppa


sudo apt-get update
sudo apt-get install Hollywood

Fig 2 (left) Perform the $ fortune |


cowsay command and see this guy

65
Ubuntu essentials Secure files with Déjà Dup

Secure files with


Déjà Dup
Create an extra copy of your valuable data
and keep it updated

Having a backup copy of your photos, documents, music and video


iles is a high priority to keep them safe, even though some novice
users opt to skip the process. Imagine that something has gone
wrong with your hard drive and it can no longer boot up. The bad
news is that while you can buy a new hard drive, you may well lose
your data on the old one, which is often more precious than any
hardware you might have lost.
So here comes the inest hour for a backup copy that you have
prepared beforehand and kept updating regularly. And there’s no
excuse not to do it, since Ubuntu includes a great tool for automatic
and hassle-free backups called Déjà Dup – also known by the
simpler name, Backups.
Using Déjà Dup is as simple as it can be: you choose what you
want to back up and where, opt to specify what directories it should
skip and then put the task into the automatic queue of the Ubuntu
scheduler, which can perform backups periodically and even keep
new and older backups at the same time. The interface of Déjà
Dup has a category tree on the left and a main part to the right,
with a clear arrangement of easy-to-use controls. The default setup
assumes you might want to back up your ~/home directory with
an exception for Trash and ~/Downloads, so you may leave it intact
and go ahead with this safe assumption, or opt to customise the list
of included and ignored directories to your liking.

“Having a backup copy of your photos,


documents, music and video iles is a
high priority to keep them safe”
66
Secure files with Déjà Dup Ubuntu essentials

Secure your data quickly Déjà Dup is an intuitive app for managing backed up iles

Check destination Proceed with Decide to go more secured


Déjà Dup stores backed up files in the important routines When a backup process starts, the wizard
form of archived files that can be handled Choose where you want to store a prompts you to set a password. You may
with the Duplicity utility. You can’t extract backup copy and optionally define what choose to protect your backup copy with
the files with a regular unarchiver directories you want to ignore and not it, or opt to go without any passwords
include in the backup

Overview your backup Set up scheduling Choose manual or auto mode


The starting screen in Déjà Dup shows when the Here you can select the frequency of regular By default, Déjà Dup doesn’t enable automatic
last backup copy was made and when the nearest automatic backups. Depending on your backups right away, but you can trigger this
next backup will take place. There’s also a link that workflow, choose daily or weekly backups and switch and if you set the rest of the routine
triggers the automatic backups switch also set the time for keeping older backup copies correctly, you’ll get unattended backups

“There’s no excuse not to do it, since Ubuntu includes a great


tool for automatic and hassle-free backups called Déjà Dup –
also known by the simpler name, Backups”
67
Ubuntu essentials Secure files with Déjà Dup

Set up your backup correctly with Déjà Dup


Get the settings right to secure your data

Fig 1 Choose to restore specific


files individually

Select what to backup Choose a destination Make a test restore

01 We most commonly seek


to back up photos, videos,
office documents and application
02 If you store a backup copy
on the same drive with the
original files, it can only save you from
03 If we had a crystal ball, we’d
use it. But the fact is that
nobody knows when things will
settings. While this is true for home accidental deletion. It is therefore go wrong. To protect yourself from
computers, let us also complement highly recommended to save backups experiencing that sinking feeling
this with targets that are more relevant to another physical drive or disk to when you discover your backups are
to production servers and corporate protect yourself from main hard drive broken, go for a test restore at the very
usage in general, such as databases, failure. For frequent incremental beginning. It’s a good idea to set up a
dumps, collected data files and so backups, external hard drives are small backup task and run it. After that,
on. Always evaluate the size of the known to work better compared go to the Overview section and press
proposed backup beforehand and to flash drives – the latter have a the Restore button. Déjà Dup will
make sure it fits the target storage. limited lifetime and don’t like too guide you with a simple wizard, where
You’ll definitely need extra space if you many overwrites. You can also use a you’ll be able to choose the location
do incremental backups, or decide to remote destination via SSH, WebDAV of a backup and then select a date,
include directories like ~/Downloads or Windows shared folder. You can from which a copy will be derived.
that usually get populated with lots of choose the right place via the Storage Go ahead with a real-world backup if
large files. Location menu. everything restores fine.

“If we had a crystal ball, we’d use it. But the fact is that nobody
knows when things will go wrong”
68
Secure files with Déjà Dup Ubuntu essentials

Access a backup copy Back up to the cloud

04 Déjà Dup has a limitation:


it is an ‘all or nothing’ tool,
meaning that you can’t extract
05 The simplest way is to use
your Dropbox, MEGASync or
other cloud-synced directory as the
selected files and directories. Instead backup location. This way, your data
you are forced to copy or download will be uploaded to the cloud once
the entire backup snapshot. To solve Déjà Dup finishes its job. However, let’s
this issue, use the ‘Restore missing files’ do direct online backups, such as to
item in the Nautilus context menu (Fig the Amazon S3 cloud (Fig 2). To make
1). This works for directories included it happen, you only need a proper
in the backup and lets you restore account at Amazon and a few extra
individual files. Déjà Dup is a front-end packages. The command is as follows:
to the Duplicity utility, and this lets $ sudo apt-get install
you extract your backup snapshot python-boto python-
without launching Déjà Dup at all. It cloudfiles
can be useful for scripting, or maybe After that, the list of available storage
when you access your backup location locations will be complemented by
remotely via SSH. The syntax for Amazon S3 and Rackspace cloud.
extracting is as follows:
$ duplicity restore
--no-encryption “file:///
path/to/ snapshot” “/where/
“Déjà Dup has a
to/extract” limitation: it is an ‘all
The Duplicity syntax also can extract
individual backed up items (see $ or nothing’ tool” Fig 2 (below) Manage your backup
duplicity --help). location easily

69
Ubuntu essentials Use Startup Disk Creator

Use Startup Disk


Creator
Create a bootable USB with Ubuntu
or virtually any other Linux

The irst question that would most likely emerge


here is ‘what on Earth would you need a startup Select the source
disk for?’ Historically, Linux distributions were Here is the list of source disc
images (.iso) and CD/DVD discs
distributed as CD discs, from which you were found on your system. Startup
Disk Creator automatically updates
supposed to install them. Later on, the age of the list

recordable CD/DVD discs came in and, together


with broadband Internet access, this led Linux
enthusiasts to download ISO images of their Select the disk to use
Startup Disk Creator displays
favourite Linux distributions and burn them available target USB drives
here. When you plug it in,
to blank discs. However, such optical discs are the application detects it
automatically and adds it to the list
already out of trend, with USB thumb drives now
being the sanest media. You can use USB sticks
hundreds of times with strong reliability.
In Linux you can transfer an installable ISO
ile to a USB drive by the ‘dd’ command. It’s
quite easy, but the whole procedure isn’t very
conclusive for regular users, so that’s why Ubuntu
ofers the handy and convenient Startup Disk
Creator utility. Its features slightly intersect with
those found in Disks, but Startup Disk Creator Storage persistence
A very useful feature that allows
focuses on turning CD/DVD discs or downloaded saving all your data persistently.
This way you can turn your live
ISO iles of installable Ubuntu-compatible Linux Ubuntu thumb drive into a fully
featured portable working system
distributions to bootable USB media, that is it
helps you move from legacy media to more
contemporary and eicient USB disks.
Startup Disk Creator also has the ability to
use a newly created USB disk as a working
environment in live mode, consequently saving
all your data persistently on a disk.

70
Use Startup Disk Creator Ubuntu essentials

Get a live Ubuntu system Use a regular USB lash drive or any mass-storage device

Mind the size Choose an image file


The last column here indicates the size of the source media. If you want your ISO image to appear in the
It shows the exact weight of the ISO file, but defaults to list, click the Other button and select the
the total capacity of CDs and DVDs no matter how many image file. By the way, it also supports disk
megabytes are actually there images (.img)

Operating system version Copy the files Capacity and free space
Sometimes it’s not clear exactly which Check everything one more time and You can find the total size of the media as
version of a system is inside an ISO, or press the Make Startup Disk button. well as the amount of free space on it. This
what is on that unlabelled optical disc. The application will show a progress feature is designed for USB sticks that are
The column entitled OS Version extracts dialog and copy the files onto the target formatted to FAT16 or FAT32 file systems
necessary details USB medium and may contain user data

71
Ubuntu essentials Use Startup Disk Creator

Create a bootable USB stick Utilise Startup Disk Creator

Fig 1 Use Startup Disk Creator


to create a USB startup disk

Select the proper source sharing the results will be welcome. USB card reader. Virtually everything
If you have an Ubuntu-compatible that can be connected as a USB
system on CD or DVD, it will be a good mass-storage device in Linux will work
01 Startup Disk Creator is designed
to work with Ubuntu and other
systems derived from it. Here is a short
idea to transfer it to USB and benefit
from higher boot speed, better
fine (Fig 1), including odd things like
your smartphone’s internal storage.
and incomplete list: Kubuntu, Linux compatibility and persistent storage. Startup Disk Creator doesn’t wipe any
Mint, Xubuntu, Lubuntu, Ultimate- data from FAT32 volumes once there
Edition, elementaryOS, Peppermint Prepare the target is enough space there for a source
One, Peppermint Ice, Deepin and image. Although, it is recommended
to use a clean flash drive or at least
Zorin OS. Other flavours of Linux,
especially those non-Debian based,
might not work with Startup Disk
02 Common target devices are
flash drive – also known as a
USB stick or thumb drive – an external
format it to avoid issues resulting
from heavy use of that flash drive (for
Creator. If you have a free target USB USB hard drive, an SD card or any other instance, a flash drive might suffer
medium, testing other Linux OSs and memory card connected through a from fragmentation).

“It is recommended to use a clean lash drive or at least format


it to avoid issues resulting from heavy use of that lash drive (for
instance, a lash drive might sufer from fragmentation)”
72
Use Startup Disk Creator Ubuntu essentials

can install extra software or remove Disk Creator adds the Ubuntu
Create a persistence file something unnecessary and keep it bootloader to the FAT32 volume
after shutting down or rebooting the of your USB medium, so that it can

03 Drag the respective slider and


define how much persistent
storage you need for your files
live OS. This makes your live USB stick a
fully fledged portable OS. At the same
time, the device will still be readable
boot Ubuntu. The experience doesn’t
vary much between an OS written
with Startup Disk Creator and with
and settings. Startup Disk Creator and accessible from Windows or other a classic live mode achieved with
will create a persistent storage file non-Linux OSs. the ‘dd’ command. The only visible
of an appropriate size and merge difference is that you can have
it with the root file system in the Go for a test drive persistent storage, even though it is
live system. Changes in the /home limited with 4GB – this is a maximum
directory, downloads and other files
added or removed from within the
live system will be preserved after
04 When you are done with
setting things up, and the file
copying dialog finishes successfully
file size in FAT32. You can write some
files or folders on your USB medium
in Windows (or elsewhere), then boot
reboot. The same works for system- (Fig 2), reboot and select your USB from it and find your files there, safe
wide components, for example you medium as a boot device. Startup and intact.

Fig 2 Track install progress


with this dialog box

73
Ubuntu essentials Unleash the Archive Manager

Unleash the
Archive Manager
Make use of this small accessory that sits inside
your Ubuntu system
Archive Manager is a small tool for opening compressed iles and
creating your own archives. Years ago, when people had small hard
drives, Archive Manager was king of the hill. It’s still an important
part of the standard desktop experience, as it is the easiest way to
unpack downloaded archives or combine many iles into one (Fig 1).
The standard Ubuntu Archive Manager follows the generic
naming policy and therefore doesn’t have any special name
(together with Disks, Backups and so on). However, Ubuntu had
taken it from the GNOME desktop, where the archive manager is
called File Roller. You can check it out by launching the $ file-
roller command in the terminal in Ubuntu. When launched
separately, the File Roller interface looks quite empty as because it is
designed to show .contents in the largest area of its window.

“It’s still an important part of the standard


desktop experience”
Make use of extra features
File Roller has some extra features and boasts ine integration with
the Ubuntu ile manager, Nautilus. This means that you can extract
any supported archive simply by right-clicking it and selecting
Extract Here from the menu. You can also drag-and-drop iles and
directories from Nautilus to the File Roller window in order to add
them to an archive. The application will prompt you for an archive
name and ofer advanced options that include password protection
(ZIP and CBZ only). You can protect just the iles and directories, so it
will be possible to view the list of iles inside an archive, but in order
to open or extract anything from such archive, one must provide a
proper password (Fig 2). You can also protect the list of the archive’s
iles and directories, or split an archive into parts of ixed size.
74
Unleash the Archive Manager Ubuntu essentials

Fig 1 Compress files with the archive manager Fig 2 Protect files with a password

Open or view an archive


Opening an archive is simple: just double-click it or use the ‘Open
with Archive Manager’ item in the right-click menu of an archive. If Create an archive
its icon looks like a box, it means that most probably such an archive
The reason why you may need to
will be supported. File Roller supports ZIP, RAR, GZIP, BZIP. 7Z, JAR,
create an archive can vary. Firstly,
XZ and many other formats, for both opening and compressing, an archived file is always smaller
and also AR and ISO formats in read-only mode. You can also go the than the original one, so the
simplest goal is to save some disk
other way around: open the empty File Roller window and use its
space. This doesn’t help much
Open button to browse and select an archive. There is a diference with photos and videos, because
between opening and viewing an archive. While it is clear what they are already compressed
and so adding them to an
the irst one means, the second lets you look through the entire
archive doesn’t save much space.
list of iles and see the whole archive’s content in a single view. For However, office documents or
instance, if there are many subdirectories in your archive, you may uncompressed media files (DOC,
XLS, WAV, TIFF and so on) show
want to select View>View All Files and see everything as a single list.
a splendid compression ratio,
File Roller adds the extra Location column to help you see which ile up to 90-95 per cent. Secondly,
is where. archiving merges many files
into one archive, which is very
convenient. For instance, copying
a thousand of small files can
take a long time (it drives most
file systems crazy), but when
compressed into an archive,
you will wait for just a couple of
seconds. To transfer files with
symlinks and UNIX-specific
attributes (like permissions and
extra flags) to a FAT32 or NTFS
volume, you should also archive
such files first. Compress any file
or directory using the Compress
item in the right-click menu of
an item, or use the respective
feature inside File Roller.

75
Ubuntu essentials Use the Disk Usage Analyzer

Use the Disk


Usage Analyzer
Find out where your free disk space went with a
specialised accessory
Files and directories tend to grow and occupy a large amount
of disk space. These days even a couple of terabytes will run low
when you decide to keep your movie collection there. Sometimes
you don’t pay enough attention to how much you are actually
downloading, copying or storing, meaning that your hard drive
gets cluttered with lots of iles, draining your free space. Disk
Usage Analyzer, also known as Baobab, is a tool that comes within
a standard Ubuntu desktop. It analyses any directory you throw
at it and shows a colourful ring chart, where the size of each slice
corresponds to a size of the respective subdirectory (Fig 1). This is
a beautiful graphical representation with instant usefulness, letting
you know what on your drive is using the most space. Sometimes it
can be as simple as an overilled temporary directory, or a giant log
ile, or just your media library that grew too fast.

“This is a beautiful graphical


representation with instant usefulness”
Get instant results
Launch Disk Usage Analyzer by searching for this name or ‘Baobab’
in Ubuntu Dash. After it launches, you will be presented with a list
of devices and locations. If a drive is mounted, it will be included in
the statistics of your root partition. For example, if you mount a 4TB
drive within a relatively small root partition (say, 20GB), the resulting
ring chart will show your system directories within a hair-thin slice.
For that reason, you will need to unmount any external media if you
want to analyse what Ubuntu itself consists of. To get a structure
of your home directory simply click its icon and wait while until
Disk Usage Analyzer completes its job – this can take some time
depending on how many iles there are.
76
Use the Disk Usage Analyzer Ubuntu essentials

Dive into statistics When you see the resulting ring chart, hover
There are no limitations with which directory you your mouse over a slice to see the details. Click
want to analyse. Disk Usage Analyzer lets you a slice to dive in and set it as a top directory. The
open any directory, be it a local or remote one. chart will adjust automatically and you will see
Click the small ‘gear’ icon in the top-right corner more details about what content inputs to overall
to open the desired location. If it is a remote one, directory weight. The left part of the screen
please use the ‘Scan Remote Folder’ option and compliments the chart with a tree view, with
provide the correct address, for example Samba extra columns for usage percentage, size and
share addresses start with smb://. number of items.

Fig 1 (above) Your usage data is broken down


visually with Disk Usage Analyzer

Switch between graphical views actually works better when you need to estimate
This ring chart isn’t the only way you can get a the relative sizes of diferent units. A treemap
graphical representation of data. In the lower right- may be hard to understand when you irst look
hand corner of the application you’ll notice two at it, but it does help when you know how it’s
buttons that let you switch between ring chart built. Disk Usage Analyzer irst draws the largest
and treemap modes. Treemap is an alternative rectangle for your top-level drive or directory
method of data visualisation with a strong focus and then recursively subdivides it into smaller
on the size of units. rectangles according to the size of the content
The main diference between a ring chart and a inside. Larger rectangles display their names
treemap is that the latter shows all units together instantly, others will give more information once
along with subdirectories and large iles. This hovered with a mouse.

77
Ubuntu essentials Monitor Software & Updates

Monitor
Software &
Updates
Add more application sources and keep your
system up to date
Ubuntu comes with pre-installed applications and accessories for
basic computing tasks and activities. Software & Updates lets you
customise the standard set of software sources, conigure updates
and manage additional drivers. A software source is a general term
that includes both online repositories and local media. You can turn
standard Ubuntu software source on and of, manage third-party
source and authenticate them with signing keys. With Nvidia or
AMD graphics, you can install a proprietary driver, but it cannot be
included in Ubuntu right away due to license restrictions.

Install additional drivers


A common case when Ubuntu users turn to the Additional Drivers
tab in Software & Updates is graphics drivers. Computers with
Nvidia and AMD video chips are supported in Ubuntu out of the
box, but the system utilises open source drivers (‘nouveau’ and
‘radeon’ respectively), that still lag behind a proprietary driver for 3D
performance and gaming. To replace an open source driver with
a proprietary one, go to the Additional Drivers tab and wait for a
while before Ubuntu discovers if there is a proprietary driver for your
hardware. It will not necessarily be a video card: dozens of drivers
for wireless networks and various irmware bits that improve system
performance cannot be shipped directly because of their licenses.
When you decide to go with one or several non-free drivers, simply
select them and press the Apply Changes button. Ubuntu will
download all required iles in the background and install drivers
automatically. You will then need to logout and log back in, or
better, restart the system.
78
Monitor Software & Updates Ubuntu essentials

Add or remove software sources


Standard Ubuntu repositories can be managed on the Ubuntu Set up updates
Software tab in Software & Updates. It lists the Main repository, for Ubuntu periodically checks
which Canonical (the Ubuntu maker) provides oicial support; the for its updates online and
Universe repository, which is maintained by Ubuntu community; if it finds a newer version
for at least one package, a
the Multiverse repository with proprietary software; and the special notification pops up.
Restricted one with closed-source device drivers. If you somehow In the Software & Updates
need to develop software in Ubuntu yourself, you can enable the application, you can choose
what updates the system
Source repository. Below are other helpful controls for selecting the looks for and how frequently
nearest mirror (this can boost a package’s download speed) and checks should be carried out.
the optional switch for Ubuntu CD/DVD with standard delivery To do this, go to the Updates
tab and review the list of
of packages. The ‘Other software’ tab lets you add third-party ticked boxes. By default,
repositories and by default lists entries within the Canonical Partners Ubuntu looks for security
repository and the extra Independent repository for even more updates, recommended
updates for regular packages
software (Fig 1). Press the ‘Add’ button to add a new repository, ‘Edit’ and also for backported
to change details and ‘Remove’ to delete a repository. There are software that is not
many additional repositories on the Internet, but always approach supported by Canonical, but
contributes to the Ubuntu
with caution. experience. The next four
drop down menus control
the updates frequency and
“Standard Ubuntu repositories can be behaviour. For instance, here
you can program Software
managed on the Ubuntu Software tab” & Updates to download
and install all or particular
updates automatically,
without disturbing the
user. This can be helpful
for unattended Ubuntu
installation with a stable
Internet connection. The last
drop down menu lets you
choose whether Ubuntu
should notify about any
new version of the OS itself
or about long-term support
version (LTS) only. If don’t like
to hop to newer versions too
often, stick to LTS releases.

Fig 1 Use Software & Updates


to add third-party repositories

79
Ubuntu essentials Work with Universal Access

Work with
Universal Access
Conigure accessibility settings to make Ubuntu
more user friendly
Ubuntu is a friendly place for everyone, including people with
Type the way you
need to reduced capabilities or disabilities. If you need to use special settings
for a more comfortable user experience in Ubuntu, there is a
The Typing tab in Universal dedicated subsection called Universal Access inside System Settings.
Access houses a list of options If you want to, you can also launch it separately by searching its
that help input data using
a keyboard for those who name in the Dash or by using the $ unity-control-center
are unable to type and need universal-access command in the terminal. Universal Access
assistance (Fig 2). The most consists of a large number of settings divided into four individual
noticeable option here is the
on-screen keyboard switch categories: seeing, hearing, typing, and pointing and clicking. Each
that enables text input using category has switches that improve usability and make the most
mouse clicks. The on-screen out of Ubuntu. Ubuntu ships with a high-contrast icon theme and
keyboard will appear after
you re-log in to a session. It the Large Text switcher, both of which help visually impaired people
looks like a desktop widget see more on their screens. There is also a screen reader (Fig 1), which
that flows at the top of any pronounces window titles and messages, an on-screen keyboard,
windows. There are various
keyboard tweaks that can advanced sound notiications and more.
ease input in some cases,
such as sticky keys (treats a
sequence of modifier keys as
Using the keyboard as a cursor
a key combination), slow keys If moving a mouse in a regular manner is uncomfortable, you can
(puts a delay between when control the mouse cursor from a keyboard using the arrows. This
a key is pressed and when it
is accepted) and bounce keys
accessibility feature can be enabled by going to the Pointing &
(ignores double pressing a Clicking tab and putting the Mouse Clicks switcher on. There are
key in a short period). This also two ways to trigger a mouse click without clicking its buttons.
can be complemented with
extra audible notifications,
The irst tweak is to simulate secondary click in double-clicking by
such as beeping when holding the left mouse button down for some time. Second, you
certain keys are pressed. can simulate a click by hovering a mouse cursor over an item and
The on-screen keyboard in
Ubuntu can also be used
waiting longer. For either, there are helpful sliders that let us adjust a
for extra security if you feel delay. Regular mouse settings in the Mouse & Touchpad subsection
like the use of a physical also contribute to a more lexible mouse performance. There you
keyboard can compromise
your privacy.
can lower the double-click delay, change cursor speed and switch
buttons arrangement if you need a mouse for left-handed use.
80
Work with Universal Access Ubuntu essentials

Fig 1 Tweak screen settings for


better usability

Adopting Orca screen reader


The default screen reader in Ubuntu is called Orca. It can be enabled in the Seeing tab of Universal
Access, or it can also be launched from command line ($ orca). Orca pronounces titles and text
corresponding to the controls in use. To access Orca preferences after enabling it for the irst time, press
‘Ins + Space’ on a desktop keyboard or ‘Caps lock + Space’ on a laptop. A new window will open, and
Orca will announce “Screen reader preferences. General page tab.” You can now conigure Orca to your
liking, change voice type and speed, redeine key bindings, turn Braille support on or of and change
lots of other tunables. Orca also lets you customise its verbosity and deine the categories of text that
will be spoken. It also has a built-in help system in audible mode. Press ‘Ins + H’ or ‘Capslock + H’ to hear
instructions and references to other important key bindings.

“If you need


to use special
settings for a
more comfortable
user experience
in Ubuntu, there
is a dedicated
subsection called
Universal Access”
Fig 2 (above) Customise your computing experience with typing options

81
Ubuntu essentials Configure network connections

Configure
network
connections
Setting up a network connection in Ubuntu is easy
Those who only need to plug their Ethernet cable into their
computer’s network port in order to have an instant access to
the Internet can skip this section (perhaps those running Ubuntu
inside a virtual environment can do that too). The majority of
Linux newbies, however, often need assistance in connecting
to the Internet or changing their network parameters. During
the last decade, almost every Linux distribution has relied on
NetworkManager – a stable, feature-rich and intuitive network
handler for Linux. The Unity desktop in Ubuntu has a tight
integration with NetworkManager by ofering a network indicator
on the top bar and a standalone graphical utility called Network (Fig
1). You can search for it in Dash, open it as a subsection in System
Settings or launch from command line ($ unity-control-center
network). Both wired and wireless network connections can be
added and modiied or even removed here.

Fig 1 (right) Configure wired and non-


wired network connections

82
Configure network connections Ubuntu essentials

Connect to a wireless or wired network


If you want to use a wireless connection and if you have a Wi-Fi
network card or chip, things are quite easy: notice the ‘radar’ sign
at the far-right position on Unity top bar and click it to see a list of
available networks. Select your network and once you provide the
correct authentication password, you are mostly done. With wired
network connection, for which you are given an IP address, network
mask and a gateway address, you’ll need to enter the Network
coniguration dialogue and add your connection manually. To do
so, irst check that the global switch for wired networks is in the On
mode and then press the ‘Options’ button in the lower-right corner
of the window. This will bring up the connection editor (Fig 2), in
which the most common place to go is the IPv4 Settings tab. In the Set up a
Method drop-down menu, select Manual and then provide your network proxy
connection details in ields below.
Sitting behind a proxy adds
a little complexity. Usually
View connection settings you have to declare your
When you are proxy settings several times:
online, you still separately for a web browser,
in the Bash environment, for
may want to use Apt package manager, for
NetworkManager Wget downloader and so
to ind out certain on. However, Ubuntu makes
Fig 2 Input details things a little easier on this
manually using the details about your front. Click the ‘Network
connection editor
current connection. Proxy’ item in the list on the
The quickest way to ind out such details will be to click on the left and choose what kind
of proxy setup works for
network indicator on the Unity top bar and go to the Connection you. If you have been given
Information item. You will see a separate window with lots of a URL, select the Automatic
details about your connection, including general settings (your method and provide that
URL in the field below. Proxy
network car MAC address, declared speed, interface name), and IP with personal authentication
connection details for both IPv4 and IPv6 (if it is relevant for you). usually requires manual
The main window of the Network application also displays network setup. Select the Manual
method and provide at least
settings and includes a briefer list with Hardware Address (MAC), the HTTP proxy, using the
IP Address, Default Route and the list of DNS servers. If you cannot following syntax:
run NetworkManager in graphical mode for some reason, use the
‘$ ifconfig’ command to view settings and ‘$ nmcli’ to manage username:password@
server-name.domain
various connections. For instance, let us bring up a known Wi-Fi
connection from within a broken Ubuntu system that cannot boot Provide a proper port and
into any desktop: finally hit the ‘Apply system
wide’ button to finish with
setup and get going.
$ nmcli dev wifi con “Network_Name” password “your_password”

83
Ubuntu essentials Connect with Online Accounts

Connect with
Online Accounts
Enjoy a more convenient integration with online services in Ubuntu
Online social services are already a part of everyday life for an average user. Most of us use these services
for connecting with friends and relatives, for sharing photos, videos and other iles. Almost every online
service requires authentication, which is commonly about registering an account and using it later for
accessing the personal part of a service. Ubuntu simpliies the general experience with online services
by eliminating the need to sign into one account several times in diferent applications. It also makes
using local applications easier because it is much more convenient to provide your username and
password on a classic login web page than to have the hassle of local application settings. A good
example is the Evolution email client. Years ago people had to remember incoming and outgoing
server addresses, ports, security settings and the authentication method. Now all you have to do is
provide your username and password for your email service in Ubuntu’s Online Accounts – when you
log in there Evolution will already be conigured and automatically display your inbox.

Set up instant messaging


Empathy is the default app
for instant messaging. Open
Online Accounts (Fig 1) either
by searching for it in Dash
or as a subsection in System
Settings. You can even go
from the command line
($ unity-control-center
credentials). The list of online
services, for which Ubuntu
ofers desktop integration,
has grown recently so you
may want to ilter the list by
applications. In the ‘Show
accounts that integrate with’
drop-down menu select
Empathy. Select the desired
service and provide credentials Fig 1 (above) Connect to your accounts quickly using Online Accounts

84
Connect with Online Accounts Ubuntu essentials

in a built-in browser window, right there in Online Online Accounts lets you enable, disable and
Accounts. You can even add more than one change options of added entries at any time. After
account of the same service, or add accounts you are done, you can launch Empathy and start
from various diferent services to one application. chatting immediately.

“Ubuntu simpliies the general experience with online services


by eliminating the need to sign into one account several times”
Connect to your Google account Upload photos
Online Accounts ofers the most comprehensive integration with to a cloud-based
Google services. If you have a Google account (using Gmail for account
example), you can beneit from a wide list of desktop applications
that Ubuntu can integrate with. It includes Evolution Data Server, Ubuntu ships with Shotwell,
a photo manager, viewer
Shotwell photo manager, Google Drive and Picasa lenses for Unity and simple editor. Not only
Dash and Empathy instant messaging. can you sort and tag images,
Once you’ve logged in to your Google account it will prompt but also import them from
external sources and export
you to allow it access to manage your emails, calendar, photos and to a cloud account – the latter
videos, contacts, view your data and so on. You have to grant this requires integration with
access in order to proceed. After that your list of connected services Online Accounts. Shotwell
can publish your photos to
will be populated with everything Ubuntu supports for Google Facebook, Flickr, Picasa Web
and you can start using your favourite applications and enjoy Albums and Piwigo CMS. You
them working without your Google account without any extra can configure one of these,
all, or any combination of
movements. Your search results can now include iles found on your services by adding respective
Google Drive and Picasa web albums. You can also start using Gmail entries in Online Accounts. As
directly from your Evolution client and do much more. with Google, in most cases
you are required to pass an
authentication routine and
grant access to your data
(Fig 2). After that you can
launch Shotwell and select
one or several photos you’d
like to publish. Notice the
toolbar along the bottom of
the window and press the
Publish button there. Select
a cloud service from the
drop-down list and choose
publishing options. Shotwell
can create new albums in an
account or commit to existing
ones. It also supports tags
and photo metadata in its
publishing module.
Fig 2 (above) Input your password and connect

85
Ubuntu essentials Use System Monitor

Use System
Monitor
View and manage system resources using
the System Monitor app
System Monitor is a tool for managing running processes and
Find out details
about file systems monitoring system resources. It is one of many accessories
borrowed from the Gnome desktop. You can run from Dash or
The File Systems tab displays from command line ($ gnome-system-monitor). The application
a table of all file systems that looks and works similarly to its analogues in Windows and OS X, and
are currently mounted in
Ubuntu. You can find out the contains three logical tabs: Processes, Resources and File systems.
device name, file system type, Launch the application with a speciic tab showing by using
mount point, total capacity command line parameters ‘-p’ for processes, ‘-r’ for resources and
and available disk space. Of
course, you can find out a ‘-f’ for ile systems. Launching with the File Systems tab shown can
similar set of information in be done with the ‘$ gnome-system-monitor -f’ command line.
Ubuntu’s disk utility (Disks, System Monitor is used to tackle system sluggishness. You could
p.50), but System Monitor
offers a more comfortable also use the CPU load graph to ind out if hardware-accelerated
view, which lets you quickly video output really works.
analyse how much space is
left on your device and sort
them by various criteria. Manage system processes
The Used column doubles Each application in Linux creates at least one process. Some
the information about free
processes refer to graphical applications, others run in the
disk space, but shows it in
the form of a percentage background and provide service functionality. With the help of
bar. When the bar fills up System Monitor you can view the list of all processes, know their
to approximately 90 per
names, ind out which process belongs to which users, detect
cent or more, it means that
you are running low on processes that devour too much CPU cycles or draw high levels
free disk space, which can of RAM, associate processes with their low-level IDs and manage
be troublesome for certain
process priority. Normally you’ll see a list of processes sorted
workflow scenarios. Ubuntu
cannot work properly if the by name. Note that you can click the name of a column to sort
root partition (/) gets 100 per processes by it. It is very helpful to sort them by CPU percentage
cent full. You can also check
or memory usage. If a process belongs to you (or if you have the
for free disk space in terminal
by using the ‘$ df’ command permissions), you can kill it or lower its priority. Select the process
(disk free), although it doesn’t you want to get rid of and press the End Process button in the
let you sort or reorder any of
lower right corner of the window. Right-click the process and select
the lines.
the Change Priority menu to alter its priority.

86
Use System Monitor Ubuntu essentials

Control resources usage


The Resources tab ofers efective graphs that get
updated in real time (Fig 1). The irst graph shows
CPU History in live mode (there is no delay in data
update by default), showing CPU cores in diferent
colours. When you launch a heavyweight
application you’ll notice peaks on that graph.
You can also igure out whether an application
can use several CPU cores at once, or if pushes
Fig 1 Graphs help visualise performance data
all of the load on one core. The middle graph
is for Memory and Swap Usage. On modern available RAM. The inal graph, Network History,
systems, swapping to a ile or to a separate Swap shows the network speeds for both downloading
partition is rarely used in everyday tasks, simply and uploading. This graph can be particularly
because there is already suicient RAM. However, helpful for network troubleshooting and low
processing large iles (like retouching a giant Internet speed diagnostics. Both memory and
poster in GIMP) may require swapping, which only network history graphs help you monitor your
takes place when your system is running low on system’s performance.

87
Ubuntu apps Explore the Ubuntu Software Centre

Explore
the Ubuntu
Software Centre
Navigate your one-stop shop for purchasing,
installing and removing apps
Ubuntu Software Centre, aka USC, is a package management portal
– that is, a consolidated platform where you can search for, install or
purchase software, and even remove apps from the list of installed
software. Initially released on 29 October 2009, Ubuntu Software
Centre is developed in Python and contains more than 53,000 apps.
Previously, Ubuntu programs were downloaded from the repository
as tar iles, unzipped and then installed, by manually running the
commands in the console. Even the previous versions of Ubuntu
had many graphical utilities for adding/removing software, which

Fig 1 Sub-sections for All Software and


Installed help you navigate

88
Explore the Ubuntu Software Centre Ubuntu apps

Fig 2 The Software Centre is arranged into


categories to help you find what you need

“Initially released on 29 October 2009, Ubuntu Software Centre


is developed in Python and contains more than 53,000 apps”

ultimately led to redundancy and fragmented Software Centre etc, which are displayed vertically
development efort. To ease this cumbersome in the left sidebar. To get started, search for the
process, USC came with a worthwhile approach shopping bag icon in the display and click it to
where all the software is installed with the click launch Ubuntu Software Centre.
of a few buttons. The search for speciic software Upon the launch of USC, the home screen
ends here as USC has name/description-based appears, which contains diferent categories of
search functionality, with multiple options to software, recommended software, newly added
choose from. The rating and users’ review helps software (Fig 2), top rated software and many
you to ind the best software. USC also provides more. For instance, if you’re looking for a text
Ubuntu application developers a prominent way editor, you can type the keyword in the search
to ofer their software to potential users. bar, which shows the diferent text editors present
The latest version of Ubuntu comes with in USC in a list view. You can just select any
some preconigured tools and software like the one of them and click the Install button to start
LibreOice suite, Mozilla Firefox, text editors, download the program.
89
Ubuntu apps Explore the Ubuntu Software Centre

Get to know Software Centre Start installing the software you need

Fig 3 Register with Ubuntu to


make recommendations

On the top of the home screen you will ind the the Back button once, you’ll reach the page
section navigation commands: All Software and you just left. The Back command is unavailable
Installed (Fig 1, page 88). The Back and Forward whenever no previous screens exist in the history,
buttons – displayed as ‘<’ and ‘>’ respectively – and the Forward command whenever no later
help you navigate the diferent pages. USC keeps screens exist in the history. The All Software
the visited pages in memory so that by clicking section presents all the programs available, be

“In the Installed section you will ind the list of programs that
are installed on your Ubuntu machine”
90
Explore the Ubuntu Software Centre Ubuntu apps

they already installed on the computer or not. details in the form with a valid email ID (Fig 3).
In the Installed section you will ind the list of You will receive the veriication code at the email
programs that are installed on your Ubuntu address provided (Fig 4). Once that process is
machine, with the date of installation speciied. complete, you will receive a success message and
When a software item is selected, if the item is Ubuntu starts recommending useful software
not currently installed in your system, you will see to you, which you can select and install on your
an Install button. Click to install the software on machine with ease.
your machine. If the software is already installed, a
Remove button is available; clicking it will uninstall
the software.
On the home screen itself, you will ind the
section ‘Recommended For You’. In order to make
use of the recommendation facility, you have
to register yourself in Ubuntu by providing the Fig 4 (above) A verification email will confirm the process

Navigate via categories The various ways to navigate the Software Centre
The USC segregates software into diferent categories, such
as accessories, developer tools, books and magazines, games,
Top Rated
education, oice and many more. Upon clicking the Accessories
tab, for instance, a list of accessories is displayed, including Speed In terms of display, if the
Crunch (precision calculator), 7zip (compression/uncompression category is set to ‘Show non-
tool), PuTTY (SSH/Telnet client) and Shutter (screenshot utility). The applications by default’, then
results are displayed in a list
software listed in the Accessories tab is by default sorted by rating; view; otherwise tile view is
the other sorting criteria are name and release date. used, and non-application
items are hidden by default.
The top rated applications
“The software listed in the Accessories are also displayed on the
home screen using tile view
tab is by default sorted by rating” in descending order of DR
(dampened rating), regardless
of whether they are installed
Moving on to the Developer Tools page, you will ind many or not. Applications with
seven five-star ratings and
open source tools which are subcategorised into version control,
one four-star will be displayed
IDEs (integrated development environments), web development before other applications
and so on. The version control subcategory has many lavours of having two five-star ratings.
12 items are displayed in the
versioning software, prominent ones being Git-Cola, qgit and ggit.
home screen under the Top
The IDEs tab has Netbeans, Ninja, Spyder and Eclipse, which can be Rated tab; when the More
installed and used for software development. There are also other button is clicked, you land on
a page where 60 items are
subcategories named after software languages – like Java, Python
displayed in decreasing order
and Perl – that contain the diferent versions and tools related to the of DR using the list view.
speciic language.
91
Ubuntu apps Explore the Ubuntu Software Centre

Updates and past downloads Check out the History tabs

On the home screen of USC you will ind the chronological order; (newest on top). Clicking
History tab; when clicked, this shows the ‘All anywhere on a branch (or pressing the space-
Changes’ page by default. Under the navigation bar when it is selected) should expand it if it is
bar are tabs for All Changes, Installations, Updates collapsed, and collapse it if it is expanded.
and Removals (Fig 5). The entries are grouped The branch on which the recent activity has
in branches and labelled by the day in reverse occurred is opened by default in the USC history

Fig 5 The History tabs reveal past updates

92
Explore the Ubuntu Software Centre Ubuntu apps

screen. The items displayed in the History tab contain the icon of
the software, name, plus the date and time of installation. Under the One-stop shop
for Ubuntu
Installation tab, you will ind all the installed applications grouped
by their installation dates. The Updates tab, on the other hand, lists As well as offering a vast
selection of free software
all the updated applications along with their update dates. Finally,
to download, the Ubuntu
the Removal tab displays the list of applications which have been Software Centre provides
uninstalled from the system. the option to purchase and
install commercial software.
In the History tab, the search bar present on the top right can
The Software Centre contains
search for applications which are already installed or have been a list of programs which are
removed from the system. Whenever the Back ports channel provided by Ubuntu itself,
along with software offered
contains a version of any application which is newer than the
by Canonical’s partners
one installed, an Updates item appears in the last navigation bar. (those programs which
The Updates section displays the number of application updates abide by the software rules
of Ubuntu). The number of
available, along with an Update All button. The list contains the icon,
programs available in the
title, the newer version of the application and an Update button at Software Centre continues to
the far right end. grow rapidly, so there’s a lot
of choice. In simple terms, the
When an item is selected, pressing the Enter key should activate
Ubuntu Software Centre is
its Update button; when an update is installed or waiting to be the equivalent of the Google
installed, its Update button should be inactive. Play Store (or Apple App
Store) for Ubuntu, where
you can find thousands
of programs, tools and
“The Software Centre contains a list of applications which can be
programs provided by Ubuntu itself” installed with just a few clicks.

Installing programs Get your hands on brand new programs

Now we’ve covered navigation


and layout, let’s move on to
installation. In this example,
we’ll install OpenJDK Java 7
and the Eclipse IDE. Select
the Developer Tools category
from the home screen of
USC. This will take you to the
Developer Tools page, which
is further subcategorised. Click
on Java (cup of cofee icon),
which takes you to the page
where Java-related items are
93
Ubuntu apps Explore the Ubuntu Software Centre

Fig 6 Java install options are listed on this page

displayed in a list view (Fig 6). Now select the item graphically displaying the status of the installation.
Open JDK Java 7 Runtime and on the right side Once it’s complete, you will be redirected to the
you will ind the Install button; click it to install success page, which also contains the Remove
the packages. You’ll then be prompted to enter button in order to uninstall the program.
your administrator password; type the correct Click the Back button to search for the IDEs
password and hit Enter to start the installation. section; now click the IDEs icon to see the list of
During installation, you will ind the progress icon IDEs present in USC. Type ‘Eclipse’ in the search

“There are many programs to install, such as chat apps, ile


sharing and more”

94
Explore the Ubuntu Software Centre Ubuntu apps

bar to search for the Eclipse IDE. Select the Eclipse Create a project named ‘Hello’, with a Java
IDE (blue ball icon) and then click the Install ilename of Hello.java, in the test package. Now
button; enter the administrator password to start run this program to get an output in the console.
installation. Once Eclipse has successfully installed, This conirms that both Java and Eclipse are up
open it by double-clicking. and running.

Advanced software suggestions


Look at some of the advanced tools available in the Ubuntu Software
Centre and see how they can help you in your activities

Switching from Developer Tools to Internet in the category section of USC, you will ind many program
to install, such as chat applications, ile sharing tools, email clients and web browsers. By clicking the File
Sharing tab, you will see many tools, FileZilla being the highest rated one (Fig 7). FileZilla uses FTP, SFTP
and FTPS mechanisms to share and upload iles to diferent systems. Just click on the Install button and
start sharing your iles within diferent systems.
In order to use your Ubuntu computer for oice work and view diferent formats of iles, you will ind
the Kile application under the Oice category. The source editor is a multi-document editor designed
for .tex and .bib iles. Menus, wizards and auto-completion are provided to assist with tag insertion and
code generation.

Fig 7 FileZilla is the highest rated program

95
Ubuntu apps Browse the Internet with Firefox

Browse the
Internet with
Firefox
One of Ubuntu’s default browsers, explore the
hidden features of Mozilla Firefox

Internet browsing is one of the most common activities of


the average computer user. People use the Internet for almost
everything, from online shopping and reading to gaming and more.
Almost all Internet access is via an Internet browser, and a signiicant
amount of time spent on a computer is often on a browser. So
it is very important that you understand your Internet’s interface
extremely well.
Ubuntu ships with Mozilla Firefox as a default browser. You’ll ind
the browser icon on the left bar on the Ubuntu Home page. When
you launch Firefox, you will see the Google search page as the
Home page. Note that the default search engine is Google, but you
are able to change it to other search engines, such as Yahoo!, Bing
or DuckDuckGo, for example. To change the default Home page, go
to Menu>Preferences>Home page and enter the URL you would
like to set as the Home page (Fig 1, page 98).
You can also drag and drop an open tab on to the Home icon
on the right icon bar. This will automatically set the Home page. To
bookmark a web page, click on the star icon of the right icon bar
while the page is open. The address bar automatically shows a list of
pages from your browsing history and bookmarks when you start
typing in the address bar.

“Ubuntu ships with Mozilla Firefox as a


default browser. You’ll ind the browser
icon on the left bar on the Ubuntu Home”
96
Browse the Internet with Firefox Ubuntu apps

Discover Firefox Learn various Firefox settings to speed up your browsing

Address and search bar Add and view Icon bar Editing
Enter the website address here to bookmarks This bar holds icons for other services buttons
browse the Internet. The address bar You can add a bookmark with like Pockets (to save reading lists), You can edit website URLs or
is smart, as it automatically suggests the star icon and view all the Downloads, Home and Chat. The last text that you enter in websites
websites based on your history and saved bookmarks by clicking on icon opens up the Settings menu using this buttons
bookmarks. You can enter search the next icon
queries in the search bar

General options Sync Customise Zoom


This area holds all the major This is where you can log in to You can configure the button Click on the ‘-’ sign to zoom out or
options that Firefox has to offer. enable syncing of your browsing positions, themes and overall look the ‘+’ sign to zoom in to the web
You can open new windows, data across all your devices and feel of your Firefox installation page. The middle area here shows the
print, view history, edit settings using the Customize option here current zoom percentage
and more

“The address bar automatically shows a list of pages from your


browsing history and bookmarks when you start typing in the
address bar”
97
Ubuntu apps Browse the Internet with Firefox

Improve your browsing experience


Important aspects of web browsing with Firefox

Search website from the search field. Select ‘Add a Keyword’ bookmarks, links and other things
for this search. The ‘Add Bookmark’ are synced across devices seamlessly.
address bar dialog appears. Enter an appropriate Firefox does this with a feature called
name for the bookmark (for example: Sync. It lets you share your data and
‘Wikipedia search’). Create a keyword preferences (such as your bookmarks,
01 There are steps that you will
repeat several times a day
without realising how much time they
(like ‘wikipedia’). Select the bookmark
folder to contain the smart keyword.
history, passwords, open tabs, Reading
List and installed add-ons) across all
take, for example, searching specific Click OK. To use the created smart your devices. 
websites. Instead of going to the bookmark, enter the keyword and Let us see how to set up and sync
search engine, finding the search box, search string in the Location bar then an account in Firefox. First, click on
entering the keyword and executing press Return. the menu button and click ‘Sign in to
the search, you can directly search the Sync’. The sign-in page will open in a
Internet using Firefox, while you are on Sync information across new tab. Click the ‘Get Started’ button.
any website. Fill out the form to create an account
To set this up on your browser,
devices and click ‘Next’. Take note of the email
visit the page on the target website address and password you used; you’ll
that has the search field you would
normally use to search the site. Hold 02 People now use multiple
devices to access the Internet.
Firefox helps to make sure all your
need it later to log in. Check your
emails for the verification link and click
down the Ctrl key and click on the on it to confirm your email address.

Fig 1 (above) It takes a few simple steps to change our default home page

98
Browse the Internet with Firefox Ubuntu apps

Fig 2 (above) Go to the Mozilla marketplace to download apps

You’re ready to go! Now you just need pages you’ve previously visited. Private This paves the way for thousands of
to log in to Sync on all your other Browsing also includes Tracking interesting and useful apps in the
devices and let it do the rest. Protection, which prevents companies Mozilla marketplace (Fig 2). With a
from tracking your browsing history wide selection of games, music and
Protect your privacy across multiple sites. To open a private productivity apps, Firefox Marketplace
browsing session, click on the menu has something for everybody. To
while browsing button and then click ‘New Private install an app, open Firefox, click on
Window’. If you want to directly the ‘Tools’ menu and select ‘Apps’. This
03 As you browse the web, Firefox
remembers lots of information,
for example the sites you’ve visited
open a link in a new private window,
hold down the Ctrl key while you
will open up the marketplace. Now,
type a search query in the search box
click on this link and choose the to look for a specific app or choose
and your passwords. There may be a category for the type of app you
option to ‘Open Link in New Private
times, however, when you don’t want are looking for. You can also choose
Window’ from the context menu.
people with access to your computer the screen type from the drop-down
to see this information. Private Install an app menu to see apps optimised for that
Browsing allows you to browse screen size. Click on an app to view its
the Internet without saving any
information about which sites and 04 Mozilla offers the browser
platform to developers as well.
details. Finally, if you’re ready to install
an app, click the blue install button.

“Private Browsing allows you to browse the Internet without


saving any information about which sites and pages you’ve
previously visited”
99
Ubuntu apps Manage your emails with Thunderbird

Manage your
emails with
Thunderbird
Work remotely and learn to manage all your
email accounts using Thunderbird

Part of the Mozilla suite, Thunderbird is a lightweight mail client. It


supports diferent account protocols like POP, IMAP, Gmail etc. It also
has an integrated learning spam ilter that ofers easy organisation
of mails with tagging and virtual folders. More features can be
added by simply installing extensions. If you’re an avid reader,
Thunderbird acts as news and RSS client as well. So you can get all
your information at a single point of contact.
Tabbed email lets you load messages in separate tabs so you can
quickly jump between conversations. A quick ilter toolbar helps
you ilter messages by tags, contacts, keywords etc. Other features
include message archiving, customisable themes and personas,
smart folders, and even chat integration. You can also add social
media accounts, like Twitter and Facebook, directly to Thunderbird
and chat with your contacts with accounts on these platforms.
Thunderbird is installed by default on Ubuntu 16.04, so just ire
up Dash and search for it. Click on the icon in the results to launch
Thunderbird. You can now add your email accounts to get started
here. Note that Thunderbird, in association with some service
providers, ofers email servers as well. So, you can avail a new email
ID right from the Thunderbird GUI. If you don’t want a new email
address, however, just select ‘Skip this and use my existing email’.

“You can also add social media


accounts, like Twitter and Facebook,
directly to Thunderbird”
100
Manage your emails with Thunderbird Ubuntu apps

Explore Thunderbird Discover key features of the Thunderbird UI

Get messages Write Address book Search and filter


You can use this Click here to open the This holds all your contact You can search your mailbox
button to force sync Mail Compose dialog details from different mailbox for specific keywords or filter
with the email servers and write a message accounts in a single place the mail based on sender,
and fetch all the new recipient, subject etc from
messages for all your this section
email accounts

Mail folder list Chat Mail display


This section holds all All the social platform This section displays Mail list
the mail folders from profiles such as Facebook, a detailed view of the This is the section that
all your mailboxes. If Twitter etc (if linked to mail selected in the shows a list of all your mail
you have enabled the Thunderbird) are visible pane above. You’ll see in a chronological order.
unified mailbox, you’ll inside this chat box the reply, forward and Just click on the column
see each mailbox as a delete buttons here header to sort them based
child inside the generic on different criteria
mail folders

101
Ubuntu apps Manage your emails with Thunderbird

Use Thunderbird as your mail client


Setting up a new account with Thunderbird is easy. Start by clicking
on the ‘Email’ link on its launch page. You then need to provide your
username and password for your email provider and your email
address (Fig 1). Thunderbird determines connection details (such as
ports, server names, security protocols, etc) by looking up your email
provider and can usually provide the account details.
You need to conigure your account manually if your email
provider is not listed in Thunderbird’s database, or if you have a non-
standard email coniguration. To conigure an account manually,
you need the following details: incoming mail server and port (eg
‘pop.example.com’ and port 110), outgoing mail server and port (eg
‘smtp.example.com’ and port 25), and the security setting for the
Social chat with connection with the server (eg ‘SSL/TLS’ and whether or not to use
Thunderbird secure authentication). Fill in these details and you are good to go.

To add chat accounts to


Thunderbird, click on
the Chat button next
“Setting up a new account with
to the Email button on Thunderbird is easy. Start by clicking on
Thunderbird’s launch page.
After you click the link, you’ll the ‘Email’ link on its launch page”
see a pop-up with supported
services. Facebook, Twitter,
Google Talk, IRC and Yahoo
are all supported. Select
the account to add and
click Next. On the next
page, enter the username
and then on the next page,
select the alias. Finally,
click the Finish button.
You will then be taken to
the website of the account
you chose to authenticate
access to your account. Once
authenticated, you can view
all your social conversations
in a new tab. Another aspect
of Thunderbird chat is that
all the chat conversations
are included in search.
So, if you are looking for a
keyword, just type it and the
results you get will include
results from your past chat
conversation history. Fig 1 (above) Input your name, address and password
details to link a new account

102
Manage your emails with Thunderbird Ubuntu apps

Multiple mail
accounts with
unified folders

Unified folders is a folder


pane view which resembles
a global inbox account:
it merges the contents
of all inbox folders (both
POP, IMAP and local folders)
from all accounts. It also
shows the inbox of each
account as a child folder of
the unified Inbox account.
Any message in an inbox
shows up in both the root of
the unified Inbox, plus the
child folder of the unified
Inbox. Each account displays
Fig 2 (above) Head to the Mozilla add-ons site to
improve your Thunderbird features any child folders of the
inbox, only its inbox folder
Extend Thunderbird features has been ‘moved’ away
Thunderbird has an open, extensible design and program from the account. This does
architecture. This enables people to create add-ons for it. Most of not change where and how
messages are stored. Unified
these are distributed via the Mozilla add-ons site, but authors can do is just another way to view
so any way they choose. Let’s see how to install an add-on… your folders at a single point.
To start, go to Tools>Add-ons. Click on Get Add-ons (Fig 2). Type To enable unified folders, go
to View> Folders>Unified
the name or keywords of the add-on you want in the search ield Folders and select it.
and click the magniier icon. Then select the add-on from the list Alternately, if you don’t want
and click ‘Add to Thunderbird’. to use the feature, use View>
Folders>All Folders to select
Click on Install Now once the button is available. Note that the a more traditional display.
add-ons from the oicial site (addons.mozilla.org) are reviewed by
Mozilla and are relatively safe to install. Also, if the author is veriied,
the author name will be displayed. Finally, restart Thunderbird to
complete your changes.
To remove an add-on, go to Tools>Add-ons and select the add-
on to be removed from the Extensions, Themes or Plugins panel.
Then click Disable to prevent it from loading; you can also click
Uninstall to completely remove it.

“Thunderbird has an open, extensible


design and program architecture”
103
Ubuntu apps Communicate with Empathy

Communicate
with Empathy
Learn how to set up and utilise Empathy text
messenger to the full
Instant messaging, also abbreviated to IM, is a text-based means
to communicate instantly over the Internet and the local network.
While some IM applications need you to create a new account,
others provide IM facilities by using accounts from diferent service
providers like Google, Yahoo, etc. IM applications can also be used
to connect to chat rooms. For the uninitiated, chat rooms are online
places where like-minded people meet to talk.
In this feature, we are going to explore Empathy. It is a messaging
program that supports text, voice, video chat, and ile transfers
over many diferent protocols. Empathy also lets you add accounts
from diferent services and uses them to chat with your contacts.
Based on Telepathy for protocol support and a UI based on Gossip,
Empathy is the default chat client in current versions of GNOME,
(and hence Ubuntu).
To get started with Empathy simply type ‘Empathy’ in Dash.
Then click on the Empathy icon to launch the application. When
you launch it for the irst time, you’ll be asked to link your online
accounts. Just link your accounts and you can then easily talk
to all your contacts. Using Empathy, you can also group all the
conversations in a single window, have multiple windows for
diferent kinds of conversations, easily search through your previous
conversations, and share your desktop in just two clicks. Now let’s
learn about Empathy in more detail.

“When you launch it for the irst time,


you’ll be asked to link your online
accounts. Just link your accounts and you
can then easily talk to all your contacts”
104
Communicate with Empathy Ubuntu apps

The Empathy interface Understand how Empathy works and what you can change

Application settings Online accounts General settings Other settings


When you open Empathy, If you select Add Accounts You can find these under You can see several other
these settings are available in the status bar, you’ll see Empathy>Preferences. Under settings like sounds, calls,
automatically on the top status this open up. If you click the General settings you can location, spell check, themes
bar. You can find various settings All Settings here, you’ll set what contacts will be and so on as different tabs
related to conversations, be taken to the System visible by default and also under Empathy>Preferences
contacts and so on here settings page select the chat settings

Contacts list Accounts list Chat window Account details


This window displays a You’ll see a list of This is the actual chat Once you’ve selected an
list of all the contacts and accounts added to the window where you already added account
their current status. To system here. Click ‘Add can converse with your on the left window, you’ll
chat with anyone from account’ to add a new contacts. Based on the see all the related options
this list, right-click on the online account here system capabilities, here. You can choose to
contact, and select chat you can also chat in enable or disable related
audio and video mode services from here

105
Ubuntu apps Communicate with Empathy

First steps with Empathy Get started with Empathy messenger

Fig 1 Log in to various messaging


accounts using Empathy

Add a new account information though. Finally click Add the Identifier field, enter your contact’s
to confirm the process and save the login ID, username, screen name, or
account details. other appropriate identifier for the
01 You can add instant messaging
accounts from several
supported services (Fig 1). For some Manage contacts
service type. In the Alias field, type
your contact’s name as you would like
account providers, these steps it to appear in your contact list. Finally,
click Add to add the person to your list
will also allow you to register for a
new account. To add an account,
click Empathy>Accounts and then
02 After you have your accounts
added to Empathy, the next
step is to add your contacts and
of contacts.
If one or more of your contacts
press +. From the ‘What kind of chat manage them. To add contacts, click has multiple accounts with different
account do you have?’ drop-down list, Chat>Add Contact. Then from the messaging services, you can combine
select the type of account you wish to accounts drop-down list select the these accounts into a single contact.
add. Enter the required information. account you wish to use to connect The resulting contact is called a meta-
For most accounts, you will only need to your contact. Note that your contact: a contact composed from
a login ID and a password. Some contact should be using the same different single contacts. To link
accounts may require additional service as the account you select. In accounts press the tick button to

“For most accounts, you will only need a login ID and a


password. Some accounts may require additional information
though. Finally click Add to conirm”
106
Communicate with Empathy Ubuntu apps

select entries you want to link. This will with all users on all other servers
enable selection mode and you can on that network. You can also add
see a checkbox for each entry. Tick and remove servers for this network
the checkboxes that correspond to a using the Add and Remove buttons.
single person’s contact entries. Finally, When a server is selected, click the
press Link. field under Server or Port to edit it.
Alternatively, use the left and right
arrow keys to focus the field, and press
Audio and video the space bar to begin editing.
communication

03 Empathy supports audio


and video communication “Empathy supports
using the default GUI, however it is
still dependent on the account you
audio and video
use to communicate. This is because communication
only a certain set of services support
audio and video communication. using the default
Right now only Google, Jabber
and SIP accounts are supported.
GUI, but it is still
Considering you are using one of the dependent on the
supported accounts, let’s see how to
initiate audio and video calls. account you use”
Fig 2 (below) Enter your details
To initiate a call, right-click on to enter an IRC chatroom
the contact you want to talk to and
select Audio Call or Video Call. In the
next window that opens, you’ll see
the connection getting established.
When the connection is established,
you will see the total conversation
time at the bottom of the window.
Once you are done, end the
conversation by clicking the hand
up button.

IRC with Empathy

04 To use IRC with Empathy, make


sure you have at least one
account added to Empathy already.
You can then select Rooms>Join
Rooms, which will open the IRC
pop-up. You can simply select your
account name from the drop-down
and then fill in the room name and
the server name (Fig 2). You should
now be able to chat with people in
the room you joined. Note that an
IRC network may have many servers
you can connect to. When you are
connected to a server on a particular
network, you can communicate

107
Ubuntu apps 20 LibreOffice essentials

20 LibreOffice
essentials
Make your working day more productive with
these indispensable tips for the LibreOffice suite

As its name indicates, LibreOffice is the open-source equivalent


of Microsoft Office. Complete with programs for word processing,
creating databases, designing slideshows and more, it is the default
office suite for most popular Linux distributions.
For regular users and novices, it can be difficult to comprehend
just how powerful LibreOffice can be. It can be easy to get stuck in
a rut and not make the most of what it has to ofer. For example,
on a day-to-day basis, you may have no call to use macros, creating
indexes or doing a mail merge with Writer. But these features can
vastly improve your productivity and efficiency (Fig 1).
Over the next few pages, we are going to highlight some of the
best ways you can improve your experience – particularly in the
core Writer and Calc programs. You’ll optimise the way you work
Fig 1 (below) Use the LibreOffice apps
more productively and start making the most of this feature-full office software.

108
20 LibreOffice essentials Ubuntu apps

Writer

Better bullet points

Bring up formatting options 02 Creating a list of bullet points


is fairly easy; click the type
with dots or numbers and go. You
can change the formatting of these
01 Perhaps you are looking to introduce greater readability or to make sure
your document prints exactly how you want it to. Either way, the way
forward is in formatting the text. At first it can be a tricky to figure out why certain
bullet points to be different symbols
or letters instead of numbers. You can,
sections of text look how they do, so head to the formatting section to figure it however, also create nested lists by
out and make changes. On the toolbar is a symbol that looks like a backwards P – using the Tab key to create sub lists,
click that to reveal live formatting symbols, such as rogue paragraph breaks. and then press Shift+Tab to go back to
the standard list.

Paste unformatted text

03 Generally in Linux, you can use


Ctrl+Shift+V to paste text and
remove its formatting at the same
time. If you use this in Writer, or find
Paste Special in the Edit menu, you
then have several options of how to
paste the text (Fig 2). One of these
is unformatted, but it also allows
for other methods, such as using
LibreOffice formatting.

“For regular users


and novices, it
can be difficult
to comprehend
Fig 2 The Paste Special function offers
just how powerful
options for paste formatting
LibreOffice can be”
109
Ubuntu apps 20 LibreOffice essentials

Quick maths
04 Quick
maths

04 Even when
you’re writing,
you might need to do
a quick bit of maths.
Instead of switching to
Google or a calculator
app, you can use
the formula bar. Go
to Insert, Object,
Formula and write
out the calculation
you want. Once you
have confirmed it,
the outcome of the
formula appears
where your cursor
was placed.

Quick navigation

05 Pressing F5 or going
to the View menu
will allow you to use the
Navigator function. You can
use it in large documents
to quickly move between
different headings, tables,
graphics, bookmarks and
many more objects in the
document. It’s not a proper
dock, so you can move it
around to see what you
want at any given time.

“Even when you’re writing, you might need to do a quick bit of


maths. Instead of switching to Google or a calculator app, you
can use the formula bar”
Set default document format

06 By default, Writer will save new files as ODTs, the open document format. This works in most other word processors,
but if you’re regularly working with files that need to work on Microsoft Office, you can change the default file format
to be .doc or .docx. Go to Tools, Options and find the General settings under Load/Save to change the default.

110
20 LibreOffice essentials Ubuntu apps

Create a backup system in Writer

07 Writer has a recovery tool for when unexpected shutdowns happen, but that relies on temporary files and other
related files that aren’t always there when you really need them. Writer does have a backup system that it can make
use of though; enable ‘Always create backup copy’ in the Load/Save General options to cover this.

Change case

08 Got a
sentence
or a word and it’s
not quit capitalised
correctly? Pasted
some text and
it’s all randomly
capitalised? You
can change the
case of specific
sections of text
without re-writing.
Simply select
what you want
to change, right
click and select
the Change Case
option to tweak.

111
Ubuntu apps 20 LibreOffice essentials

Calc

AutoFormat tables

09 If you’ve created a table, you may need to add a touch of colour in order
to make it more readable. You can do this manually, however Calc has
a built-in format option under Format>AutoFormat. From here you can give a
colour scheme to a table that you’ve selected and even customise what is taken
into account for formatting.

10 Protect
your Protect your
spreadsheet spreadsheet

Learn more!
10 Shared spreadsheets
are good for
productivity, but the
more complicated they
There are many more become, the more
functions to learn that can difficult it can be to track
help you do more with down an accidental
LibreOffice and the first step change made by one
is to have a look through of the users. You can
some of the documentation protect the spreadsheet
for the software, or just have by using Tools>Protect
a quick browse through Document>Sheet in order
all of the options and the to give it a password so
available menus. that only certain people
can make changes.

112
20 LibreOffice essentials Ubuntu apps

Change status bar preview

11 When you select some cells with


a numerical value inside, you
get a handy prompt on the status bar
that tells you the value they add up to.
That might not be what you want all
the time, though. Click on that area of
the status bar to bring up a menu and
change it to average, maximum or
minimum numbers in the selection.

AutoFilter rows
“Filtering rows helps to organise data,
but if you’re not sure how exactly to go 12 Filtering rows helps to organise
data, but if you’re not sure
how exactly to go about doing that,
about doing that, Calc has an automatic Calc has an automatic filtering tool
iltering tool you can use” you can use. Select a row, then go to
Data>Filter>Auto for it to create an
automatic filtering system based on
that row. You can also modify it a bit
once it’s in place.
Grouped cells

13 Sometimes you don’t need to see specific chunks of data all the time, and collapsing it like in a piece of code will add
a bit more space to the viewable page. Using the Outline function under Data>Group and Outline>AutoOutline, you
can create these collapsible groups, which use a thick outline to indicate themselves.

Auto-increment
or copy cells

14 If you’ve never
stumbled across
it, Calc is very smart
when it comes to
replicating cells. If you
write down two or
three numbers or even
dates, selecting one
and dragging the black
square down to copy
will automatically fill in
the cells with numbers
or dates in the correct
sequence. If you don’t
want it to do that, press
and hold Control when
copying the cell for
regular duplication.

113
Ubuntu apps 20 LibreOffice essentials

Change Enter key

15 It seems fairly natural for the Enter key to move you down a row of cells and that’s what Calc does by default. However,
you can actually change the behaviour of the Enter key by going to Tools>Options>LibreOffice Calc, then General to
have it move along a row instead.

Freeze columns
in place

16 If you have a lot


of data, rows
or columns you can
sometimes find yourself
browsing the spreadsheet
not always able to
remember or divine what
cell is for what. By selecting
a row or column you always
want to be visible, go to
Window then Freeze to
keep it always on the top or
on the left as you browse
the spreadsheet.

114
20 LibreOffice essentials Ubuntu apps

Miscellaneous

Presenter mode

17 When using Impress for presenting slides, you will often be hooked up to a projector or television that either mirrors
or acts as an extension to your laptop. Impress has a neat feature where the actual presentation will be shown on the
big screen, while you can turn on a presenter console just for your laptop display that shows you what’s coming up in your
presentation, along with notes.

Switch between languages Insert readable formulae Using PDFs


in spell-check on the fly

18 Perhaps you need to paste


into a document a paragraph
19 There is a completely separate
application for LibreOffice
called Math that is not, in fact,
20 PDFs can be edited in
LibreOffice. Simply import
them using something like Writer
from another language. The rest of database software, but actually a way and it will dump the PDF into the
the document is in English, so the to draw up mathematical equations Draw application. You can edit text,
spell check flips out at unfamiliar that can then be inserted into other change pictures and even the general
words. Highlight the paragraph, click LibreOffice software. This is good if formatting of the PDF. Once it’s
Tools>Languages and then select you’re writing an academic paper done, Draw allows you to export the
a language for this section of the with ridiculous maths that needs to working file as a PDF for everyone
document, and only this section. be readable. to use.

115
Ubuntu apps Text editing with gedit

Text editing
with gedit
Understand its features and learn about its
many purposes

Text Editor (aka gedit) is the default GUI text editor in the Ubuntu
OS and the GNOME desktop environment. It is UTF-8 compatible
and supports most standard text editor functions as well as many
advanced features like multilingual spell-checking, extensive
support of syntax highlighting, and a large number of official and
third-party plug-ins. With multiple character sets, Text Editor can
play a versatile role – you can use it to prepare simple notes and
documents, or create source code using its advanced features just
like an integrated development environment. gedit is installed
by default on Ubuntu 16.04 and can be launched via Dash or an
application shortcut. If you prefer the command line, you can use
the gedit command to directly interact with the tool.
To open a speciic ile with gedit, type gedit <filename>
at the command prompt. To open multiple iles, type gedit
<filename1> <filename2> and so on. You can also open a ile at a
speciic line number by including +<line number> in the ile path,
like this: gksudo gedit +21 /etc/apt/sources.list.
gedit ofers several helpful options, under Edit>Preferences, that
you may want to review. For example, gedit automatically creates
a backup copy of iles you edit. If you are running low on space,
however, you can disable this: just go to Edit>Preferences>Editor tab
and deselect ‘Create a backup copy’.

“Advanced features include multilingual


spell-checking, extensive support of
syntax highlighting, and a large number
of official and third-party plug-ins”
116
Text editing with gedit Ubuntu apps

Discover gedit Understanding the user interface

New file Save file Undo/redo buttons Search file


This button lets you create a new After you are done with You can undo your actions in The magnifying glass icon lets
file in gedit. As you click this, editing the file, click the file or choose to redo them you search a file, and the next
new tabs will be created with this button to save your using these buttons icon with a pencil on top lets
new files. You’ll be asked for a work. If it is a brand new you replace the searched term
location when saving files file, you’ll also be asked with an alternative one
to enter the save location

Open file Print file Edit buttons Status bar


You can open existing This button lets you print You’ll find the edit options This bar shows the file
files from here. Just the file directly from the (Cut, Copy and Paste) details, such as encoding,
click on the button and application. You’ll be here. You can also use the current cursor position,
select the file(s) you prompted to add a printer common keyboard shortcuts tab width etc, in real time
want to open if you haven’t already (Ctrl+X, Ctrl+C and Ctrl+V ) to
accomplish these actions

117
Ubuntu apps Text editing with gedit

Uncover key features Dive deeper into gedit’s capabilities

Fig 1 Use this dialog box to navigate to text file you want to open

Handling files with gedit tab. You can also open files that are Handling text
located on other machines with gedit.

01 We’ve already seen how to


open files in gedit via the
command line. So let’s understand
However, prior to opening a file on
a server from within gedit, you need
to know some technical information
02 The Find tool can help you
locate specific sequences
of text within in your file. To open
how to manage files in gedit. To open about the server. For example, you’ll the search window, click Menu>Find,
a file or set of files in the gedit GUI, need the IP address or URL of the or press Ctrl+F. This will move your
click the open button or press Ctrl+O. server, and may need to know what cursor to the start of the search
In the dialog, select all the files you kind of server it is (HTTP, FTP etc). Once window. Type the text you wish to
want to open and click Open (Fig 1). By you have all the necessary information, search for in the search window. As
default, gedit provides easy access to go to the Open dialog and click the you type, gedit will begin highlighting
five of your most recently used files. To pencil icon to enter the IP address/ text that matches what you have
open one, click the downward-facing URL of the server. Select the file and entered. You can scroll through the
arrow to the right of the open button. click Open. If you have the required search results using the up/down
Once you have selected the desired privileges, the file should open up arrow keys or by pressing Ctrl+G. You
file, it will open up in a brand new right away. can also highlight a portion of text

“By default, gedit provides easy access to ive of your most


recently used iles. To open one, click the downward-facing
arrow to the right of the open button”
118
Text editing with gedit Ubuntu apps

with your mouse and press Ctrl+F. Syntax highlighting Plug-ins


The text you’ve highlighted will
automatically appear in the search
window. For more search options, click
on the magnifying glass icon in the
03 If you would like to use
gedit for text editing, you
have the option to highlight the
04 Plug-ins greatly enhance
the power of gedit and are
accessed via Edit>Preferences>Plugins
search window. You can select one or lines of code you write. gedit uses (Fig 2). More than a dozen plug-ins
more of the following search options: the GtkSourceView for syntax are pre-installed and can be enabled/
select Match Case to make the search highlighting. It uses .lang files to disabled here. Extra plug-ins are
case-sensitive; select Match Entire define the highlighting schemes. The available via the Internet. Here are just
Word Only to search only complete .lang file for a specific programming two of the plug-ins that can help you
words; select Wrap Around to search language is located in the /usr/ with your day-to-day activities…
text from top to bottom and cycle share/gtksourceview-3.0/language- Tag List – Displays common tags
back again. specs/ folder. in a side pane and allows for easy
You can enable code highlighting insertion into the file.
via the menu by going to External Tools – This allows the
“Locate speciic View>Highlight Mode, or via the lower
status bar. The status bar, enabled via
user to run external commands on
the file being edited from within gedit
sequences of text the View menu, displays programming itself. Once this plug-in is enabled,
within in your ile” language options for many types
of sources, scripts, markup and
the user can select custom tools from
the Tools menu. Note that this is not
scientific formats. enabled by default.

Fig 2 Enable and disable


plugins using the gedit
Preferences dialog

119
Ubuntu apps Manage images with Shotwell

Manage images
with Shotwell
Keep tabs on large numbers of photographs
with ease using the Shotwell app

Most users treat Shotwell as a simple image viewer: a picture is


double-clicked in Nautilus and pops up in Shotwell.
But using the product as a simple picture viewer means users
are losing out on a set of valuable helper features. Shotwell comes
with a relatively sophisticated database based on SQL technology,
so that pictures can be stored and retrieved with blazing speed.
Various advanced options let you tailor the display list to your needs;
if Shotwell is set up correctly, it will signiicantly reduce the time
required to ind speciic images in your (ever-growing) collection of
iles. What’s more, if your digital camera is set up correctly, Shotwell
will analyse the EXIF data in order to ind out the date it was
captured and other information automatically. Therefore, compiling
all the photos taken at a single event into one location becomes a
matter of one click.
The tutorial on the adjacent side of the screen assumes that you
already passed through the initial coniguration of the product.
If this is not the case, enter Shotwell into the dash. Click ‘Shotwell
Photo Manager’ to start the application, and click the OK button
when confronted with the ‘Welcome to Shotwell’ dialog. Its default
settings can be accepted without any further ado, but be prepared
to wait a few minutes as the database gets populated with the
images and screenshots found in your proile’s Pictures folder.

“Most users treat Shotwell as a simple


image viewer. But using it this way
means users are losing out on a set of
valuable helper features”
120
Manage images with Shotwell Ubuntu apps

Organise your shots Store and retrieve your pictures in no time at all

Last Import view Camera list Events list Border indicator


Click this part of your image This part of the main list Images get catalogued according Images can be selected for
library to put focus on the latest provides an overview of all to the date when they were bulk processing. Shotwell
addition. This can be helpful external storage media currently taken. Click any of them in order displays selected pictures with
if you want to see what items connected to your workstation. to limit the content shown in the a blue frame – using an overlay
were added to the collection It is a prime destination for picture area would affect the originality of
last – especially handy if you’re a starting import operations the pictures at hand
‘lazy tagger’

Tag list Image display SQLite powered Zoom lever


What the Events list is Shotwell displays the Shotwell stores its data in a The size of the image
to events, the Tags list is contents of the currently SQLite database. This leads elements in the display
to tags: a really helpful selected section on a grey to significant performance area can be adjusted to
tool for singling down on background. Double-click increases over traditional your needs. Simply drag
interesting image material any of the pictures in flat file storage – and might the lever to the left or
order to open them for even permit networking to right in order to find the
full-screen viewing be added one day correct balance between
information density and
picture quality

121
Ubuntu apps Manage images with Shotwell

Organise your photos Handling images with Shotwell

Fig 1 (above) Images are archived by date

Import the images


the ‘Import all’ button at the bottom- workstation’s Pictures folder. This
right corner of the screen. Shotwell process can take quite a bit of time if
01 After coming home from an
event, start Shotwell and insert
the memory card of your digital
will start to copy the images to your the files involved are large. When this

camera into an internal or external


card reader. Shotwell will grasp the
storage medium automatically, and
“After coming home from an event, start
display it as an item in the Cameras
section of the tree. Wait while
Shotwell and insert the memory card
the progress bar at the bottom is of your digital camera into an internal or
populated – the app must read each
of the images in order to obtain
external card reader”
further information about it. Next, click

122
Manage images with Shotwell Ubuntu apps

process is complete, a message titled Share RAW files industry-standard picture file. After
‘Keep or Delete’ will be displayed. It clicking OK, the program displays a
permits you to decide whether the dialog permitting you to select the
images should stay on the memory
card – picking yes is not an issue, as
04 Be it fast-moving objects or
the darkness of the Albaycin
in Grenada, when the imaging
target. Then images can be sent via
Bluetooth or email.
they will not be imported again. situation gets tough, shooting in RAW
helps you to make the most of your Share in Bulk
images. Sadly, the resulting files are
See what happened not well-suited for sharing because
most people don’t have the necessary 05 Sending images out one
by one is a painstaking task

02 When the import process is


over, your hard drive will lack
quite a bit of free space. The tree view
viewer on their machine.
Shotwell provides a RAW exporter
which can be used to transform most
to complete. Fortunately Shotwell
can also convert groups of pictures
in one go. Start out by selecting
on the left-hand side of the screen wide-spread camera files into their them in Overview mode (Shift/
will show a group of new folders that JPEG equivalents (Fig 2). Get started Ctrl+click) and proceed to selecting
correlate with the dates of when the by double-clicking the image in File>Export. Shotwell will start out
imported pictures were taken. order to open it in full-screen mode, by displaying the format selection
It’s important that you do not and right-click it. Next, select ‘Send dialog from step four, which will be
touch the sub folders in the Pictures to’. The pop-up window allows you followed by a common dialog that
directory of your profile. Shotwell to select the format – picking JPG will permit you to select a storage
creates an elaborate folder structure ensures that Shotwell generates an destination from the options.
that simplifies correlation with the
database – moving files around can
have disastrous consequences.
“If Shotwell is left to its own devices, the
Name events pictures will be grouped by the day they
and add tags were taken. Assigning helpful names to
events is sensible”
03 If Shotwell is left to its own
devices, the pictures will
be grouped by the day they were
taken (Fig 1). Since dates, on their
own, are not particularly informative,
assigning helpful names is sensible.
Right-click any of the date entries
and select Rename Event in order
to make the default name editable.
Enter a new name and press return
to commit your changes.
Tags provide a ‘second level’ of
context, which is overlaid above the
date information. Tagging images
is quite easy: select one or more,
right-click the group and proceed to
the ‘Add tags’ option in the resulting
context menu. Shotwell responds
by displaying a pop-up where one
or more tag strings can be entered.
Once tags are added, they show
up in the tree view automatically.
Simply click a tag to show all images
Fig 2 (above) Files are easily reformatted to
bearing it. jpeg equivalents

123
Ubuntu apps Listen to songs with Rhythmbox

Listen to songs
with Rhythmbox
Use your workstation to listen to music while
you work

High-quality headphones are a great help for dealing with


background noise – and thanks to multi-core CPUs, playing music in
the background is simple.
Sadly, obtaining media iles is but part of the challenge; once a
few thousand MP3 iles populate your storage, music management
becomes a severe and annoying problem of its own. Ubuntu
addresses this problem via the Rhythmbox media player. It is a
combination of a media database, an online radio player and a
classic, low-resource-consumption media playback utility.
Getting started with Rhythmbox is easy: click a media ile in
Nautilus, and the player will appear on-screen. Minimise it to proit
from background playback – the music keeps on running even if
you close the application.
Sadly, using Rhythmbox in this fashion means ignoring most of
the interesting features of the product. Advanced users can create
custom playlists containing favourite hits – some obscure Falco
tracks provide a sure-ire way to distract yourself from your work!
In addition to that, the program can also be used as a crossfade
engine. This means that the annoying gaps between normal MP3
iles get “bridged over” by superimposing the songs onto one
another – it might not be able to imitate a DJ’s handywork, but it is
deinitely is better than nothing.

“Rhythmbox is a combination of a media


database, an online radio player and a
classic, low-resource-consumption media
playback utility”
124
Listen to songs with Rhythmbox Ubuntu apps

Play tunes with Ubuntu Use Rhythmbox to play music unnoticed

Playback controls Shuffle and Repeat Track information dbus callout


If it worked for Apple’s iPod, No matter how long your playlist Music takes centre stage in Rhythmbox integrates itself
it also works for Rhythmbox. is, it eventually reaches its end. RhytmBox. The two labels next into the dbus event system of
These three buttons control Enabling the loop mode makes to the album cover swatch Ubuntu. This means that the
the playback of the currently short work of this problem, as provide information about the currently playing track gets
selected file. This mini-controller Rhythmbox simply starts again currently playing track, along displayed in an annunciator
is handy for changing what’s from the beginning with the album and the artist display even if Rhythmbox is
playing quickly not actually in the foreground
at that time

Media storage list Album cover Seek bar Volume toggle


The big table below the preview Ever feel like skipping over Reducing Rhythmbox’s
playback controls provides Even though music is an aural boring interludes and volume independently from
you with an overview of the experience, adding some intros? Grab the seek bar the rest of the system can
media currently scheduled visual spruce is totally worth it. and drag it to the right. The be helpful. Click the speaker
for playback. Double-click Double-click the small icon to playback position will be symbol and then peruse the
an item to start playing it open a pop-up with a bigger adjusted automatically controls in the flyout to suit
version of the image your preferences

125
Ubuntu apps Listen to songs with Rhythmbox

Manage your tunes Organise large volumes of media

Fig 1 Choose where you


want your music to be
imported from

Import the tracks Set importing options Click the Import button to add
them to the media catalogue of the

01 This tutorial starts out with


a scenario to think about: a
friend provides you with a Gigabyte
02 Rhythmbox will proceed
to scan the contents of the
folder. This process can take up to one
Rhythmbox application. Ticking the
‘Copy files that are outside the music
library’ checkbox instructs Rhythmbox
worth of Falco tracks. Let’s assume second per file, which means that to copy the media files into the
that the USB stick containing the patience is a virtue here. Music folder of your profile (Fig 1).
files has already been returned When the analysis is done, the This is recommended if it resides on
and the music currently sits in a list below the import controls a removable device that has to be
subfolder of a hard disk on your will populate itself with further returned to its owner, but should be
machine. Start out by clicking information about the tracks found. left disabled otherwise.
File>Add Music. Next, click the
arrow next to the combobox
and choose Other to open a file
selection dialog. Then proceed to
“When the analysis is done, the list below
navigate to the folder containing the import controls will populate itself
the subfolders with the albums.
Finally, click Open to close the with further information”
common dialog.

126
Listen to songs with Rhythmbox Ubuntu apps

Fig 2 All your songs will


be separated by artist
and album

View your imports to songs which match Fal in any of


its metadata fields. Entering a longer
string reduces the amount of data “Double-click a
03 Return to the main interface of
Rhythmbox and click the Music shown – if you know the title of a
song, simply enter it to show all mixes
song to start the
tab; the imported tracks will present
themselves in all their glory. If the and versions. playback process”
metadata of the files was not perfect, Alternatively, right-click an
a part of the files will be booked in the interesting song to open up a context
Unknown category. Most files should, menu. By default, it will offer you three Populate the playlist
however, be catalogued according choices: Genre, Artist and Album can
be used as base for further queries.
to their artist (Fig 2). Double-click a
song in the bottom table to start the The results will, of course, be shown in
the file list.
06 An empty playlist is not worth
much. Add tracks to its content
list by dragging and dropping; select
playback process.
the file in the Music view, and drag
it to the playlist. Should your screen
Search for tracks Create a playlist be too small to display all playlists in
memory, right-click the desired file.

04 Even though Rhythmbox’s


file list definitely represents
progress over Nautilus, scrolling across
05 Favourite tracks should be
collected in a playlist. Create
a new one by clicking the little ‘+’
The pop-up menu will contain an item
called ‘Add to playlist’, which comes
with a handy second list of all playlists
thousands of files is not everyone’s symbol at the bottom-left corner of known to Rhythmbox.
cup of tea. the Rhythmbox window. Then, click When done, select the playlist in
The text field below the seek bar ‘New Playlist’ and proceed to enter the the list on the left-hand side of the
is intended to accept query strings. name of the new playlist. Finally, press screen. Click any of the tracks in order
Entering ‘Fal’ would limit the contents return and Rhythmbox will commit to start playback – now just lean back
of the Artist, Album and Track fields the entered text into its memory. and enjoy the show!

127
of al
r
al ci
fe
tri Spe

Enjoyed
this book?
Exclusive offer for new

Try
3 issues
for just
£5 *

* This ofer entitles new UK direct debit subscribers to receive their irst three issues for £5. After these issues,
subscribers will then pay £25.15 every six issues. Subscribers can cancel this subscription at any time. New
subscriptions will start from the next available issue. Ofer code ZGGZINE must be quoted to receive this special
subscriptions price. Direct debit guarantee available on request. This ofer will expire 30 September 2017.
** This is a US subscription ofer. The USA issue rate is based on an annual subscription price of £65 for 13 issues,
which is equivalent to approx $102 at the time of writing compared with the newsstand price of $16.99 for 13 issues
$220.87. Your subscription will start from the next available issue. This ofer expires 30 September 2017.

128
The only magazine
all about Linux
Written for you
Linux User & Developer is the only
magazine dedicated to advanced users, developers
and IT professionals

About In-depth guides & features


Written by grass-roots developers and
the industry experts

mag Free assets every issue


Four of the hottest distros feature every month –
log in to FileSilo, download and test them all!

subscribers to…

Try 3 issues for £5 in the UK*


or just $7.85 per issue in the USA**
(saving 54% off the newsstand price)
For amazing offers please visit
www.imaginesubs.co.uk/lud
Quote code ZGGZINE
Or telephone UK 0844 249 0282+ Overseas +44 (0)1795 418 661
+Calls will cost 7p per minute plus your telephone company’s access charge

129
From the makers of

Python The Complete Manual


With our essential Python guide, you can learn to
program in this versatile coding language, discover
amazing projects to improve your understanding,
and ind ways to use Python to enhance your overall
computing experience.

Also available…

A world of content at your ingertips


Whether you love gaming, history,
animals, photography, Photoshop,
sci-i or anything in between, every
magazine and bookazine from
Imagine Publishing is packed with
expert advice and fascinating facts.

BUY YOUR COPY TODAY


Print edition available at www.imagineshop.co.uk
Digital edition available at www.greatdigitalmags.com
Ubuntu The Complete Manual
Get started with Ubuntu C
 ommand line basics
Understand the basics of the innovative Linux Get to grips with the command line and gain more
operating system and ind out how it can work for you control over your computing experience

Navigate the OS T our the Software Centre


Tour the best features of the user interface and Discover your one-stop shop for installing, purchasing
discover the beneits of open-source development and removing Ubuntu applications

Customise your desktop C


 reate with Ubuntu
Get to know the Unity workspace and personalise Explore essential built-in and third-party apps, from the
your desktop to suit your requirements LibreOice suite to Rhythmbox

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy