Table Of ContentFREE DVD WITH 3 LIVE BOOTING DISTROS
www.linuxuser.co.uk
L
IN
U
X
U
S
E
R
&
D
E
V
E
L
O
P
E
R
IS THE ESSENTIAL MAGAZINE
S
U FOR THE GNU GENERATION
E
1
7
3
ULTIMATE BOOT-UP CAMP
SSSYYYSSSAAADDDMMMIIINNN
SSSSSUUUUURRRRRVVVVVIIIIIVVVVVAAAAALLLLL SSSSSKKKKKIIIIILLLLLLLLLLSSSSS
S
Y
S
A
D
M • MMMaaannnaaagggeee fififi llleee sssyyysssttteeemmmsss • CCCCoooonnnnttttrrrroooollll ppppeeeerrrrmmmmiiiissssssssiiiioooonnnnssss •• UUUpppgggrrraaadddeee pppeeerrrfffooorrrmmmaaannnccceee • HHaannddllee aannyy eerrrroorr
IN
S
U DEFEND SYSTEMS BBBBUUUU
R G-SWEEP
V
IV
A
L
S AGAINST HACKERS YYOOUURR CCOODDEE
K
IL
L
S
Scan libraries and dependencies
Identify and shut down SQL injection attacks with SourceClear
PROGRAM IN
BOOST THE TERMINAL
DISC
ERLANG
WITH TMUX MISSING?
ASK YOUR
RETAILER Get started with this functional
Discover the power of this terminal multiplexer programming language
ENCRYPT
NNIIMMBBUUSSOOFFTT
RASPBIAN AAUURROORRAA
w How does this
w
w Set up your Pi with a secure home user UUllttrraabbooookk rruunnnniinngg
.lin UUbbuunnttuu sshhaappee uupp??
u
x
u ALSO INSIDE AUDIO EDITORS
s
er.c • Run scripts automatically PUT TO THE TEST ISSUE I1S73S N 2041-327P0RINTED IN THE U7K 3£5.9>9
o
.u • Make a tilt switch Which open source program is
k
9 772041 327002
• Set up the EnviropHAT best for recording and mixing?
001_LUD173_week4.indd 1 29/11/2016 16:45
Full Page.indd 1 28/11/2016 14:12
Welcome
THE MAGAZINE FOR
THE GNU GENERATION
to issue 173 of Linux User & Developer
Future Publishing Ltd
Richmond House, 33 Richmond Hill
Bournemouth, Dorset, BH2 6EZ
☎ + 44 (0) 1202 586200
Web: www.linuxuser.co.uk This issue
www.greatdigitalmags.com
www.futureplc.com
Editorial
Editor April Madden
april.madden@futurenet.com » Sysadmin survival skills
☎ 01202 586218
Senior Art Editor Stephen Williams » Bug-sweep your code
Designer Rebekka Hearl
Editor in Chief Dave Harfi eld » Program in Erlang
Photographer James Sheppard
Contributors » Ulimate distros and FOSS 2017
Dan Aldred, Joey Bernard, Toni Castillo Girona, Sanne De Boer,
Nate Drake, Gareth Halfacree, Tam Hanna, Oliver Hill, Phil King,
Kushma Kumari, Richard Smedley, Jasmin Snook and
Mihalis Tsoukalos
Advertising Welcome to the latest issue of Linux User & Developer,
Digital or printed media packs are available on request.
Head of Sales Hang Deretz the UK and America’s favourite Linux and open source
☎ 0 1202 586442
hang.deretz@futurenet.com magazine. Ready yourselves for boot-up camp, troops,
Account Manager Luke Biddiscombe
luke.biddiscombe@futurenet.com as we explore the sysadmin survival skills you’ll need in
International the wild. In our feature on p18 this issue you’ll learn the
Linux User & Developer is available for licensing. Contact the
International department to discuss partnership opportunities. essential tools and techniques you need to manage fi le
Head of International Licensing Cathy Blackman
☎ + 44 (0) 1202 586401 systems, users, permissions, optimisation, troubleshooting
cathy.blackman@futurenet.com
and more. Whether you’re a sysadmin right now, you’re looking to
Subscriptions
For all subscription enquiries: become one, or even if you simply want to take complete control
LUD@servicehelpline.co.uk
☎ 0 844 249 0282 of your home network and everything on it, our yomp through the
☎ O verseas +44 (0)1795 418661 Look for
Head owfw swub.ismcarigpitnioenssu bSsh.caor.ounk Todd iosns u1e2 1Ja74n esAslesnot tiahli str iasisnuineg w yeo uta nkeee ad p weiellk g ient oyuoru c fir gyshttainl gb-afil lt .t o reveal the best
CC iirrccuulla☎attioi o0 n1n D20ir2e c5t8o6r 2D0a0rren Pearce WSauntb its scoorinbere? distros and FOSS you should be using in 2017. No matter what kind
Production today! of distro or functionality you’re after, there’s something for you in
P roduc☎tio 0 n1 D20ir2e c5t8o6r 2J0a0ne Hawkins our guide on p56. You’ll fi nd a selection of distros ready to live boot
on the disc that accompanies the magazine (you can get the rest of
Management
Finance & Operations Director Marco Peroni them via the Distro Directory on there too), and you can access all
Creative Director Aaron Asadi
Editorial Director Ross Andrews the FOSS we’ve rounded up through each program’s website or your
Printing & Distribution distro’s repos. You’ll also fi nd guides to bug-sweeping your code,
William Gibbons, 26 Planetary Road, Willenhall, West Midlands,
WV13 3XT programming in Erlang, using tmux, coping with the threat of SQL
Distributed in the UK, Eire & the Rest of the World by
Marketforce, 5 Churchill Place, Canary Wharf, London, E14 5HU injection attacks, and much more.
☎ 0 203 787 9060 www.marketforce.co.uk
Enjoy the issue!
Distributed in Australia by Gordon & Gotch Australia Pty Ltd,
26 Rodborough Road, Frenchs Forest, New South Wales 2086 April Madden, Editor
☎ + 61 2 9972 8800 www.gordongotch.com.au
Disclaimer
The publisher cannot accept responsibility for any unsolicited material lost or
damaged in the post. All text and layout is the copyright of Future Publishing Ltd. Get in touch with the team:
Nothing in this magazine may be reproduced in whole or part without the written
permission of the publisher. All copyrights are recognised and used specifi cally
for the purpose of criticism and review. Although the magazine has endeavoured
to ensure all information is correct at time of print, prices and availability may linuxuser@imagine-publishing.co.uk
change. This magazine is fully independent and not affi liated in any way with the
companies mentioned herein.
If you submit material to Future Publishing via post, email, social network or any
other means, you automatically grant Future Publishing an irrevocable, perpetual, Buy online
royalty-free licence to use the material across its entire portfolio, in print, online Facebook: Twitter:
and digital, and to deliver the material to existing and future clients, including
but not limited to international licensees for reproduction in international, Linux User & Developer @linuxusermag
licensed editions of Future Publishing products. Any material you submit is sent
at your risk and, although every care is taken, neither Future Publishing nor its
employees, agents or subcontractors shall be liable for the loss or damage.
© 2016 Future Publishing Ltd
Visit us online for more news, opinion, tutorials and reviews:
ISSN 2041-3270
www.linuxuser.co.uk
www.linuxuser.co.uk 3
003_LUD173.indd 3 28/11/2016 14:16
Contents
MMIINN
Subscribe SSYYSSAA DD
32& C gUchr aSeesna cc tksua n usoebtuvowstm c ooeruefibfrre!s er ! SURV IVASSL
on page 65 LL LL
KK II
SS Reviews
81 Audio editors
Mixing your own beats has never been
easier with these FOSS tools
18 Sysadmin survival skills
Manage file systems, permissions, users and much more
LMMS Ardour
OpenSource Tutorials
08 News 34 Bash masterclass: Run shell
T he biggest stories from scripts automatically Rosegarden BEAST
the open source world Learn how your operating system can
handle invocations automatically
12 Interview 86 Nimbusoft Aurora
Akshat Agarwal discusses 38 Defend systems against hackers Is this Ubuntu-powered Ultrabook a
the evive toolkit SQL injection vulnerabilities can pose a must-have for Linux road warriors?
threat to servers and applications
16 Kernel column 88 Bodhi Linux 4.0
The latest on the Linux 42 Bug-sweep your code Can this Bodhi and Moksha partnership
kernel with Jon Masters with SourceClear prove to be a winning formula?
Keep your software projects safe by learning
90 Free software
how to fi nd and fi x library vulnerabilities
Richard Smedley recommends some
excellent FOSS packages for you to try
46 Program in Erlang:
Introduction
Learn how to get to grips with the Erlang
programming language
52 Boost the terminal with tmux
Ever feel like a single terminal is too small
for you? tmux is the answer
Features
18 Sysadmin survival skills
Take your career to the next level 67 Practical Raspberry Pi
Learn how to create an encrypted home
56 Ultimate distros and
folder on your Raspberry Pi, work with a tilt
FOSS 2017 96 Free downloads
switch, get to grips with the Enviro pHAT
Find the perfect distro and Find out what we’ve uploaded to our digital add-on board and much more
FOSS for the new year content hub FileSilo for you this month
Join us online for more Linux news, opinion and reviews www.linuxuser.co.uk
4
004_LUD173.indd 4 30/11/2016 12:54
Full Page.indd 1 28/11/2016 14:32
Open Source
On the disc
On your free
DVD this issue
Load DVD
Find out what’s on your free disc
To access software and tutorial
files, simply insert the disc into
Welcome to the Linux User & Developer and Arch Linux to live boot from this disc, your computer and double-click
DVD. This issue, we’re looking ahead to the while our other picks join the Distro Directory. the icon.
next year in Linux, so we’ve selected the best Remember, you can get all of the FOSS in our Live boot
distros and FOSS for 2017. Give some of them feature straight through your distro of choice,
a whirl now – you’ll fi nd Puppy Linux, Maui or from their respective websites. To live-boot into the distros
supplied on this disc, insert the
Featured software: disc into your disc drive and
reboot your computer.
Please note:
• You will need to ensure that
your computer is set up to boot
from disc (press F9 on your
computer’s BIOS screen to
change Boot Options).
• Some computers require
you to press a key to enable
booting from disc – check your
manual or the manufacturer’s
website to fi nd out if this is the
Puppy Linux case on your PC.
• Live-booting distros are read
Arch Linux from the disc: they will not be
Puppy Linux is a special build of Linux meant to
make computing easy and fast, even allowing you to installed permanently on your
do magic by recovering data from destroyed PCs or Arch Linux is a simple, lightweight and fl exible computer unless you choose
by removing malware from Windows. It’s our pick for distribution that tries to keep it simple. It’s also to do so.
the best lightweight distro, as it’s so small and light exceptionally powerful, especially once you’ve taken the
on resources that it can run on virtually any PC – time to confi gure it to your exact requirements. For that For best results:
perfect for giving old hardware a new lease of life! reason, it’s our pick for the best distro for developers.
This disc has been optimised
for modern browsers capable of
rendering recent updates to the
HTML and CSS standards. So
to get the best experience we
recommend you use:
• Internet Explorer 8 or higher
• Firefox 3 or higher
• Safari 4 or higher
• Chrome 5 or higher
Problems with
the disc?
Send us an email at linuxuser@
imagine-publishing.co.uk
Maui Linux Please note however that if you
are having problems using the
The second version of Maui comes with new features, fixes and repositories, based on Ubuntu 16.04 and programs or resources provided,
KDE Plasma. It looks great, but even more importantly it works seamlessly and is packed with media and then please contact the relevant
gaming essentials. That’s why we’ve chosen it as our best distro for entertainment! software companies.
6
006-007_LUD173.indd 6 30/11/2016 12:31
Disclaimer
Important information
Check this before installing or
using the disc
For the purpose of this disclaimer
statement the phrase ‘this disc’
refers to all software and resources
supplied on the disc as well as the
physical disc itself.
You must agree to the following
terms and conditions before using
this ‘this disc’:
Loss of data
In no event will Future Publishing
accept liability or be held
responsible for any damage,
disruption and/or loss to data or
computer systems as a result of
using ‘this disc’. Future Publishing
makes every effort to ensure that
‘this disc’ is delivered to you free
from viruses and spyware. We do
still strongly recommend that you
run a virus checker over ‘this disc’
before use and that you have an up-
to-date backup of your hard drive
before using ‘this disc’.
Hyperlinks:
Future Publishing does not accept
any liability for content that may
appear as a result of visiting
hyperlinks published in ‘this disc’. At
the time of production, all hyperlinks
on ‘this disc’ linked to the desired
destination. Future Publishing
cannot guarantee that at the time of
use these hyperlinks direct to that
same intended content as Future
Publishing has no control over the
content delivered on any of
these hyperlinks.
Software Licensing
Software is licensed under different
terms; please check that you know
which one a program uses before you
install it.
• Shareware: If you continue to use
the program you should register it
with the author
• Freeware: You can use the program
free of charge
• Trials/Demos: These are either
Live boot time-limited or have some
Distros
functions/features disabled
Insert the disc into your computer and Distros can be live booted so that you • Open source/GPL: Free to use,
reboot. You will need to make sure that
can try a new operating system instantly but for more details please visit
your computer is set up to boot from disc
without making permanent changes to https://opensource.org/licenses/
your computer gpl-license
FOSS
Explore Unless otherwise stated you do not
Free and open-source software needs to have permission to duplicate and
be installed via the distros or by using the Alternatively you can insert and run the
distribute ‘this disc’.
disc interface disc to explore the interface and content
wwwwww..lliinnuuxxuusseerr..ccoo..uukk 77
006-007_LUD173.indd 7 28/11/2016 14:21
08 News & Opinion | 12 Interview | 96 FileSilo
HARDWARE
CCCaaannn IIInnnttteeelll rrriiivvvaaalll
ttthhheee RRRaaassspppbbbeeerrrrrryyy PPPiii???
WWWiiittthhh uuunnnrrriiivvvaaalllllleeeddd pppooowwweeerrr,,, wwwiiillllll ttthhheee
nnneeewww wwwaaavvveee ooofff SSSBBBCCCsss wwwiiittthhh AAApppooollllllooo
LLLaaakkkeee ccchhhiiipppssseeetttsss rrreeevvvooollluuutttiiiooonnniiissseee
maker projects? AAAAbbbboooovvvveeee EEaacchh bbooaarrdd iinncclluuddeess aann
eemmbbeeddddeedd mmuullttii--ccoorree pprroocceessssoorr
Intel’s Apollo Lake chips made their debut include the newer Atom chip, while users While Avalue’s high-end ECM-APL does
towards the beginning of 2016, but until now, will also be able to fi nd one Celeron and show a lot of similarities to the APL5, there’s
have largely been neither seen nor heard of. one Pentium offering, depending on tastes also some noticeable differences. While
Promising improved performance for mobile and requirements. both share the same 8GB RAM and dual GbE
machines and 2-in-1 hybrids, the chipset is Due to the later availability of the Atom ports, only the APL offers a mini-PCIe slot to
said to be succeeding the acclaimed Braswell variant of the Apollo Lake range, the board its users. Thanks to the addition of the M.2
family with improvements to their IPC and itself looks starkly different from the rest of B-key expansion interface, it’s also possible
Gen9 graphics. These additions have been its counterparts. Based on specifi cations to support everything from a stable 4G
vital to the fi rst Single Board Computers to alone, Aaeon’s GENE-APL5 is currently the connection to SATA. Its central connection is
appear with Apollo Lake already implemented. high-end offering of all the boards involved in HDMI, which according to offi cial sources, can
Emerging manufacturers Aaeon and Avalue the announcement. It’s equipped with 8GB of also double up as offering DisplayPort. There’s
have both recently unveiled what is largely RAM, a SATA 3.0 port and dual GbE ports with also a total of fi ve USB ports ready to go, but
considered to be the fi rst range of 3.5-inch Wake-on-LAN as well. If size is important, only one of these is a 2.0 interface, something
SBCs using Intel’s new processor range. In a miniature version of the APL5 will also be to bear in mind.
total, there are fi ve boards in the range, each available, equipped with mini-PCIe signals While no offi cial word on pricing has been
taking advantage of different chip sets in the and a uSIM slot for wireless connectivity. announced for either of these high-end
Apollo Lake family. Three of these boards As you’d expect with any SBC, connection boards, or their cheaper counterparts for that
options are plentiful. Dual VGA ports sits at matter, availability is said to be in early 2017.
It’s equipped with 8GB the front of the unit, with a single HDMI port At the time of writing, only Avalue announced
that can be doubled up as a LVDS interface full compatibility with the Linux kernel, and
of RAM, a SATA 3.0 port
also available to the rear. Depending on your Android for that matter. However, due to
and dual GbE ports with power requirements, the APL5 can also be Aaeon’s previous Braswell-based boards
bought with either a fi xed 12V supply, or all containing support for Linux, it’s widely
Wake-on-LAN
9-19V adapter. expected that the trend will continue here.
8
008-011_LUD173.indd 8 25/11/2016 09:55
TOP FIVE
Arch-based
distributions
1 Antergos
Although it started life solely offering the
Cinnamon desktop, Antergos has carved a name
out for itself by being one of the few Arch-based
distros that now offers support for GNOME 3,
Razer-qt and Xfce. Without doubt its premier
feature is that it provides its own graphical
installation program.
ANDROID
2 Chakra
Welcome to a small but While Chakra may not be as well-known as others
listed here, it certainly trumps many in terms of
usability. Automatic hardware detection is a big plus
powerful media centre here, allowing for seamless integration for most
third-part hardware on any desktop.
Remix debuts Nougat-powered console and PC hybrid
The Android-x86-based Remix OS was a app downloads and media files thanks to the
showcase of technical prowess, flaunting the expandable 32GB of internal storage, with 4 USB
powers of the Android platform on personal ports and a single HDMI offering for movie binging.
computers. Due to its success, the team behind Even more impressive is the potential of 4K output,
Remix has taken it a step further, combining the a rarity for a device of this size when compared to 3 Manjaro
elements of the OS with dedicated hardware. other set-top boxes in its field.
Named Remix IO+, the device includes all While both dual-band Wi-Fi and Bluetooth Manjaro is one of the few Arch-based distributions
the capabilities and form factor of a mini set- comes as standard for seamless connection to to offer rolling release updates, but this method
top box, combined with the key elements of a networks and smartphones, a single Ethernet has helped its users receive timely and systematic
upgrades. These improvements have led it to be one
low-end gaming PC. At its core, it runs a slightly port is also on hand for low latency streaming.
of the more popular distros today.
modifi ed version of the Remix OS, but still Both DRM level 1 and level 3 playback also get
offers all the desktop features you’d expect. full support here and HDMI 5.1 pass-through also 4 Apricity OS
There’s a windowed interface, and while it makes an appearance as well for improved local
doesn’t allow much in terms of customisation, media playback. What has made Apricity such a sought after
distribution, is that it enables users to integrate
it does cater for full compatibility with the At the time of writing, the Remix IO+ has already
web apps into their desktop environment by
Google Play Store. When connected to your surpassed its $250,000 Kickstarter goal, with
using the fantastically designed ICE browser and
TV, the IO+ opens up to the full Android TV base units starting at $129 and a staggering 4229 installation program.
experience, with a recognisable mobile backers onboard. It’s already been noted that
interface that can be controlled via remote or Remix will continue to support the IO+ for the next 5 ArchBang
mouse and keyboard. few years with shipping and general availability
Although development may have slowed down on
It boasts a surprisingly powerful Rockchip commencing in May 2017. Its compatibility with
ArchBang, its light weight and suitability for portable
RK3399 A72 dual-core processor, 4GB of non-Google smartphones is unknown as yet, but systems means users are still downloading it today.
RAM and a Mali T864 GPU. In terms of storage it’s likely we’ll see further implementation for other It’s one of the few still around that relies on the
and connectivity, there’s scope for plenty of OSes in the near future. Openbox window manager.
www.linuxuser.co.uk 9
008-011_LUD173.indd 9 30/11/2016 11:39
OpenSource
Your source of Linux news & views
SOftware
Can FOSS
take on
Photoshop?
Krita 3.1 beta throws down
the gauntlet to Adobe
Despite entering its second beta phase only a
few weeks ago, the open-source digital painting
software Krita is about the enter one of the
final stages before its major 3.1 update. For avid
users, the changes will be instantly noticeable.
Many older annoyances have now been patched,
with the constant crashes that some users were
facing now removed altogether. Bug ixes are
also plentiful, including improved tool support
and better image integration, again based off
user feedback.
This third beta release of Krita 3.1 also brings above Lots of animation tools are in the 3.1 update
with it new tools for budding designers. The Mirror axes simultaneously, whereas the greatly missed is too slow to be usable, and we’re still looking for
mode has been enhanced to work with different shear cursor from the Transform tool has also and experimenting with new algorithms. With
been restored. Other changes include a new the current beta you will get a preview of how
Other changes include
splashscreen being introduced, while merging the user interface will work, but keep in mind
a new splashscreen being two layers will now prevent skins also merging. that we know that it’s too slow to be usable and
One possible bad thing to come from the are working on ixing that,” states the oficial
introduced, while merging
release of the beta is the news that the Lazy release announcement.
two layers will now prevent Brush plugin may be removed prior to the inal It’s expected that this third beta phase will be
release. “We will probably remove that feature in supported for a while, so interested parties can
skins also merging
the inal release because the current algorithm ind all download links over at www.krita.org.
DeSKtOP
trinity Desktop adds GCC 6 and CUPS support
Depending on your distribution of choice, releases are intended to promptly bring bug make use of the CUPS 2.2 printing system
some of you will have heard of the trinity ixes to users, while preserving overall stability series as well.
Desktop environment, and some will not. through the avoidance of both new features and Speed improvements have also been made
Known for its design and simplicity, Trinity can major codebase re-factoring,” reads the oficial to increase usability even further, with start-
be found on the likes of SparkyLinux, PCLinuxOS release statement. up times for the core save function and tdehw
and CentOS to name but a few. Its latest While by and large this is irst and foremost D-Bus daemon being the biggest beneiciaries
14.0.4 release comes after over six months a bug ix and security update, largely in the here. Kopete has now also been drafted in as
of development. wake of the Dirty COW exploit, there are still the new instant messaging protocol, while the
“R14.0.4 is the fourth maintenance release many new features in abundance. There support for TQt Python scripts should prove to
of the R14.0 series, and is built on and improves is also support for the highly useful GCC 6 be a major factor for budding developers.
the previous R14.0.3 version. Maintenance compiler series, while users can now also Support for the Trinity Desktop Environment
has been growing and these changes should
Known for its design and simplicity, Trinity can be found see adoption rates grow even faster. You can
head across to www.trinitydesktop.org for all
on the likes of SparkyLinux, PCLinuxOS and CentOS
download links and installation requirements.
10
008-011_LUD173.indd 10 25/11/2016 09:57