The Ubuntu Book 1th Edition 2016 - DeLUXAS
The Ubuntu Book 1th Edition 2016 - DeLUXAS
The Ubuntu Book 1th Edition 2016 - DeLUXAS
Ubuntu
5IF
5IFVMUJNBUFIBOECPPL
GPSBMM6CVOUVVTFST
r-FBSOUPVTF6CVOUV
r4FDVSFZPVSTZTUFN
r(FUUPLOPXUIFUFSNJOBM
r%JTDPWFSUIF4PGUXBSF$FOUSF
#PPL
Welcome to
The
Ubuntu
Book
Many people who want to make the move from their Windows systems to a Linux
distribution choose Ubuntu as their first step. The reasons for this are clear, as 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, while still benefitting from the positives that you were used
to in Windows and other desktop systems. In this book, our aim is to guide you from
where you are now whether thats about to download Ubuntu, or looking for ways
to supercharge your experience to becoming a confident Ubuntu power user. Youll
discover the best features of Ubuntus default software, and the best FOSS apps for you
to download from the Software Centre. Well even suggest some re-spins of Ubuntu to
try, should you want to go beyond the basic Unity interface.
The
Ubuntu
Book
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
Production Editor
Alex Hoskins
Senior Art Editor
Greg Whitaker
Designer
Perry Wardell-Wicks
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 Web: 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.
The Ubuntu Book First Edition 2016 Imagine Publishing Ltd
ISBN 978 1785 462 849
Part of the
bookazine series
The
Ubuntu
Book
Contents
08 Get
started
with
Ubuntu
Get to know this
popular Linux distro
Ubuntu essentials
24 Navigate Ubuntus desktop
Find your way around
38 Accessibility in Ubuntu
Make Ubuntu easier to use
44 Commanding Ubuntu
Get to grips with the command line
6 The Ubuntu Book
16 Whats
your
Ubuntu
l
avour?
Discover diferent
desktop environments
62 Connect with
Online Accounts
Enjoy convenient integration
57 Manage Startup
Applications
Automatically start your apps
58 Monitor Software
& Updates
Keep your system up to date
60 Conigure Network
connections
Set up a new connection
Ubuntu apps
66 Explore the Ubuntu
Software Centre
Your one-stop shop for new apps
72 Manage emails
with Thunderbird
All your email accounts covered
Create
with Ubuntu
Supercharge
Ubuntu
98 Manage images
with Shotwell
Keep tabs on large numbers of image iles
Beyond Ubuntu
Get started
with Ubuntu
Because of its free, open source and user-friendly nature, Ubuntu has
gained a lot of momentum in recent times. No wonder so many software
developers are using it for their projects
Dual boot
Adopting the
full version of
Ubuntu
New versions are released
every six months and are
supported for 18 months
As noted previously, Ubuntu is a very popular Linux
distribution with many years of maturity under its belt
and a huge user base. After becoming comfortable
with the initial few aspects of Ubuntu, now it is time
for you to take a deeper look at Ubuntus full version.
Before you start with Ubuntu, you need to obtain a copy
of the Ubuntu installation image. In addition, you will
have to ensure that your system meets the minimum
requirements. The most common method of obtaining
Ubuntu is to download the Ubuntu DVD image directly
from the official site: ubuntu.com/download. For
downloading and installing it, you just need to select
whether you require the 32-bit or 64-bit version and then
click Start download.
It is important to understand here the two versions
that Ubuntu is available in: 32-bit and 64-bit. They differ
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; if you have
an older computer or you do not know the type of the
processor in your computer, it is advisable 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 youll have enough
space to install extra applications, as well as to store
your own documents, music etc.
You can note here that if you have an Internet
connection, then the installer will ask you if you want
to Download updates while installing. It is highly
recommended to perform this step.
Options for
installation
You can install Ubuntu
alongside another OS or
replace it
The Ubuntu installer will automatically detect any
existing operating system installed on your machine,
and present installation options suitable for your
system. Please note that the options listed below
entirely depend on your specific system and may not
all be available:
Install alongside other operating systems
Upgrade Ubuntu to 14.04
Erase and install Ubuntu
Something else
Out of the above four options, the most preferred
is Upgrade Ubuntu to 14.04. This is because
this option will allow you to keep all your precious
documents, music, pictures and any other personal
files on the computer. Installed software will be
Internet connection
It is important to have an Internet connection during
the Ubuntu installation process. If you are not
connected to the Internet, the installer will ask you to
choose a wireless network, if available. You can follow
these steps in such a scenario
1. Select Connect to this network and then you need
to choose your network from the list.
2. In the Password field, enter your routers WEP or
WPA key.
3. Then click Connect to continue.
Navigate Ubuntu
Decode the menu bar, Launcher, Dash, home directory and more
After taking a look at the initial aspects of Ubuntu,
now its time to delve deeper into the operating
system. To start with, you may notice many similarities
between Ubuntu and other operating systems
mainly because of the fact that they are all based on
the concept of a GUI (graphical user interface). It is
definitely a good idea to understand the applications
and menus in Ubuntu so that we will be comfortable
with using its GUI. Any GUI-based operating system
makes use of a desktop environment. The main
Above To run any application from the Launcher, you just need
to click on the applications icon
Securing Ubuntu
Ubuntu is considered as secure primarily due to the
following reasons
Many viruses designed to primarily target Windowsbased systems do not affect Ubuntu system.
Security patches for open source software like
Ubuntu are often released quickly.
Open source software like Ubuntu allows security
aws to be easily detected.
The basic security concepts such as le permissions,
passwords and user accounts are also available with
Ubuntu. Understanding these concepts will help you
in securing your computer.
File
/etc/issue
/etc/apt/sources.list
lsb_release -a
/usr/share/tomcat
A quick description
Gives info about Ubuntu version that you
are currently running
Contains the available sources for
software installation
Prints out the Ubuntu version you
are running
Installation directory for Tomcat
The Ubuntu Book 13
What next?
Troubleshooting and software
management in Ubuntu
Sometimes when you are using Ubuntu, things
may not work out as expected. The good thing is
that the problems encountered while working with
Ubuntu can be easily fixed. The best practice for any
troubleshooting with Ubuntu is to complete all the steps
and document the changes you have made, so that you
will be able to track and undo changes (if necessary),
and also to pass the details about your work to other
users in the community. Let us take a quick look at some
of the most common problems that users may face
with Ubuntu.
root@ubuntu:~#
In order to reset your password, you can enter:
# passwd username
replacing username with your own username. After
this, Ubuntu will prompt you for a new password. Type
it, press the Enter key, then retype your password and
press Enter again when you are done.
Problems encountered
while working with
Ubuntu are easily fixed
Ubuntu flavours
Whats your
Ubuntu flavour?
Canonical recognises Ubuntu flavours - custom Ubuntu versions shipped
with different desktop environments, or designed for specific usage
Ubuntu is a Linux distribution that ships with the Unity
desktop. However, there are other desktops, such as
KDE, GNOME, MATE, XFCE and others with their own
established communities. Technically, changing a
desktop is about installing another set of packages, that
are all part of standard Ubuntu online repositories. This
way you can install all of them and choose what desktop
you want to use at the login greeter. Ubuntu works fine
with multiple desktops, but could always use a polish
in terms of its user experience due to minor details, like
icons from one desktop appearing in a system tray of
another, or a mixed set of default applications.
A custom Ubuntu remix with a desktop other
than Unit, or with specific usage focus is called the
Ubuntu Flavour. Everyone can build his or her own
clone of Ubuntu with custom settings, tweaks,
added extra applications and so on, but here we
are going to review so-called official Ubuntu
flavours. The difference between a custommade Ubuntu delivery with an official flavour
is that the latter has been recognised by the
Tech Board of main Ubuntu team and thus
is officially supported by Canonical. The
official support means that Canonical
provides its Launchpad infrastructure for
building and testing a flavours images,
Ubuntu team members monitor bugs
in the public bug tracker of a flavour,
and also a community manager from
a flavours party aligns his or her plans
with the official Ubuntu release schedule.
Recognised Ubuntu flavours are often
released a few days after the main Ubuntu
release announcements and share Ubuntu
fixes and improvements once they are not
desktop-specific. There are no significant
differences between Ubuntu and its
flavours in terms of hardware and software
compatibility, and almost any application
for Linux works with any of Ubuntu
flavours once it is reported to work with
the flagship Ubuntu distribution.
Ubuntu flavours
Kubuntu
An Ubuntu flavour with the KDE
Plasma desktop, Kubuntu is reported
to offer the best KDE experience, and
even has the letter k in its name!
Kubuntu has been the second most popular version of Ubuntu ever since it
emerged in 2005, when KDE developers talked loud about the undisputed
superiority of their beloved desktop environment and often added the k
letter to an application name to make it clear to users that it was a KDEcentric one. Modern Kubuntu features the Plasma5 desktop, the version that
superseded the previous version called KDE Software Compilation 4.x. Kubuntu
is about KDE, and KDE is about customising the UI. The KDE offers the same
desktop paradigm as the older Windows versions (without the controversial
Metro interface), with a taskbar along the bottom and the K menu on the left for
starting programmes. In KDE you can change hundreds of settings, customise the
toolbar, add plasmoids (desktop widgets), redefine any aspect of the look and feel and
have your desktop behave the way you want it to. To accommodate this, KDE does eat
up more system resources and sometimes can slow your system down (especially on
low-end machines). The KDE Plasma desktop is often considered as a heavyweight
shell due to various processes that run in the background (like the file indexer for
instant searches) and sophisticated desktop effects. Besides the fact that you can
configure KDE to run faster by disabling extra features, the desktop is improving
over time. Kubuntu with Plasma 5 runs very smooth and fluid, it has a much better
compositing engine that removes flickering when you watch videos, and doesnt load
your system with heavy background tasks if it detects that you are running productivity
applications. Default applications choice does not differ much between Ubuntu and
Kubuntu, except for the fact that Thunderbird mail was replaced with KMail.
Lubuntu
A lightweight Ubuntu-based Linux distribution
with the LXDE desktop that provides faster
performance and better energy saving
The world of Linux is so big, that there has been no lack of lightweight Linux
distributions. Still Lubuntu managed to become the most popular lightweight distro
within the last few years. The secret is in the logical and balanced approach of the
great LXDE desktop complemented with a stable and widely recognised Ubuntu
basement. LXDE was started in 2006 as a set of lightweight GTK-based accessories
made to accompany PCManFM, a quick and robust file manager. Since then, LXDE
included but was not limited to home grown desktop modules with speaking names
(LXInput, LXLauncher, LXPanel...) as well as third-party components: Openbox
as a window manager, SDDM for login greeter, Leafpad for text editor and a few
others. Following a trend to roll out a desktop-specific application store in every
other Ubuntu flavour, Lubuntu team has integrated the Lubuntu Software Center
into its distribution. It lets users install or remove extra applications and looks like it
is a happy blend of Ubuntu Software Center (with its ratings and screenshots) and
Synaptic (with its detailed packages control).
Edubuntu
Edubuntu offers a custom applications set for
educational purposes and is designed to be
used in schools and universities
Edubuntu ships with Unity the same shell you might have seen in the flagship
Ubuntu distribution. However, it is almost impossible to mix this flavour with its
parent due to massive customisation. Edubuntu has clearly been tailored for school
classes. First, Edubuntu sticks to the LTS Ubuntu releases for its basis, thats why
major Edubuntu versions see the light once in two years, with smaller updates
inbetween. For that reason, the newest version in the time of writing is 14.04.2 LTS,
not 15.10 as for many other Ubuntu flavours.
Second, Edubuntus installation image is quite large and needs a DVD or USB
stick for preparing an installation media. When you launch the installation wizard,
you will notice the Edubuntu-specific additions to it. You can add the GNOME
Fallback session here or install LTSP (Linux Terminal Server Project) to make
students machines boot via network from the tutors server machine. Edubuntu
installer also lets you select package templates for required target audience
(preschool) and course level (primary, secondary, tertiary).
When the system is up and running, you can guess that it is Edubuntu by the
modified Ubuntu logo with raised hand and by the custom (and rich) set of preinstalled applications. These include Blinken memory game, Calibre books
manager, Fritzing emulator for building electronic circuits, Chemtool for scheming
chemical formulas and much more. It includes educational software from KDE
project and standalone learning applications, with high-grade scientific solutions.
Ubuntu GNOME
Though Unity incorporates lots of GNOME
applications, some people want enjoy a pure
GNOME Shell experience. Ubuntu GNOME is
the best solution for that
Years ago there was no GNOME 3 (also known as GNOME Shell), and Ubuntu
featured the now-classic GNOME 2.x desktop. Since then GNOME 3 has evolved
into an original environment where mobile and desktop interface combine in grace.
The team at the main Ubuntu distribution is focused on polishing Unity desktop
features, while very few devs actually care that Ubuntu still ships with very outdated
GNOME accessories. Sooner or later, a GNOME 3 based flavour must have been
made. The first Ubuntu GNOME release took place during 2012 and was warmly
welcomed by GNOME fans, who preferred pure GNOME 3 desktop to Unity.
GNOME 3 has a trendy look, slightly larger UI controls (some of them are designed
to be triggered by finger on touchscreens) and the original desktop layout. The top
bar is fixed, with the Activities button on the left, while a clock with calendar and
notifications are at the centre, and applications indicators on the right. Similar to
Unity, there is a vertical launcher panel along the left edge of the screen, but GNOME
3 hides it by default (press the Super key to reveal it).
GNOME takes a different approach in offering settings to a user. There is the builtin System Settings, which is fine but quite basic once you want to customise system
look and feel. A more powerful settings altering tool is called GNOME-tweak-tool,
and it is available in Ubuntu GNOME standard repositories. GNOME Tweak Tool can
be combined with Unity Tweak Tool: even though we dont have the Unity desktop
here, the two tweakers complement each other and will prove useful.
Mythbuntu
Mythbuntu is an Ubuntu version tailored
to deliver a smooth MythTV experience
The idea behind Mythbuntu is to bridge the gap between inexperienced users
that still want to turn their PC into a media center, and Ubuntu geeks. Mythbuntu
makes installing and setting up the MythTV system a little easier at least users
dont have to hunt down individual packages and stick to command line to enter
commands. So, Mythbuntu is a comfortable and ready-to-configure delivery
of MythTV in Linux. MythTV offers the interface and the underlying routines
for setting up a digital video recorder, or maybe a digital home multimedia/
entertaining system. In short, it is an open source alternative to things like
Windows Media Center.
Xubuntu
Xubuntu is an Ubuntu version with the
XFCE desktop, which is focused on
performance and useability. XFCE is lighter
than Unity, but not as light as LXDE
Xubuntu is fast, low on resources and offers a clean, uncluttered desktop. Does
that sound familiar to you? It might remind you of what we said about Lubuntu.
Xubuntu and Lubuntu share their target audiences by offering Ubuntu flavours
with similar features. Both systems are good for old or low-end computers, but
it seems like Xubuntu doesnt slim down desktop features like Lubuntu does and
generally is feature-rich rather than minimalistic.
Xubuntu offers a clean XFCE desktop with the main launcher panel at the
top of the screen. There are now 5 presets of the panel and the backup and
restoration tool for the panel. Browse the XFCE main menu to explore the
wonderful world of different default applications. Thunar is the default file
manager, Orage offers a calendar, and Mousepad is a text editor. In fact, XFCE has
a wide list of custom-made accessories and utilities (including a CD burner!), the
original Xfwm window manager, own frontend to Gstreamer media framework
(Parole), and of course its own System Settings clone with original modules.
Reasons to go with X
A lot of people can be left undecided with what desktop environment to go
with: XFCE or LXDE. Both are attractive and fine and have little footprint both
in RAM and occupied hard drive space. Remember that the underlying system
remains the same, and you can install both desktops at one time using standard
Ubuntu repositories. However, LXDE has been switching to Qt lately, and is not
considered stable enough, while XFCE is older and generally very stable. Also,
since LXDE is transforming to LXQT, there is the inevitable mix of GTK and Qt
based apps, whereas XFCE remains to be purely GTK based.
Ubuntu MATE
MATE is the reincarnation of the classic
GNOME 2 desktop, that used to be very
popular before GNOME 3 (GNOME Shell) took
over. Ubuntu MATE brings it to the fore
While certain Ubuntu flavours are targeted at low-end machines, or specific
area of usage, Ubuntu MATE is a mainstream distribution. It doesnt compete
with the main Ubuntu and its Unity desktop, but attracts the part of the audience
that simply doesnt like Unity. It doesnt mean that Unity is bad, but Ubuntu used
to offer a GNOME 2.x desktop before version 11.04 and a lot of people got used to
it. GNOME 2.x was appreciated for its clean and logical desktop layout and robust
performance. This version was left unmaintained since GNOME 3 took over, and
it was forked for a new project called MATE. MATE looks exactly the same as the
old GNOME 2.x, but brings modern improvements to user experience, such as full
support for modern GTK 3 toolkit, correct usage of application indicators in the
system tray, fixed integration with Pulseaudio mixer, Bluetooth applet and more.
Different naming
The desktop is named after the South American plant yerba mate. To avoid collision
between modern GNOME 3 default applications and forked old-timers, MATE
developers renamed everything. Gedit is now Pluma, Nautilus is Caja, Evince is Atril
and so on. Thanks to this, MATE can coexist with GNOME 3 on the same machine.
Ubuntu Kylin
Ubuntu Kylin is the official Chinese version of
Ubuntu, developed by joint forces of Canonical
and the Ministry of Industry and Information
Technology of the Peoples Republic of China
This is an exquisite Ubuntu flavour, which is really unlike the others. Naturally, it
is intended for use in China, by Chinese people in other countries and by students
of the Chinese language, culture and traditions. The Chinese government used to
invest heavily into Kylin, a FreeBSD-based system that was designed to become
a national OS in China. But later on, in 2013, the Chinese government agreed with
Canonical to develop a customised Ubuntu version specifically for Chinese market,
so the history of Ubuntu Kylin began. The new operating system was named after the
mythical beast Qi Lin, a hybrid of a dragon head and tiger body which represents
good omens, protection, prosperity, success, and longevity. The Ubuntu Kylin release
schedule is aligned with the main Ubuntu Linux, and both systems are mutually
compatible in terms of supported software. The difference is in default applications
and, of course, localisation that goes far beyond simple change of UI language.
Ubuntu
essentials
24 Navigate Ubuntus desktop
57 Manage Startup
Applications
58 Monitor Software
& Updates
59 Work with Universal Access
38 Accessibility in Ubuntu
Make Ubuntu easier to use
44 Commanding Ubuntu
Get to grips with the command line
62 Connect with
Online Accounts
Enjoy convenient integration
60 Conigure Network
connections
50
56
63
Ubuntu essentials
The dash
Unitys start menu is keyboard driven
and opening it in this way can save
time. Savvy users will open it using the
Windows key on their keyboard. You
can get a real productivity boost by
following it up with a few characters
describing the app you are looking for:
for example, entering Thun after tapping
the Windows key virtually ensures that
the Thunderbird icon appears right in
the middle of the application list
Trash
Just where youd expect to
find it, the trash can is always
visible at the bottom of the
quick launch bar
Wallpaper
The quick
launcher
Right-click on the
symbol of a running
application to open
a short menu.
Selecting Lock to
launcher from the
available options
ensures that the
symbol will always
remain in the bar for
quick access to that
specific application,
even if it is not
currently running
Active workspace
Ubuntu essentials
Discover bootloader menu Find out how to use the GRUB2 bootloader
Meet the GNU GRUB
Boot Windows
Ubuntu essentials
Window manager
Default wallpaper
Appearance settings
System settings
require some extra features that are not part of the outof-the-box Ubuntu. For that reason, there are different
ways to work around it in the form of commands ($
gsettings) and even stand-alone tweakers (eg Unitytweak-tool). Such extras let you change advanced
settings like fonts, window control placement, desktop
effects and more. Next you can find out how you
can change the most common settings and resolve
frequently met issues.
Tutorial
01
02
03
04
05
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
Manager>Hotcorners. There are eight areas (four corners and four sides) with a drop-down menus next to each,
letting you choose what action will be performed once you move your mouse to the respective area. You can
set a corner or a side to toggle the desktop (for example, minimise all windows or bring them back on), spread
windows or show workspaces. All changes are applied instantly, you can check it by driving your mouse to a
corner or a side that has been set up.
Ubuntu essentials
Navigation
Personal settings
Hardware settings
System-related settings
Set up a printer
Ubuntu automatically detects and configures local
printers in case it has a driver for them. Most consumer
printers are supported without any problems in Linux
nowadays, so if you open the Printers subsection, you
should see the icon for a configured printer. You can
change (edit) the printers preferences, change its driver,
or you can create several instances of the same printer
with different settings.
Press the Add button and follow the easy-to-use
wizard to set up a local or remote printer Ubuntu
detects network printers automatically. In case you
need more control or you want to resolve a printing
issue, use this tip: $ sudo service cups restart. This is
the command for restarting the system-wide printing
service in Ubuntu. To enjoy the feature-rich CUPS admin
interface instead, then try going to http://localhost:631
in your web browser.
Note that all changes to printer settings require the
root password of your Ubuntu system.
Ubuntu essentials
Protect your PC
Related settings
If your PC suspends or
turns off the display after
a period of inactivity, you
can set Ubuntu to require
a password in order to
resume using the PC
Diagnostic reporting
Canonical needs your feedback
in order to make Ubuntu better.
If something goes wrong (eg a
program crashes), Ubuntu will
send details of the problem in a
report to its headquarters
may vary. You may not want others to see what you have
been using recently, or maybe online search results in
Dash (Unitys main menu) distracts you, or you simply
dont want Canonical to know you better. There is
another security setting in Ubuntu outside its System
Settings shell. When you launch Firefox for the first
time it politely asks you to choose what data youd like to
share. By default Firefox sends crash and help reports to
Mozilla, but still its you who decides and approves it.
Tutorial
01
02
03
A good password
contains lower and
uppercase letters, special
characters and digits.
Thankfully, Ubuntu can
help you
04
Configure sudo
Ubuntu essentials
Navigate the Dash display Get familiar with the display and filter options
Text area
Reference
Categories
Application
This section
displays results
related to the
applications scope.
Youll see all the
applications that
match the search
query here
Sources
Weather
More suggestions
Scopes
Dash by default shows
results from all the
available scopes. You
can limit the results
to specific scopes by
selecting them here
This section
allows you
to select the
sources from
where Dash will
look for results
when you enter
a search query
Ubuntu essentials
First column
Special files
File names
This is where all the
directory/file names
are listed. You can
see all the toplevel Linux default
directories here
Fifth column
Second column
Sixth column
This shows the
timestamp of
last modification
of the directory
Tutorial
03
Let us 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 systems
behaviour for all users.
/home this is the place for users home directories.
01
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. 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.
/sys is a virtual file system that can be accessed to set or obtain information
about the kernels 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.
Ubuntu essentials
Accessibility in Ubuntu
Learn to use the accessibility tools and options available in Ubuntu
Usability was a prime concern when
developing Ubuntu. Developers worked
hard to ensure that Ubuntu is as easy as
possible for people of all ages languages and physical
abilities to use. This was not easy; it included providing
an accessible platform with high-quality assistive
tools, and making other applications work with these
tools; a feat only an open-source software approach
could achieve.
Accessibility settings
On-screen keyboard
Ubuntu offers an
easy-to-use, resizable
on-screen keyboard. Just
flip on this switch and the
keyboard will appear on
your desktop
Text entry
This is the area
where you can use
the mouse pointer
to enter text into
a file. As you point
in a direction, the
page zooms in,
and once you click,
the character gets
typed in
Sticky keys
This switch lets you
enable the sticky
key configuration, so
that one key press
on the Shift, Ctrl
or Alt key remains
active until the next
key press
Enable by keyboard
Bounce keys
Slow keys
Accessibility in Ubuntu
Orca screen reader
The Orca screen reader can be enabled at any time
when you are logged in to any Ubuntu installation.
Once enabled, Orca screen reader will be loaded every
subsequent time you log in to your session. Orca is a
function that can be enabled and disabled using the
Alt+Super+S keyboard shortcut. Note, however, that
you can also enable Orca using the same shortcut key
at the login screen. The super key is also known as the
Windows key.
It is also possible to enable Orca at install time, which
means that it will be able to guide you and help you
independently install Ubuntu onto your system. When
you boot the live CD, you should hear a bongo drum
sound. At this point, you can just go ahead and enable
Orca. Once again, the keyboard shortcut Alt+Super+S is
used to enable Orca.
Orca should start speaking, and from this point you
can select your language, and either boot into a live
Ubuntu desktop by selecting the Try Ubuntu push
button, or you can elect to install Ubuntu by selecting
the Install Ubuntu push button.
Dasher
Enter text without using the keyboard
Dasher provides an intuitive way
to enter text without using the
computer keyboard. With Dasher,
you point where you want to go,
and the display zooms in wherever
you point. The area into which you
are zooming is painted with letters,
so that any point you zoom in on
corresponds to a piece of text. The
more you zoom in, the longer the
piece of text you have written. You
choose what you write by choosing
where to zoom.
Mousetweaks
For users who cannot click with a hardware button, there is a utility
named Mousetweaks that enables them to perform the various clicks by software.
Mousetweaks offers several features to users: system-wide software click, usually
called dwelling, and system-wide simulated right click through a click and hold of the
left button (of course, for left-handed mouse users, the terms left and right have to
be inverted). Provide an area on the panel to temporarily lock the pointer (provided
by a panel applet). It uses image processing to translate the users head movements
into mouse events (movements and clicks), which allow users to interact with the
different desktop managers and applications. Mousetweaks is installed by default in
Ubuntu 15.10, and can be easily launched via the terminal. Just type mousetweaks in
the terminal.
Ubuntu essentials
Learn to create file servers to share data from your Ubuntu system
Menu bar
This section has the
basic settings to add
files to share and
set preferences like
server group and view
all Samba users
Share name
You can set the
name for the
directory selected
above in this section
Samba share
directory
Once you click on Add file
to share, youll get a popup. In the Directory section,
just browse and select the
directory youd like to share
Standard
toolbar
Here you have
quick links to
settings, add file
and help options
Description
Set the
description
for the shared
directory here
Shared files
Permissions
Save or
cancel changes
Tutorial
[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755
Lets look at the meaning of each section
comment: a short description of the share. You can
adjust it to fit your needs.
01
02
Samba clients
03
Workgroup = EXAMPLE
Security = user
Ubuntu essentials
Manage hard drives, SSDs and removable media with Ubuntus Disks tool
Linux filesystem
More details
Extra
features
Partition details
The gear
button hides
lots of extra
features,
including
options for
creating and
restoring
disk images,
benchmarking
tool, drive
settings
dialog and if
supported,
SMART
self-tests
Tutorial
01
02
03
04
Ubuntu essentials
Commanding Ubuntu
Left The mv command is
used to move files from
one location to another
Files, folders,
and familiar
things
Time to get the command
line working for you, on
your files and folders
To look inside your Documents folder, open a
terminal and type in ls Documents.
Dont forget to press Enter! Youll see a listing of all
of the files in Documents. Type ls and youll see a
listing of the files in your home directory thats
because when you open a terminal, it places you in
that directory. You can change by using the change
directory command cd like this: cd Documents.
Now ls alone will show you your files.
The cd - command will take you back, because
the - is a shortcut to tell cd to go back to where
you were before. You could also type cd ~, as ~ is
short for your home folder /home/jo/ or whatever.
pwd will remind you where you are now.
Configuration files the ones called dotfiles,
because their names are prefixed by a dot are
normally hidden from listing. In most file managers
you can toggle them into view with Ctrl+H (on a few,
its Ctrl+.). At the terminal, its ls -a.
The . and .. are shortcuts to this directory and
parent directory, or the one above hide them
by using -A in place of -a. Those letters after the
hyphen are called command-line switches: try
ls -l, for long listing. Well tell you about some of
that cryptic-looking info it displays later.
Moving and copying files uses mv and cp well
see cp in use overleaf, but for now type:
cd ~
touch random.txt
mv random.txt newname.txt
mv newname.txt Documents/
ls
ls Documents
Tab complete
If you think thats a lot of typing, try hitting the
Tab key after a couple of letters of each word.
Where theres 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. man ls
will tell you all about options for ls; man man will tell
you about the manual command itself.
Look inside
You dont need to open an application to look inside a file.
The file command will let you see what sort of file it is. cat
sends the contents of the file scrolling by, or more gives
them to you a page at a time. less does the same thing,
with more controls, and leaves you stuck if you dont know
to press Q to quit. Q will also exit man pages; for other
apps, Ctrl+C is a good bet for quitting.
Sometimes you just want to see the first or last few lines
of a file head and tail are the commands you need, each
defaulting to ten lines. tail -n 30 /var/log/syslog
shows you the last 30 things registered by that log file.
Real power comes with grep, to search for a term inside
a file. Try grep ls ~/.bash_history to pull out all the
instances of ls that you have used so far.
Ubuntu essentials
Permissions, please
Ubuntu files are protected from alterations by other
users on a shared machine. All files and folders belong
to a user it doesnt 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
doesnt 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 the
annotated screenshot on the right), 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 youll need the recursive switch to
remove a directory: rm -r testfolder.
No attachment?
Above Nano isnt the friendliest text editor, but its included
in Ubuntu and most other Linux distros by default
Using Nano
Commanding Ubuntu
Long listing
Running ls -l lets you see
who owns a file or folder,
and who has permission
to read, write and run
software. Three groups
of rwx in the listing apply,
respectively, to the named
user, the named group, and
everyone else left
Run with it
chown jo myfile.txt
Ubuntu essentials
Edit your
terminal profile
Non-distracting
scrollbars
Tutorial
01
Every Linux distribution uses Bash (Bourneagain 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.
02
03
04
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, 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, lets
do something massive and change our boring GNOME
Terminal to a Hollywood Technodrama showcase,
mimicking an FBI command centre:
Ubuntu essentials
Check destination
Set up scheduling
Proceed with
important
routines
Tutorial
01
02
Choose a destination
03
04
05
Ubuntu essentials
Select the
disk to use
Startup Disk Creator
displays available
target USB drives here.
When you plug it in, the
application detects it
automatically and adds
it to the list
Choose an
image file
If you want your ISO
image to appear in
the list, click the
Other button and
select the image
file. By the way, it
also supports disk
images (.img)
Storage persistence
Tutorial
01
02
03
04
Ubuntu essentials
Calendar
When you click on the time, the calendar appears with the current date highlighted.
The first row has a slightly different colour in the background and indicates the threeletter names of the days of the week. The calendar lets you see the month with one
easy glance and you can highlight any date simply by clicking on it. It is also helpful
when it comes to rewinding to an earlier date or browsing future months and years.
Note the small arrows that band the month and year headings click on the left arrow
to go back and the right to move forward; the calendar will be updated instantly.
There are many useful checkboxes that affect the time display format. The most
obvious option, Show a clock in the menu bar does what it says, so you can remove
the time indicator from the Ubuntu panel entirely. The rest of the settings are divided
in two groups: what youd like to see in the clock and in the clocks menu. There are no
limitations on what exact combination of checkboxes you can use. You can add weekday,
date and month or seconds directly to the system top bar and choose the clock format.
For the clock menu, there is the Monthly calendar switch, which turns calendar display
on and off, and also a few other useful checkboxes for showing time in auto-detected
locations and adding extra locations by hand. Plus, if you happen to use the Evolution
mail application with its built-in calendar feature, youll be able to display calendar
events right in the clock menu were currently in note the Coming events from the
Evolution Calendar checkbox, which is currently greyed out.
Make use of this small accessory that sits inside your Ubuntu system
Create an archive
The reason why you may need to create an archive can vary. Firstly, an archived file
is always smaller than the original one, so the simplest goal is to save some disk
space. This doesnt help much with photos and videos, because they are already
compressed and so adding them to an archive doesnt save much space. However,
office documents or uncompressed media files (DOC, XLS, WAV, TIFF and so on) show
a splendid compression ratio, up to 90-95%. Secondly, 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.
File Roller has some extra features and boasts fine integration with the Ubuntu file
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 dragand-drop files 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
offer advanced options that include password protection (ZIP and CBZ only). You
can protect just the files and directories, so it will be possible to view the list of files
inside an archive, but in order to open or extract anything from such archive, one
must provide a proper password. You can also protect the list of the archives files
and directories, or split an archive into parts of fixed size.
Ubuntu essentials
Find out where your free disk space went with a specialised accessory
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 files there are.
There are no limitations with which directory you want to analyse. Disk Usage Analyzer
lets you open any directory, be it a local or remote one. Click the small gear icon in the
top-right corner to open the desired location. If it is a remote one, please use the Scan
Remote Folder option and provide the correct address, for example Samba share
addresses start with smb://.
When you see the resulting ring chart, hover your mouse over a slice to see the
details. Click a slice to dive in and set it as a top directory. The chart will adjust
automatically and you will see more details about what content inputs to overall
directory weight. The left part of the screen compliments the chart with a tree view,
with extra columns for usage percentage, size and number of items.
you need to estimate the relative sizes of different units. A treemap may be hard to
understand when you first look at it, but it does help when you know how its built. Disk
Usage Analyzer first draws the largest rectangle for your top-level drive or directory
and then recursively subdivides it into smaller rectangles according to the size of the
content inside. Larger rectangles display their names instantly, others will give more
information once hovered with a mouse.
Even though there is no way for you to rearrange entries or define the order in which
they load when you start up your computer, you can make other changes with
minimum effort.
Say you want to load an application that requires immediate Internet access, but
your connection doesnt load immediately after your computer turns on and Unity
starts. You can fix it by setting the application to sleep for a while initially by adding
a command like sleep 20; (for twenty seconds) before the actual command. For
example $ sleep 20; application_executable.
There are also many small scripts and utilities that start automatically together
with the Unity desktop, but dont show up in Startup Applications Preferences. You
can bring back the hidden entries by issuing the following command:
Ubuntu essentials
Set up updates
Ubuntu periodically checks for its updates online and if it finds a newer version for
at least one package, a special notification pops up. In the Software & Updates
application, you can choose what updates the system looks for and how frequently
checks should be carried out. To do this, go to the Updates tab and review the list of
ticked boxes. By default, Ubuntu looks for security updates, recommended updates
for regular packages and also for backported software that is not supported by
Canonical, but contributes to the Ubuntu experience.
The next four drop down menus control the updates frequency and behaviour.
For instance, here you can program Software & 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 dont like to hop to newer
versions too often, stick to LTS releases.
Ubuntu essentials
username:password@server-name.domain
Provide a proper port and finally hit the Apply system wide button to finish with setup.
Make your laptop run longer and let Ubuntu reduce your monthly bills
search for power in Dash or run the $ unity-controlcenter command. The Power application is a tiny one,
it has only two settings: one for selecting a period of
inactivity, after which your PC will be suspended (put
into sleep mode). The other setting triggers the battery
indicator display on the top bar in Unity.
There are various other tweaks and hints that can save even more power and make
your laptop battery last longer. Ubuntu used to have various all-in-one solutions
that combined plenty of standalone tweaks. Not anymore. Currently the most viable
solution is TLP. It automatically adjusts the CPU clock, hard drive time outs and
supports power saving modes for your wireless network chip, Bluetooth, audio and
other built-in subsystems. TLP is not (yet) included in Ubuntu by default, so you will
need to install it, but first add the projects repository, as follows:
Ubuntu essentials
View and manage system resources using the System Monitor app
Ubuntu
apps
66 Explore the Ubuntu
Software Centre
Your one-stop shop for new apps
72 Manage emails
with Thunderbird
74 Communicate with
Empathy
70
78 Unlock LibreOffice
Calc tricks
Use spreadsheets like a pro
84
72
90
Ubuntu apps
Navigation
Programmes are categorised based on their functionality, performance,
ease of use, time of launch and user ratings, which are all displayed in the
home screen of Ubuntu Software Centre
The USC segregates software into different categories
such as accessories, developer tools, books and
magazines, games, education, office and many more.
Upon clicking the Accessories tab, for instance, a list
of accessories is displayed, including Speed Crunch
(precision calculator), 7zip (compression/uncompression
tool), PuTTY (SSH/Telnet client) and Shutter (screenshot
utility). The software listed in the Accessories tab is by
default sorted by rating; the other sorting criteria are
name and release date.
Moving on to the Developer Tools page, you will find
many open source tools which are subcategorised
into version control, IDEs (integrated development
Ubuntu apps
Updates and
past downloads
Ubuntu apps
Discover Firefox
Icon bar
This bar holds icons for
other services like Pockets
(to save reading lists),
Downloads, Home and
Chat. The last icon opens
up the Settings menu
General
options
This area holds
all the major
options that
Firefox has
to offer. You
can open new
windows, print,
view history,
edit settings
and more
Editing
buttons
Sync
Customise
Zoom
Click on the - sign to
zoom out or the + sign
to zoom in to the web
page. The middle area
here shows the current
zoom percentage
Tutorial
01
02
03
04
Install an app
Ubuntu apps
Write
Address book
Click here
to open
the Mail
Compose
dialog and
write a mail
Mails list
Chat
Mail display
This is the
section that
shows a list of
all your mails in
a chronological
order. Just
click on the
column header
to sort the
mails based
on different
criteria
Extend Thunderbird
features
Thunderbird has an open, extensible design and
program architecture. This enables people to create
add-ons for it. Most of these are distributed via
the Mozilla add-ons site, but authors can do so any way
they choose. Lets see how to install an add-on
To start, go to Tools>Add-ons. Click on Get Add-ons.
Type the name or keywords of the add-on you want in
the search field and click the magnifier icon. Then select
the add-on from the list and click Add to Thunderbird.
Click on Install Now once the button is available. Note
that the add-ons from the official site (addons.mozilla.
org) are reviewed by Mozilla and are relatively safe to
install. Also, if the author is verified, 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.
Ubuntu apps
The Empathy interface Understand how Empathy works and what you can change
Application settings
Online accounts
Other settings
Contacts list
This window
displays a list of
all the contacts
and their current
status. To chat with
anyone from this
list, right click on
the contact, and
select chat
General
settings
You can find
these under
Empathy>
Preferences.
Under the
General
settings you
can set what
contacts will
be visible by
default and
also select the
chat settings
Accounts list
Chat window
Account details
Once you select an already
added account on the left
window, youll see all the related
options here. You can choose
to enable or disable related
services from here
on the Empathy icon to launch the application. When
you launch it for the first time, youll 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 different kinds of
conversations, easily search through your previous
conversations, and share your desktop in just two clicks.
Now lets learn about Empathy in more detail.
Tutorial
01
02
Manage contacts
03
04
Ubuntu apps
Menu bar
Workspace
Standard
toolbar
This shows various
toolbars as and
when you enable
them via the View
menu option. By
default it shows the
Standard toolbar,
which has options
related to saving
files and other
standard items
Form design
toolbar
This toolbar has the options to
help you draw forms and format
them. You can see the Design
Mode On button here.
Sidebar
The sidebar
is common
among
LibreOffice
suite software.
It has four
main sections
Properties,
Styles and
Formatting,
Gallery, and
Navigator
Drawing toolbar
This section lets
you draw and insert
various objects in your
Writer document
Status bar
The Writer status bar
provides information like
page number, word and
character count for selected
text, page style, language etc
about the document
Tracking changes
Master document
Database integration
Writer can be used for creating forms. This is done via
two toolbars: Form Design and Form Control. If you
want to create a form for getting someones details,
click the Design Mode On button to activate the tools in
the Form Design toolbar. Insert controls like Name as a
text box, gender as an options button, Country as a list
of options, and Hobbies as checkboxes. Now beautify
the form as you want.
Forms are generally used as a front-end for the
database. LibreOffice can access numerous data
sources like ODBC, MySQL, Oracle JDBC, spreadsheets
and text files. To create a database with LibreOffice
Base, navigate to File>New>Database to start the
Database Wizard and select Create a new database.
On the next page, select Yes, register the database and
Open the database for editing; this makes it available
for other LibreOffice components.
Ubuntu apps
Standard toolbar
Menu bar
Formatting toolbar
Formula
toolbar
This toolbar has
the options to
view and add
various formulae
to spreadsheets
Customisation
bar
This menu lets
you access the
most-used aspects
of Calc UI, like
customisations,
navigations,
functions and more
Row headers
Status bar
Column headers
This section holds
the column headers.
Each column is
identified by a letter
of the alphabet,
starting with A
Alternatively, you can enter data, then use Calc to
plot the data by changing some of it and observing the
results without having to retype the entire spreadsheet
or sheet.
There are some other very neat features too. You can
create formulas to perform complex calculations on
data. You can use database functions to arrange, store
and filter data. There is a wide range of 2D and 3D charts
available that can be used to plot the data and more.
Tutorial
01
Add formulas
02
03
Plot charts
Ubuntu apps
Set Operations
& Functions
Operators
&
Attributes
Operators
consists
of a set of
operators
such as limits,
sum, integral,
etc. Attributes
consists of
symbols that
are used with
a variable in a
formula, such
as line below,
circumflex,
and vector
arrow, etc
Others &
Examples
Others consists
of symbols like
infinity, partial,
nebula, arrows,
dotted lines,
etc. Examples
has a set of
equations which
are pre-defined
in Math
Equation editor
Preview window
The equation appears here
during and after input
Tutorial
01
02
Formulas in Writer
03
Ubuntu apps
Standard toolbar
Sidebar
Slides pane
The slides pane
contains thumbnail
pictures of the
slides in your
presentation in
the order in which
they will be shown,
unless you change
the slideshow
order. Clicking a
slide in this pane
selects it and
places it straight in
the workspace
Workspace
This is the
place where
the slides
are displayed
while you work
on them. You
will see the
slides currently
selected in the
slides pane
right here
Layout selection
Drawing toolbar
Status bar
The Status bar, located at the bottom
of the Impress window, contains
information that you may find useful
when working on a presentation,
like slide number, zoom level, cursor
position and so on
pane, workspace and sidebar. Several toolbars can be
displayed or hidden when creating a presentation.
Impress has five layouts for the workspace that can
be used in different scenarios. They are: normal view,
outline view, notes view, handout view and slide sorter
view. Each workspace view displays a different set of
toolbars when selected. You can customise toolbar sets
by going to View>Toolbars on the menu bar, then check
or uncheck the toolbar you want to add or remove.
Tutorial
01
02
03
04
Ubuntu apps
Above Learn
how to use the
LibreOffice apps more
productively
Writer
01
Bring up formatting
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 bullet points to be different symbols or letters instead of numbers. You can, however, also
create nested lists by using the Tab key to create sub lists, and then press Shift+Tab to go back to the standard list.
04
Quick
maths
Quick maths
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. One of these is unformatted, but it also allows for other methods, such as using LibreOffice formatting.
On a day-to-day basis,
you may have no idea
about macros or creating
indexes in LibreOffice
07
Create a
backup
system in Writer
05
Quick navigation
06
08
Change case
Got a sentence
or a word and its not
capitalised correctly?
Pasted
some
text
and its 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 use the
Change Case option.
Full app
explanation
As luck would have
it, if you're unsure of
everything that comes
in LibreOffice as part
of the suite, we cover
it extensively in our
guide to the best Linux
software starting on
page 114. There is more
to LibreOffice than
just Writer and Calc,
after all.
Ubuntu apps
Calc
Learn more!
11
12
AutoFilter rows
13
Grouped cells
09
AutoFormat tables
10
Shared spreadsheets are good for productivity, but the more complicated
they become, the more difficult it can be to track down an accidental change
made by one of the users. You can protect the spreadsheet by using Tools>
Protect Document>Sheet to give it a password so that only certain people can
make changes.
Sometimes you dont 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.
10
Protect your
spreadsheet
Miscellaneous
17
14
15
Presenter
mode
17
Presenter mode
18
19
16
20
Using PDFs
Ubuntu apps
Discover Gedit
New file
Save file
Undo/redo buttons
Search file
The magnifying
glass icon lets
you search a
file, and the
next icon with
a pencil on top
lets you replace
the searched
term with an
alternative one
Open file
Print file
Edit buttons
Status bar
Tutorial
01
02
03
04
Plug-ins
Syntax highlighting
Ubuntu apps
Audio project
Recent projects
Select a disc
Data project
Video project
Disc copy
Burn image
Selecting this
option, you can
write an existing
CD/DVD image
directly to the
optical disc
Choose a coloured
background or to select a
background image
The Ubuntu Book 91
Create with
Ubuntu
94 Work with LibreOffice draw
Create cool vector graphics
98 Manage images
with Shotwell
94
96
98
102
104
Drawing toolbar
Standard toolbar
Menu bar
Sidebar
Properties sidebar
Opens sub-sections
for object properties
that you can change to
suit your requirements.
The sub-sections are
context based
Pages pane
Workspace
Status bar
It includes several
Draw-specific
fields like object
size, slide number,
unsaved changes,
zoom level etc
Add text
Editing objects
Once you have added and shaped the objects, you
may want to colour or format them. To do this youll
need to enable various toolbars.
The Text Formatting toolbar, the Sidebar
Properties section or a context menu can be used to
edit an object, or you can change attributes such as
colour or border width, the Line and Filling toolbar.
By default, Draw doesnt show the Line and Filling
toolbar. To see it, go to View>Toolbars>Line and Filling
on the Menu bar to open the toolbar at the top of the
workspace. The most common object attributes can
be edited using this toolbar. You can also open the
Line dialog by clicking on the Line icon and the Area
dialog by clicking on the Area icon for access to more
formatting options.
You can also open the Text Formatting toolbar
by going to View>Toolbars>Text Formatting on the
Menu bar. Note that the tools on this toolbar will not
become active until text has been selected.
to find the best one and get rid of the rest, via one of
various sieve methods.
Shotwells viewer component derives its
tremendous speed from being simple: its small file
size is accomplished by reducing unneeded editing
operations. This, however, does not mean that the
product cant be used for editing: right-click an image,
and use the Open with dialog to defer the image to
another editor.
Rotation controls
Picture area
Zoom to fit
This area is
dedicated to your
images. You can
click, drag and
pan around to your
hearts content
Click this
button in order
to make the
image fill the
window in the
most efficient
fashion
possible.
Shotwell will
even attempt
to minimise
white space on
the borders at
all expense
Zoom-state indicator
1:1 zoom
Picture counter
This label informs you
about the number of
images in the currently
selected folder
Camera list
Events list
Border indicator
SQLite powered
Shotwell stores its data
in a SQLite database.
This leads to significant
performance increases
over traditional flat file
storage and might even
permit networking to be
added one day
Tag list
What the Events list is to
events, the Tags list is to
tags: a really helpful tool for
singling down on interesting
image material
Image display
Zoom lever
Tutorial
01
02
03
04
05
Share in Bulk
Get smart with viewing videos Discover the possibilities of Ubuntus Video
Play area
Playlist overview
Playback controls
The same as you will
see on most players.
Use these three
buttons to start and
stop the video currently
being played back
Playlist controls
You can add and/or
remove files from the
playlist effortlessly
via the buttons at the
bottom of the playlist
overview window
Playback counter
Seek bar
Volume control
Playback controls
Track information
dbus callout
Rhythmbox integrates itself into
the dbus event system of Ubuntu.
This means that the currentlyplaying track gets displayed in
an annunciator display even if
Rhythmbox is not actually in the
foreground at that time
Volume toggle
Reducing Rhythmboxs
volume independently
from the rest of the
system can be helpful.
Click the speaker symbol
and then peruse the
controls in the flyout to
your preferences
Seek bar
Tutorial
01
02
03
04
05
Create a playlist
06
Control red-eye
levels
07
08
01
Install GIMP
02
04
05
03
06
09
09
Add Auto-Levels
11
Add AutoLevels
14
Heal blemishes
15
10
12
13
16
17
18
Do some preparation
19
Use the
Quick Mask
about with the levels again but try and keep them
small. Go too far and you can make the skin slightly
resemble plastic.
20
Beautiful photos
Right PulseAudio is
a lot more than just
a sound system with
volume control
We reveal a number
of practical applications
that will be useful for
common desktop
activities, including
handling separate
playback streams
108 The Ubuntu Book
01
Discover your
sinks and sources
Left PulseAudio
should automatically
work out the sinks
and sources
02
03
Manage volume
04
load-module module-echo-cancel
You can also specify one of the audio echo
cancellation (AEC) methods right there:
05
$ PULSE_PROP=filter.want=echo-cancel skype
Another concern can be static/crackling sounds. It
was an issue in older PulseAudio versions, but some
people running Skype on 64-bit Linux systems
still find it an issue. Well try two methods now
that address two causes of the problem. The first
changes audio latency:
$ PULSE_LATENCY_MSEC=30 skype
The second one disables glitch-free playback,
which may help for sound cards that do not return
accurate timing information. Add the following line
to /etc/pulse/default.pa:
06
load-module module-zeroconf-publish
load-module module-tunnel-sink-new
server=192.168.0.1
sink_name=Remote channels=2 rate=44100
where 192.168.0.1 is your servers IP address. On
the client side, install the paprefs utility (for Ubuntu
it goes: sudo apt-get install paprefs), launch it and
enable the Make discoverable PulseAudio network
sound device available locally option. Finally, restart
the PulseAudio daemon on both your server and
client (sudo pulseaudio -k && pulseaudio --start).
Now you can choose your remote sound device from
Pavucontrol or other PulseAudio-compatible mixers.
07
Make use
of roles
08
09
$ patricks ls
lists entities, while:
$ patricks ls si 0 pr
The Ubuntu Book 111
Supercharge
Ubuntu
114 Best free software
Enhance your Ubuntu experience
128
142
126
132
Supercharge Ubuntu
Programming Tools
Make apps and solve the mysteries of
the universe with these amazing tools
Top IDEs
Coding is a mainstay of Linux activity and no matter which language youre writing in,
youre going to need an integrated development environment thats stocked with all of
the right tools and features. Youll need plugins, intelligent formatting, debugging tools
and more. Basically, you need these IDEs
IntelliJ Java/Javascript
Eclipse C/C++
A very popular and powerful IDE, Eclipse is perfect for coding in C and
its derivatives on Linux frankly on any other operating system too. As
well as being cross-platform, it has a deep and varied plugin system
that will enable you to customise the way Eclipse works. It also adds extra
languages in case you really like the layout and want to try other tasks too. What
is more, it has powerful debugging and compiling tools as well.
Geany Web
Developing for the web is different to developing normal programs. For
starters, its not as easy to test changes locally. There are also a variety of
ways you might make a website and a selection of different programming
languages. However, many IDEs can help you code in these various web languages,
along with code mark-up and hierarchy interfaces to help navigate easily. Eclipse
is a good bet for this thanks to its plugin nature, but you can also try a light IDE like
Geany that should do it almost as well.
IDLE Python
While this is the standard development environment for Python, its
also very good at it. Our favourite feature is the shell: a working python
environment where you can try out bits of code to work out what does
and does not work, along with running the entire code without the need for
compiling. It hooks in well to any custom modules you might have made for a
project, giving you the arguments for functions within.
Supercharge Ubuntu
Clementine Music
Our favourite music player and manager
is also definitely one of the best around.
Clementine, as well as being able to simply
play music, enables you to easily manage your entire
media library, playlists and even some content
from your online music streaming services. It has
more features than any other music player and it is
the only one we like on Linux that can create smart
playlists for you. And, of course, it plays every type of
music file you can think of.
Audacity
Audio editing
Audio editing may be a bit niche, but
Audacity is certainly one of the best
tools for the job, even beyond FOSS.
With powerful effects, track control and a great
workflow, it is easy and quick to edit or produce
whatever youre working on, whether its music,
podcasts or sound effects. Our tip is to ensure you
know your way around your sound server on your
system for different microphone configurations.
Blender 3D modelling
A long-running and great piece of
software, Blender is your one-stop shop
on Linux for creating 3D models and 3D
animated films. The quality of the Blender-created
shorts over the past few years has been incredible,
demonstrating that you can do just about anything
with it if you try hard enough. The dev community
includes a lot of people that use it professionally,
so its in very good hands and has been made with
3D-modellers in mind.
UFRaw RAW
editors
E-readers
Reading books on your computer can be very
convenient and a good ebook manager makes the
task much more hassle-free and relaxing. Calibre
is definitely the best for the job on Linux, as it is
compatible with every major ereader format, such as
EPUB. You can also use it to organise and read normal
document formats as well. Its optimised to run on
small screens if you want it to, so if you fancy creating
a custom mini Linux e-reader, Calibre is the software
youll need!
This software is
optimised to run on small
screens if you want it to,
so if you fancy creating
a custom mini Linux
e-reader, Calibre is the
software youll need!
Supercharge Ubuntu
Gaming on linux
Not sure its a thing? Think again here are some awesome free games
DOTA 2
Marvel Heroes
The sort-of sequel to a free mod for a game made by a different company, Dota
2 has a weird origin. Once you get past that though, you find an excellent MOBA
that makes it a great alternative to League of Legends. It has been fully embraced
by the eSports community too, with regular high-stakes tournaments and
leagues to play in. If youre not the highly competitive type though, you can still
enjoy it casually.
We swear to you that Marvel Heroes is actually pretty good, despite what your
initial assumptions might be. The game lets you be one of an ever-expanding lineup of Marvel characters and heroes as you repeatedly left-click on bad guys to try
and save the world. It takes its cues from the comic books and the current movies,
so you can use Mark Ruffalos Hulk if you really want to. Dont get too hooked into
its freemium trappings though.
Team Fortress 2
Part first-person shooter, part crazy economical experiment, Team Fortress 2 was
Valves first free-to-play game and they made a ridiculous amount of money from
it and still do make it, thanks to the hats you can find in-game. You dont need
to pay a penny to have a good time though, as it has a variety of classes and game
modes that suit any player and excellent core gameplay mechanics to carry it while
you shoot snipers or robots.
We will spare you the Star Trek references to tell you that Star Trek Online is a great
MMO that lets you fly around in a starship shooting phasers, or beam down to other
planets so you can shoot more phasers. The core game is free these days, but
there are paid expansions for extra content that expands the Star Trek universe
with new stories. Also, you can set your warp speed to two decimal places, which is
completely pointless but also quaintly excellent.
Office software
TeX and LaTeX are programming languages used to create documents think
of it like a very manual word processor. The benefit of this is that you can control
exactly how a document will look and they can be easily written as PDFs. Moreover,
you can customise config files and scripts so that you can do some initial setup and
then rely on your created classes to quickly style up text.
Libreoffice
The successor to OpenOffice has long since established itself as the best Linux office
software around, with just about every feature youd expect from something like
Microsofts pervasive product. Heres a selection of the best applications included in
LibreOffice and what they can do
Calc Spreadsheets
The equivalent of Microsoft Office Excel, Calc has all the advanced
features of Excel without you needing to relearn how to create
different formulas and codes. The workflow is similar and you can edit
the formatting for individual cells. You can even do Pivot Tables for large data
operations. Compatibility with Excel files is okay, but not great.
01
02
03
Impress Presentations
LibreOffices PowerPoint may not be the flagship app of the suite,
but its able to create and replicate the kind of presentation style
youre used to, as well as being able to open and display pre-made
presentations from other software. It has limitations in the way it uses outside
media, relying on the codecs and streamers available to it, and as a result, this
can change as a file is moved between systems.
Math Formulas
Similar to the way TeX and LaTeX enable you to write and draw
mathematical formulas, the Math app allows you to create equations
to input into any of the main three pieces of LibreOffice software. As
Writer has a free PDF converter, you can even use it instead of a LaTeX editor in
a few situations. Its quite a minimal program though, focusing on easily writing
formulas in a graphical manner.
Supercharge Ubuntu
GNOME Planner
Vs
ProjectLibre
The verdict
ProjectLibre is the
much more powerful
tool of the two
softwares were
comparing here,
giving you much
more control over
how you create a
workflow and how to
qualify it. Planner is
still very good, but it
may be more useful
for people doing
personal projects
than those looking for
an office tool.
Gnucash
Vs
Grisbi
The verdict
Heavyweight browsers
Most of you are using one of these but which is really the best?
Vs
Firefox
Chromium
The verdict
Features
9 | 8
Memory efficiency
8 | 6
Extensibility
Pidgin
Facebook and Google recently ended
their support for the XMPP API, which
means that messaging clients such
as Pidgin can no longer officially connect to the
services. A new Google solution is in the works but
theres no word from Facebook yet. However, James
Gebloski provides a work-around plugin for Debian
and Ubuntu that will help you connect the Pidgin
client to your Facebook account.
01
10 | 8
Overall
9 | 8
Firefoxs extensibility
is a massive plus
for the open source
browser and its
better memory-wise
than Chromium. Both
these make it just
that bit better in our
estimations.
Plugin setup
deb http://download.opensuse.
org/repositories/home:/
jgeboski/<version> ./
replacing <version> with one of the following,
depending on your distro: Debian_8.0, Debian_7.0,
02
Repo key
wget http://download.opensuse.org/
repositories/
home:/jgeboski/<version>/Release.key
sudo apt-key add Release.key
sudo rm. Release.key
03
Non-XMPP account
Supercharge Ubuntu
KeePassX
In the interests of security, we recommend using different alphanumeric
passwords for each online account (although having a base, perhaps
phrase-based, password and then creating memorable permutations for
your various accounts is another good move). Keeping track of them all can be a pain,
so for simplicity and security you can use KeePassX. Store all your sensitive data
inside an encrypted database, and keep it inside Dropbox or a secure server. You can
then access that database from other devices and use a single master password to
unlock everything you need from whichever device youre using.
Tails
Thunderbird
Despite concerns in recent months that the project is dead or dying,
Thunderbird is very much alive and kicking. The project didnt see any
major feature introductions for a while, although this is chiefly down
to the development work moving across to the community following the Mozilla
chairs announcement that the company itself would no longer be developing
Thunderbird it has effectively gone the way of SeaMonkey. But it is still one of the
best and the most widely available desktop email clients, and new features such
as the Lightning Calendar add-on and OAuth2 support in Gmail were added as
recently as June.
PGP mail
Camouflage mode
KMail
If you use the KDE desktop, the most powerful, most configurable email
client available is already installed: KMail, which is heavily integrated
with the Kontact application. KMail provides every standard feature
you can think of and then goes on to provide advanced features that blow the
competition out of the water everything you can do with a plugin in Thunderbird
is an option in KMails preferences. It has incredible search and filtering tools, great
conversation threading, robust and in-depth security settings, integration with
other KDE apps like KWallet and external spam checkers like SpamAssassin, and
the entire software is also completely configurable to your own taste.
Tor network
Day-to-day software
Even though its hyper
secure, you dont have to
sacrifice usability. Tails
comes with all the best
software you could need
Dont leave
a trace
When you shut down
after a session of
Tails, the RAM will be
completely erased so
that no one can try any
advanced forensics on it
Tails automatically
connects to
the private Tor
network, and
you can even see
the map of how
youre connected
and reset the
connection if you
want to
Science software
Linux has incredible FOSS for doing proper science and engineering work
Stellarium
SciDAVis
Software for scientific data analysis and visualisation (the name is a
weird acronym), SciDAVis enables you to manually input or import data
from a variety of sources in order to be analysed via the various statistical
methods built into the software, then plot 2D and 3D graphs, matrices and more
that are suitable for publication. Its also cross-platform, so if you need to work on
a variety of different machines, everything will work between them.
Cain
This is a piece of software useful for
performing stochastic and deterministic
simulations of chemical reactions. If that
at all sounds interesting to you, then you may like to
know it can also solve models using Gillespis direct
and first reaction method, Gibson and Brucks next
reaction method, Tau-leaping and a few more. It can
import and export relevant data to make analysis
easier for you, using XML and SBML formats for this.
Planets
If youve ever tried to create an orbital model of a
series of planets, moons and one star (such as in
our own solar system), youll know that coding the
mechanics can be a right pain. Luckily, there are
plenty of programs out there like NASAs GMAT
that can help you model orbits without the need
for doing it yourself. This can be useful for teaching
yourself or others about how celestial bodies move.
Fritzing
A
great
piece
of
software
for
planning
out
or
sharing electronic circuits,
Fritzing lets you create custom
circuit paths not only using
standard components such as
LEDs and resistors, but also
with a selection of different
microcontrollers from across
Arduinos range, as well as the
Raspberry Pi. It also has a neat
trick of turning the planned-out
images into standard electronic
component symbols to make
sharing the exact layout of
the circuit much easier. Even
further, you can use it to design
PCBs to then be printed and
used by yourself or others. Its
really the best tool for anyone
doing electronic design to use
as it makes the whole process
that much easier. If you want
to get into circuit design, it also
has an in-depth example and
tutorial section available to
teach you how to use it.
Supercharge Ubuntu
Visual overview
Free space
File system
indicator
Drive selector
GParted works on a
per-device level. The
combobox at the topright corner of the form
allows you to select
which device you want
to work on a sure-fire
way to detect the correct
candidate is comparing
the size displayed
Partition name
Space consumption
Data table
Tutorial
01
02
Fire up GParted
03
04
Create a partition
05
06
Supercharge Ubuntu
Say goodbye
Connection manager
Connection details
Remminas Basic
tab lets you enter
information about the
server IP, the user name
and the password. The
resolution and color
depth toggles allow you
to set basic properties of
the host display
Keyboard grabber
Sending Ctrl+Alt+Del to
a virtualised host can
be difficult. Press this
button to make Remmina
grab any and all keyboard
input pressing
Ctrl+Alt+Del in this state
sends the gesture to the
remote host
Work area
Rendering quality
Tutorial
01
02
wlan2
Link encap:Ethernet HWaddr
e8:de:27:0f:ea:ba
inet addr:192.168.1.219 Bcast:192.168.1.255
Mask:255.255.255.0
inet6 addr: fe80::eade:27ff:fe0f:eaba/64
Scope:Link
Should you connect two systems frequently, try
to configure your router to assign a static IP to the
host in order to be able to reuse the connection
configuration created in the next step.
03
Create a connection
04
Take control
05
Do your thing!
06
Clean up
Supercharge Ubuntu
Latin only!
Virtual keyboard
Speaking Greek?
Should the need for
Greek numerals and
characters arise, users
of FCITX dont need to
fret. The product comes
with a ready-to-deploy
layout handling all
important characters
Speaking Russian?
Que Bellisima!
Advanced indexing
Supercharge Ubuntu
Upload speed
Torrent search
Download dialog
Click a .torrent
file to open it with
Transmission. This popup allows you to specify
where data is to be
saved and which priority
is to be assigned to the
torrenting stream
Speedbrake
Auto-delete
Cumulated statistics
Advanced filtering
Supercharge Ubuntu
there that cost a lot and do not let you even get a glimpse of what they
are capable of before you actually pay for them. Thankfully, the open
source world comes to your rescue. There are many open source data
visualisation tools available that you can play with to illustrate your
data in the best possible way. Here we will take a look at one such tool
Chart.js. It is easy to use and offers a great deal of control over how
the graphs and charts look and feel when they are plotted. Please note
that while using Chart.js you may have to fiddle with JavaScript code
snippets, but it is very easy to handle and can be mastered by anyone.
Installation
<script src=Chart.js></script>
Note that you need to pass the proper path of the
chart.js file in your file system, while including the
library file.
Instead of manual download, you can also use the
JavaScript package managers like NPM or Bower.
As you may already know, NPM is used commonly to
manage Node.js modules, but it also supports frontend libraries, while Bower is created solely for frontend libraries. The biggest difference is that NPM uses
a nested dependency tree, while Bower requires a flat
dependency tree, putting the burden of dependency
resolution on the user. Coming back to Chart.js, here
is how to grab it using Bower:
02
03
Line charts
}
]
};
var data = {
labels: [January, February, March,
April,
May, June, July],
datasets: [
{
label: My First dataset,
fillColor: rgba(220,220,220,0.2),
strokeColor: rgba(220,220,220,1),
pointColor: rgba(220,220,220,1),
pointStrokeColor: #fff,
pointHighlightFill: #fff,
pointHighlightStroke: rgba(220,220,2
20,1),
data: [65, 59, 80, 81, 56, 55, 40]
},
{
Supercharge Ubuntu
pointStrokeColor: #fff,
pointHighlightFill: #fff,
pointHighlightStroke: rgba(220,220,2
Global configuration
Along with the global prototype methods, the global
configurations are also available for you to set up. This
allows for changing options globally across chart types,
avoiding the need to specify options for each instance,
or the default for a particular chart type. You can find it
in the chart.js file.
04
05,1),
06
05
Radar chart
A radar chart is a way to show data as a twodimensional chart. In these kinds of charts, three
or more variables are represented on axes starting
from the same point. Another quality of these types
of charts is that the relative position and angle of the
axes is typically uninformative. That means you can
use radar charts to plot more data points compared
to bar or line charts.
The process to plot radar charts using Chart.
js is not different; you just need to call the Radar()
method:
var data = {
labels: [Eating, Drinking, Sleeping,
Designing,
Coding, Cycling, Running],
datasets:
[
{
label: My First dataset,
fillColor: rgba(220,220,220,0.2),
strokeColor: rgba(220,220,220,1),
pointColor: rgba(220,220,220,1),
134 The Ubuntu Book
20,1),
Bar chart
07
var data = [
{
value: 300,
color:#F7464A,
highlight: #FF5A5E,
label: Red
},
{
value: 50,
color: #46BFBD,
highlight: #5AD3D1,
label: Green
},
{
value: 100,
color: #FDB45C,
highlight: #FFC870,
label: Yellow
},
{
value: 40,
color: #949FB1,
highlight: #A8B3C5,
label: Grey
},
{
value: 120,
color: #4D5360,
highlight: #616774,
label: Dark Grey
}
];
Each array element has a value, default colour,
highlight colour and the label to be displayed. As with
other charts, you can keep the default options or
change them as you wish.
08
Prototype methods
myLineChart.stop();
Use resize() to manually resize the canvas element.
This is run each time the browser is resized, but you
can also call this method manually if you change the
size of the canvas nodes container element:
myLineChart.resize();
The last method we will discuss is destroy(). This will
clean up any references stored to the chart object
within Chart.js, along with any associated event
listeners attached by Chart.js:
myLineChart.destroy();
There are a few other methods available as well.
In addition to these generic methods, there are
several chart-specific prototype methods. Space
constraints make it difficult to cover all of them
here, but you can look them up in the official Chart.
js documentation.
09
Chart.types.Line.extend({
// Passing a name registers this chart
in the
// Chart namespace in the same way
name: LineAlt,
initialize: function(data){
console.log(My Line chart
extension);
Chart.types.Line.prototype.
initialize.
apply(this, arguments);
}
});
// Creates a line chart in the same way
new Chart(ctx).LineAlt(data);
10
Chart.Type.extend({
name: Scatter,
defaults : {
options: Here,
available: at this.options
},
initialize: function(data){
this.chart.ctx
this.chart.canvas
},
draw:function() {
}
});
The Ubuntu Book 135
Supercharge Ubuntu
Command-line efficiency:
Take the terminal further
Get confident with the terminal and put the command line to use to get
work done on Ubuntu
Command-line efficiency
Left Dont be
daunted by the oldfashioned look of
the terminal
history | tail
We can chain together as many commands as
we wish. Lets sort the commands into alphabetical
order, remove duplicates, and then view them one
page at a time:
Tail to go
The tail command has a useful live switch, -f
(for follow), which, after showing you the last ten
lines of a file, keeps it open to display new lines as
they arrive. This is very handy for monitoring log
files: Ubuntu applications that generate a lot of
information about access and system changes,
such as web servers and databases, place and
update logs under /var/log/.
If youve put up a web server, youll find a lot of
the logs are of malicious attempts to find common
flaws in PHP web apps. Assuming youre not running
a common PHP CMS, like Drupal or WordPress, the
never-ending stream of information can drown out
what you want to find.
For example, a 404 result resource not found,
indicating an image or script (or a whole page)
looked for but not found can be of use to diagnose
problems when youre building your site. Combine
tail-f with grep to filter out the extraneous noise
of live results:
Supercharge Ubuntu
first-of-bin.20160212.txt
A secure copy
SCP uses SSS as a transport layer, to copy files across
networks including the Internet without exposing
the files to anyone looking to intercept their contents.
The scp command has much the same syntax as the
ssh and the cp commands combined. To copy a file from
your home folder to that of your Raspberry Pi, given
the same address as above: scp ~/myfirstgame.py
pi@192.168.0.7:/home/pi/. Youll be prompted for your
password, then the file will be transferred.
Running a command on a folder, and every subfolder
and file inside, is a lot quicker with the command
line. Changing permissions, copying folders, many
commands have a recursive option usually -r. For
scp this also applies, and you could retrieve every file
from your Pi with: scp -r pi@192.168.0.7:/home/pi ~/
mypibackupfolder/.
Wildcard
The other short cut to repeating commands over
multiple files, is wildcard substitutions. * will be
unpacked by the command line as every possible
character here; use it on a part of a name like this:
cp ~/Music/*.mp3 /media/musicplayer/
mc stands for
MidnightCommander;
its a visual file manager
for the command line,
and is a quick way of
performing a number of
file operations
Command-line efficiency
Midnight Commander
Drop-down menus
Supercharge Ubuntu
Your command-line
cookbook: diced and sliced
Some quick recipes for using the command line
to tackle a range of tasks and problems
Over time, youll build up your own listing of terminal
apps and piped-together commands that you go to for
particular tasks. Were rounding off this guide with a few
for you to try that show you the breadth of applications
of the command line in day-to-day use. We hope youll
feel inspired to build on them and research more ways
of getting things done speedily, and accurately, to solve
your problems without having to reach for a mouse.
See step 3 for ways of making searches for commandline tips without even opening Firefox or Chromium.
Were not suggesting avoiding GUI apps, particularly
websites, altogether; if youre simply after information,
however, a command-line web browse is a lot quicker
and has far fewer distractions.
Network troubleshooting is a topic that deserves its
own book in fact there are many of them but have a
01
Disk usage
Command-line efficiency
02
Imagination
05
Disk division
06
ls /usr/bin | wc -l
04
03
Web of commands
Although
JavaScript-heavy
webpages
dont work well with command-line web browsers,
fallback for mobile sites makes even Facebook
relatively useful in the terminal with a browser-like
w3m or links2, and Twitter clients like rainbowstream
are every bit as good as their GUI equivalents.
But its for quick queries of the web that the
command line fits best. Surfraw, written many
moons ago by (a then far less famous) Julian
Assange, queries everything from Amazon through
currency converters, to acronym databases, with a
single command like: sr -t acronym www.
Lastly, while curl is a great tool for downloading
web resources, websites are even being written to
suit it. Try curl -4 http://wttr.in/Liverpool
Network woes
Supercharge Ubuntu
System administration
System administration tasks are some of the most
annoying things that you need to deal with when
you have to maintain your own system. Because
of this, system administrators have constantly
been trying to find ways to automate these types
of tasks to maximise their time. They started with
basic shell scripts, and then moved on to various
scripting languages. For a long time, Perl had been
the language of choice for developing these types of
maintenance tools. However, Python is now growing
in popularity as the language to use. It has reached
the point where most Linux distributions have a
Python interpreter included in order to run system
scripts, so you shouldnt have any excuse for not
writing your own scripts.
Because you will be doing a lot system level work,
you will have most need of a couple of key Python
modules. The first module is os. This module
provides the bulk of the interfaces to interacting
with the underlying system. The usual first step is to
look at the environment your script is running in to
see what information might exist there to help guide
your script. The following code gives you a mapping
object where you can interact with the environment
variables active right now:
SYSTEM ADMINISTRATION:
BASH, PERL, PYTHON
OPERATING SYSTEM
CPU
FILES/IO
import os
os.environ
You can get a list of the available environment
variables with the function os.environs.keys(),
and then access individual variables with
os.environs[key]. These environment variables are
also used when you spawn a subprocess. So you will
want to change values, like the PATH or the current
working directory, in order to run these subprocesses
correctly. While there is a putenv function that edits
these values, it doesnt exist on all systems, so the
cwd = os.getcwd()
You can then get a list of the files in this directory with:
os.listdir(cwd)
You can move around the filesystem with the function
os.chdir(new_path). Once youve found the file you
are interested in, you can open it with os.open() and
open it for reading, writing and/or appending. You can
then read or write to it with the functions os.read()
and os.write(). Once you are all done, you can close
the file with os.close().
import subprocess
subprocess.run([ls, -l])
Supercharge Ubuntu
Web development
With the content and the bulk of the computing hosted
on a server, a web application can better ensure a
consistent experience for the end user. The popular
Django framework provides a complete environment of
plugins and works on the DRY principle (Dont Repeat
Yourself). Because of this, you should be able to build
your web application quickly. Since Django is built on
Python, you should be able to install it with sudo pip
install Django. Depending on what you want to do with
your app, you may need to install a database like MySQL
or PostgreSQL to store your application data. There are
Django utilities available to automatically generate a
starting point for your new projects code:
MODEL
Manipulates
Updates
VIEW
CONTROLLER
Sees
Uses
USER
the files models.py, tests.py and views.py, among
others. The simplest possible view consists of the code:
USER
WEB SERVER
Virtual environments
When you start developing your own applications, you
may begin a descent into dependency hell. Several
Python packages depend on other Python packages.
This is its strength, but also its weakness. Luckily, you
have virtualenv available to help tame this jungle. You
can create new virtual environments for each of your
projects. In this way, you can be sure to capture all of the
dependencies for your own package.
DATABASE
PYTHON
INTERPRETER
Supercharge Ubuntu
Computational science
for elem in b:
c.append(a * elem)
In numpy, this would look like:
a*b
Variable Explorer
The variable explorer pane lets you
access all of the data structures within
the current Python interpreter. You need
to actually run your code for anything to
show up here
Ipython Console
The console window lets you interact
directly with the underlying interpreter
that will be used when you try and run
your code
import
import
result
sin(x),
scipy
scipy.integrate
= scipy.integrate.quad(lambda x:
0, 4.5)
Beyond
Ubuntu
150 Mint 17.3 Rosa Cinnamon
Is this variant better than Ubuntu?
156
154
158
Beyond Ubuntu
STORAGE
9GB disk space
(20GB recommended)
GRAPHICS
Graphics card capable of 800 x 600
(1024 x 768 recommended)
DVD drive or USB port
PROS
A desktop that involves
no learning of new
interfaces, nor concessions
to mobile devices, and
works flawlessly.
CONS
Stability and gradual
improvements are at
the expense of latestand-greatest updates of
software packages, and
proprietary codecs are not
in the Free Software spirit.
SUMMARY
Dedicated to a friendly and familiar interface for traditional desktop users, Linux Mint is
the one to choose if youve felt lost since Windows XP became unsupported but youll find
it a great improvement over XP. Not for compulsive upgraders and free software purists,
but a great experience for new and experienced users alike.
Beyond Ubuntu
Elementary Freya
Not just a Mac clone, but a well-thought-through aesthetic approach to
stable and consistent computing
CPU
1GHz processor
(Intel i3 recommended)
RAM
1 GB RAM
STORAGE
5GB of disk space
(15GB recommended)
URL
elementary.io
were certainly solid throughout our use, and being written in just
C and Vala languages, dont bring in the stack of dependencies
upon which many of its rivals depend so Elementary misses
out on the penalty to performance, stability and resource
footprint that would have entailed.
The streamlined interface is a result of the Elementary
developers commitment to ease of use: everything should be
available without using the command line. We found that to be
the case but some of the GUI choices left us a little puzzled. For
example, Alt grab (holding the left mouse button down while Alt
is pressed to drag a window) does not work, meaning a window
cannot be moved to have its title bar above the top of the screen.
Right-click choices are also removed from much of the desktop.
Elementarys own apps do include a terminal (with
background transparency by default); a text editor called
Scratch; a mail client; a calendar app; and a file manager. These
all bear some resemblance to their GNOME counterparts in
use, certainly nothing unfamiliar, while a desktop email client
Elementary Freya
rather clear idea of what is best for the user experience, and if
thats what you are here for, just go with it. If not, perhaps turn
the page and take a look at some of the alternatives. Limiting
choice does have the benefit of making Elementary extremely
easy to grasp its a good beginners distro, and the combination
of stability and consistent aesthetics, will undoubtedly appeal to
many users.
If youre looking for fuss-free computing (once youve installed
an office suite!) possibly on an old Netbook and dont want
to sacrifice a good-looking desktop in the process, try out
Elementary OS.
PROS
Great for new users and
tired aesthetes who would
like a simple, attractive
desktop, and solid, fussfree computer use.
CONS
Wont appeal to power
users, or those offended
by Mac OS X clones. Having
to bypass a pay link to
download is also a rather
jarring experience.
SUMMARY
Power users are almost certain to look elsewhere, as many things Ubuntu users take for
granted are removed, but its all in a good cause. Elementary OS presents a refreshingly
consistent interface, is relatively light in its use of system resources and great on old
Netbooks and is a stable and reliable platform for day-to-day use.
Beyond Ubuntu
Netrunner 17 Horizon
Netrunners Plasma desktop offers a glimpse of a third way, between
traditional desktops and tablet-focussed GNOME Shells
CPU
64-bit CPU
(16 & LTS run on Intel Atom)
RAM
1GB
STORAGE
10GB HDD
GRAPHICS
Intel GMA 945 Graphics Card /
Video Memory 128MB
URL
netrunner.com
Netrunner 17 Horizon
PROS
It feels very slick (when
it worked), with plenty of
apps, Plasma widgets are
great fun and sometimes
quite useful, too!
CONS
Installation only worked
from DVD; some desktop
flakiness; problems
launching some apps. Also
a few freezes and crashes.
SUMMARY
Despite a bad start with the ISO not working on USB sticks, Netrunner did eventually install
although the problems didnt all stop there. Nevertheless, the Plasma 5 desktop is very
configurable, has loads of useful widgets, and can look great. Give it a try, and if you like
Netrunners potential, look forward with us to the next LTS.
Beyond Ubuntu
LXLE 14.04.3
Faster, stylish, and loaded with software, LXLEs respin on Lubuntu could
be the top choice on older hardware
CPU
Pentium III CPU (P IV recommended)
RAM
512MB RAM
(1024MB recommended)
STORAGE
8.4GB disk space
(20GB recommended)
URL
www.lxle.net
alternatives are installed (UTox, and KDEs Marble for these two
examples). Indeed, during start up, the logo sits above the slogan
Be Free, Be Open.
After a quick boot up, the user finds herself with a
choice to make which other desktop do you want LXLE
to look, and function, like? If youre looking for a replacement
for Windows XP (the default look, though simply labelled
Lubuntu), or a classic GNOME 2 type desktop, youll feel
at home right away. The other choices are: netbook mode
(good for small screens), Unity with the vertical launcher, and
other Ubuntu touches and lastly, the inevitable Mac OS X
look, with dock living on the far left edge. Underneath it all,
of course, is the flexible LXDE desktop environment, with
all of the familiar (though configurable) tools and icons plus one
unusual extra.
The thing that caught our eye straight away was wallpaper,
and plenty of it! LXLE has 100 yes, one hundred pre-installed
wallpapers, all better than average, and on the taskbar is a
LXLE 14.04.3
PROS
Quick, consistent, and
improves on the already
fast and friendly Lubuntu
with even more speed and
yet more friendliness.
CONS
Some very minor
inconsistencies, plus an
awful lot of unwanted
software if youre a
minimalist who knows
what they want.
SUMMARY
We really liked LXLE: its full of thoughtful choices, starting at log-in, when you can match
the desktop to the style of use with which you are most comfortable. The extra packages,
and subtle interface improvements over the stock LXDE of Lubuntu are all positives, and
while the desktop is configurable, the defaults make it good to go straight away.
Beyond Ubuntu
RAM
1GB RAM (2GB recommended)
STORAGE
10GB disk space
(20GB recommended)
GRAPHICS
Modern video graphics
card recommended
PROS
Quick booting, nice
looking; interesting
desktop constructed of
web technologies, a good
package manager and
works on older hardware.
CONS
Deepins last Ubuntu-based
release has some stability
issues, and some odd
choices in the design and
dependency of Deepins
own apps.
SUMMARY
We cant ignore all of the stability issues, nor, we admit, is an OS X rip-off desktop design,
however user friendly, going to please everyone. Such shameless stealing has a long
honourable history in computing though, and Deepin is clearly on an upward trajectory.
Well worth trying this is one to watch, and very friendly to those new to Linux.
tri Spe
al ci
of al
fe
r
Enjoyed
this book?
Try es
3 issjuust
for *
5
* This ofer entitles new UK direct debit subscribers to receive their first 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 31 March 2017.
** This is an US subscription ofer. The USA issue rate is based on an annual subscription price of 65 for 13 issues which is equivalent to $102 at the
time of writing compared with the newsstand price of $16.99 for 13 issues being $220.87. Your subscription will start from the next available issue.
This ofer expires 31 March 2017.
Dedicated to
all things Linux
Written for you
Linux User & Developer is the only
magazine dedicated to advanced users,
developers & IT professionals
About
the
mag
subscribers to
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
Python
Discover this exciting and versatile programming language
with the new edition of The Python Book. Youll find a complete
guide for new programmers, great projects designed to build
your knowledge and tips on how to use Python with the
Raspberry Pi everything you need to master Python.
Also available
The
Ubuntu
Book
Master the
Ubuntu apps
2XUGHQLWLYHOLVWRIWKHRSHQVRXUFH
software you need right now