Linux Mint 19.1
Scripting | Python & C++ (ad!
Coding for
Linux
Master Linux and expand your programming skills
” &sPacked with dtLearn Python 3 &Starttolearn 4 Discover the world
toptipsand andapplyittoreal — thebasics aie EI
aot world programs (iG with LinuxDiscover more of our complete
manuals on Readly today...
BS
Mee
Uthys)eM|
Manual
The Complete
Building Your
The Complete __
Android
Manual
Photograph
Rael Y
The Complete
untu
Manual
7
san
Mae
WhatsApp
Manual
The Complete
Google
Manual
>
ary _
Ere ea
ancy icy INE
_, The Complete
Linux Mint
Manual
The Complete
WordPress
ww. Manua
=
TED
VeTalelel"#t Black Dog i-Tech Series
Coding for
Linux
“That's what makes Linux so good: you put in
something and that effort multiplies. It’s a positive
Feedback cycle.”
Linus Torvalds (developer of the Linux kernel)
Linux is everywhere. It powers the Internet as the main operating system
behind the Web's servers, it powers spacecraft, it's the operating system
for the Fastest supercomputers in the world and it’s used in smart TVs and
mobile devices. Why? Becauseit's ultra stable, lightning fast and completely
free of charge.
However, there's more to Linux than simply being a free to use operating
system. Its unique configuration allows the user to customise and
Personalise the OS into any form they wish. A Linux user can change
their OS look and Feel From one day to the next, install thousands of freely
available apps and programs and take back control of their computer.
Linuxis about freedom. Freedom from the walled-garden approach of other
restrictive operating systems, freedom to choose what you want on your
computer, freedom to alter it and use it how you please. It’s a worldwide
community of like-minded users, all striving to get the best development
from this incredible OS.
With this book, you too can become a part of the open community of Linux
users. The tutorials within these pages will help you get to grips with Linux,
show you how it works, what you can do with it and how you can code with
it to take your Linux experience to even greater heights.
Discover Linux. Discover freedom.
www.bdmpublications.com
O @bdmpubs Gi BDM PublicationsContents
Coding For Linux
8 Why Linux?
10 The Best Linux Distributions
12 Equipment You Will Need
14 Desktop Environments
16 Which Distro?
18) Getting Started with Linux
20 Creating a Linux installer on Windows
22. Installing Linux on a PC
24 Installing a Virtual Environment
26 Installing Linux in a Virtual Environment
Recut d aus Q
30 Introduction to the Cinnamon Menu
32 _ Navigating the Cinnamon Desktop
34 10 Things to do After Installing Linux Mint
36 _DidyouKnow...Apollo 11
38 Creating Users
40 _Customising the Desktop
42 _ Becoming Anonymous Online
EE) 0 see seunest
46 Basics of the Terminal
48 Update Mint via the Terminal
50 Install Apps via the Terminal ~Part 1
52 Install Apps via the Terminal —Part 2
54 Did you Know...Linux Kernel 0.01
56 Creating a File Using the Terminal
58 Creating and Removing Directories
60 Fun Things to do in the Terminal
62 _ More Fun Things to do in the Terminal
64 LinuxTips and Tricks
66 Did you Know...Linux and the Big Bang
68 Creating Bash Scripts- Part 1
70 Creating Bash Scripts—Part 2
72 Creating Bash Scripts — Part 3
74 Creating Bash Scripts Part 4
76 Creating Bash Scripts—Part 5
7B _ PixLinux= The Perfect Combination
80 Command Line Quick Reference
82 AZof Linux Commands
84 Did you Know...Good enough for NASA
CONT
88 WhyPython?
90 How to Set Up Python in Linux
92 Starting Python for the First Time
94 — Your First Code
96 Saving and Executing Your Code
98 Executing Code from the Terminal
100 Did you Know...Space Invaders102 Numbers and Expressions
104 Using Comments
106 Working with Variables
108 User Input
110 Creating Functions
112 Conditions and Loops
114 Python Modules
116 Didyou Know...Debugging
120 WhyC+4?
wn bdmpublcatonscom
122 _ Your First C++ Program
124 Structure of a C++ Program
126 Compile and Execute
128 Did you Know...Virus!
130 Using Comments
132 Variables
134 Data Types
136 Strings
138 C++ Maths
140 User Interaction
142 Did you Know...The Hobbit
144 Common Coding Mistakes
Coding or LinuxLY index
“How did you knowso much
about computers
Kelemen aa lol a
~ Admiral Grace Hopper (pioneer programmer)
CU ca Ld el ee
lack Tech Seres-Volume 38worm bdmpubleations.com
Say Hello to Linux “vy
Why Linux? What is it? Where do | get it?
Why are there so many different versions
of it? Most beginners ask these, and many
more, questions when starting out. It's
true that Linux is an incredibly versatile
and powerful operating system but
where do you start? Thankfully, you can
Find the answers in this section.
‘There is so much you can do with Linux
but you need to know where to start;
we're here to help you out. In this section
you can learn what Linux is, what a distro
is and what a desktop environment is.
You can also begin to explore how Linux
works and how it can work For you.
8 WhyLinux?
10 The Best Linux Distributions
12 Equipment You Will Need
14 Desktop Environments
Which Distro?
Coding or Linuxvy Say Hello to Linux
Why Linux?
FREE AND OPEN
Linuxis a Fantastic fit For those who want something different. The efficiency of the system, the availability of applications and
stability are ust a few good reasons.
‘The first thing you need to know is that there sno such operating
system called Linux. Linux isin Fact the operating system kernel, the
ore component of an OS. When talking about Linux what we, and
‘thers are reFerring to are one of the many distributions, or distros,
that use the Linux kemel, No doubt you've heard of atleast one o
the current popular distros: Ubuntu, Linux Mint, Fedora, openSUSE,
Debian, Raspbian, the ist goes on. Each one of these distros offer
something alittle different for the use. While each has the Linux
keanel at its core, they provide the user with a different looking
desktop environment, different preloaded applications different
\ways in which to update the system and get more apps installed
anda sightly different look and Feel throughout the entre system.
However, atthe centre lies Linux, which is why we say Linux
Linuxis a great operating system on which to start coding.
BlackDop Mech Seres- Volume 38
Linux works considerably differently to Windows or macOS. I's Free
Fora stat: Free to download, free to install on as many computers
asyou lke, Free to use for an unlimited amount oftime and free to
upgrade and extend with, equally, Free programs and applications.
his ree to use element's one ofthe biggest draws For the
developer. While a Windows license can cost up to €100, and a Mac
considerably more, a user, be they a developer, gamer or someone
‘who wants to put an older computer to use, can quickly download a
distro and get to work in a matter of minutes.
Alongside the free to use aspect comes a level of freedom to
customise and mould the system to your own uses. Each ofthe
available distros available on the Internet have a certain spin!There are thousands of free packages available
for programmers under Linux.
in that some offer increased security, Fancy looking desktop,
‘8 gaming speci spn, or something directed toward students
This extensibility makes Linux a more desirable platform to use,
‘as you can quickly mould the system into a development base,
including many different kinds of IDES for the likes of Python, web
development, C++, Java and so on; or create a base for online
‘anonymity, perhaps asa Minecraft server, media centre and
‘Another remarkable advantage for those looking to learn how
to.code, is that Linux comes with mast ofthe popular coding
environments builtin, Both Python and C+ are preinstalled in a
high percentage of Linux distros availabe, which means you can
start to pragram almost as soon as you install the system and boot it
up For the First time,
Generally speaking, Linux doesn't take up as many system resources
‘as Windows or macOS; by system resources we mean memory, hard
drive space and CPU load. The Linux code has been streamlined
{ands Fee from third-party ‘bloatware’ which hogs those systems.
resources. A more efficient system of course means more avalable
resources for the coding and testing environment and the programs
you eventually create. Less use of resources also means you can
Use Linux on older hardware that would normally struggle or even
( Why Linux? om
Roe A
cation == Mandriva slackware
it yp
cotos @ @ &
Each distro offers something unique to the user
butall have Linuxat the core.
refuse to run the latest versions of Windows or macOS;so rather than
throwing away an old computer, it can be reused with a Linux distro,
It’s not all about C++, Python or any ofthe other mere popular
programming languages though, Using the commandline of
Linux, also called the Terminal, you're able to create Shell scripts,
‘which are programs that ae designed to run from the command
line and made up of scripting languages. They are used mainly to
‘automate tasks or offer the user some form of input and output for
‘certain operation,
Finally, although there are many more advantages we can lst, there
are thousands and thousands of free programs and apps avalable
that cover nearly every aspect of computing, Known as packages,
there are (atthe time of writing) over 8,700 specific programming
applications ust on Linux Mint alone and an incredible 62,000+
overall packages catering For everything from Amateur Radio to
WWW tools
Linux then, isa great resource and environment For programming
in. t's perfecty suited For developers ands continually improving
‘and evolving. If you're serious about getting into coding, or you just
‘want to try something new, give Linux a try and see how it works.
For you.
‘A Linux programming environment can be as simple or as complexas you need itto be.
wn bdmpublcatonscommy Say Hello to Linux
The Best Linux
Distributions
MUN tk Tm (ole Xoo Nel aU alle) om cael ae e lola fo nm =e)
Ciel eee) kee ee Melee eel eee ACM RCA VLR ole)
can get them.
GOING LINUX
‘The installation process for most distributions is similar. You download a disk image from the website and burn it to an optical disk or
‘create a USB Flash Drive installer. Just be careful to get the right distribution For your hardware and read the instructions carefull.
Tae
By Far the most popular Linux astro (distribution) i Linux Mine.
Mint began life back in 2006, as an alternative tothe then most
popular distro, Ubuntu. Although based on Ubuntu’s Long Term
Support build, Linux Mint took a different direction and offered
the usera better overall experience.
Linux Mint has three main desktop versions avaliable with
teach new version ofthe core OSit releases. This may sound
confusing at first buti’s quite simple. Currently, Linux Mint
uses the Cinnamon Desktop Environment as its Flagship model,
there's MATE and xfce models available too.
Cinnamon sa graphically rch desktop environment, MATE uses
less fancy graphics, and is more stable ona wider variety of
desktop systems, and XFce san extremely streamlined desktop
environment that’s built for speed and ultimate stability
“Throughout thistite well be using the Cinnamon version;
however, you can try out any ofthe other desktop environments
asyouwish. In fact, t's recommended that you do spend some
time trying different environments, and even different distros,
toee which suits you and your computer best
‘wwwilinuxmint.com
TNT
The second most popular distro avaliable is Ubuntu, which
Isan ancient African word meaning ‘humanity to others
Ubuntu’s popularity has fluctuated overits Fourteen year ie
‘Lone time, itwas easy the most used Linux-based operating
systemin the world but some wrong choices along the way
with regards toits presentation, and some unfavourable,
controversial elements involving privacy, sadly sawit topple
from the number one spot
Thatsaid, Ubuntu has since made amends and isslowing
crawling its way back up the Linux leader board. The latest
versions of the OS use the GNOME 3 desktop environment, an
impressive environment, although itcan be litle confusing
For Former Windows users and isalittle heavy on systern
resources, especialy you'r planning on installing it on an
‘older computer.
Ubuntu, forallits Faults is good Linux distro to start
‘experimenting wth. Is a clean interface, easy to use and install
{and offers the user a complete Linux experience.
www.ubuntu.comArch is one of longest running Linux
distributions and Forms the basis oF
‘many other versions of Linux. Why install
Mint or Ubuntu when you can install
‘Arch? Many users do exactly that but i's
notideal for beginners. Ubuntu and Mint
both offer an easier installation path and
come with software packages to help
you get started
‘Arch ontthe other hand, is amore
tare bones’ affair. Arch is committed to free software and
its repositories contain over 50,000 apps to install, including
multiple different Desktop environments, and use as you would
with any other distro
Rig 145g a kel
No doubt you've heard ofthe Raspberry Pi. shard not to have,
2asthis remarkable, tiny computer has taken the technology
world by storm forthe lasts years since it was intr
‘There are several aspects to the Raspberry i that make t
such asought after piece of the computing world. For one.
it's cheap, costing around £25 for what s essentially a fully
working computer. e's small, measuring not much bigger than
a credit card You can build electronics wth t, using a Fully
programmat ace; and it comes with Raspbian, its own
sustom-made, Debian based operating system that includes a
offce suite alongside mary different programming languages
‘and educational resources.
Raspblan is exclusive to the Pi hardware, since the Raspberry
Piuses an ARM processor to power it. However, the Raspberry
i Foundation has since released a PC version of Raspbian:
Raspberry Pi Desktop.
Just lke the Pi version, Raspberry Pi Desktop comes withthe
allthe coding, educational and ather apps you will ever nee
Its quick, stable and works superbly. Fyou'e interested in
stretching your Linux experience, then ths is certainly one of
the top distros to consi
www.raspberrypiorg/downloads/raspberry-pi-desktop
worm bdmpubleations.com
meansyour Arch ditro wor't come with athe unnecessary files and
appsthat others have preinstalled ts custom made For you by you
The Best Linux Distributions om
Archisa distro for when yo
experienced with Linux. Yo
‘nothing but the command line and From
there you have to manually partition your
hard drive, set where the installation
files go, create a user, set the OS locale
and finally installa desktop environment
along with the apps you want,
The advantage though forall this hard
work isa distro that you have created. This
"Most Linux distributions Fall into two camps. There are ones
with the latest Features and technology like Ubuntu a
‘Mint and those with few new features but rack solid reliability,
lke Debian.
“Meanwhile, openSUSE attempts to cover both bases.
(OpenSUSE Leap is the rock solid system. It's developed openiy
bya community along with SUSE employees, wha develop
an enterprise-level operating system, SUSE; this powers the
London Stock Exchange amongst other things. Itis designed
For mision critical environments where there is no scope
Forinstablty’. you Find al that too sensible, openSUSE
Tumbleweed sa rolling release with all the latest Features, and
‘openSUSE isa highly respected Linux distribution and many
of ts core contributors work on the Linux Kernel, LibreOffice,
Gnome and other key Linux areas. n short, openSUSE is where
youllfind the proshanging out.
wwwopenSUSE.orgme Say Hello to Linux
Equipment You
Will Need
BO ene Mieunedomteccs iM ure T acer ery
Up oracale WAC eR Cone Reel em ea eer Oe ToL RMT ar) Men Kel acem
However, it’s worth checking you have everything in place before proceeding.
MINTY INGREDIENTS
Before we start working our way through this book, here's what you need to install and run Linux Mint. You have several
choices available, so take your time and see which works best for you.
SiMe Mey sy eeuel |
‘The minimum system requirements for Linux Mint are ‘You can install Linux Mint onto your computer via USB or OVD.
asfollows: We look into each ate later on but i you're already Familiar
with the processor thinking oF USS and just gathering the
7 hardware you need, then you're going to
Ca) need a minimum 4G8 USB fash drive
RAM/Memory—512MB, tostorethe Linux Mint SO.
Hard Drive space ~ 9GB (20GB recommended)
Display - 1024 x 768 resolution
‘Obviously the better the system you have, the better the.
‘experience willbe and quicker too
DVD INSTALLATION
WD installation of
Linux Mint simply
requires blank
DYDR disc. OF
course, you also
need an optical
dive (a DVD Writer
drive) before youre
able to transfer or
burn the SO image
tothedisc,
FED 2teck 009 tech Sries- Volume 38( Equipment You Will Need vy
M3 PNWeN MLN Ls
Installation toa virtual environment i a Favourite method of testing and using Linux distros. Linux Mint works exceedingly well
‘when used ina virtual environment but more on that later. There are many different virtual environment apps availabe; however
VirtualBox, From Oracle, is one ofthe easiest to into, You can Find the latest version at wwwvirtualbox.org
Saves
o7 VirtualBox
INTERNET CONNECTION
It. goes without saying really, that an internet connection is vital for
‘making sure that Linux Mint is up to date with the latest updates and
patches, as well as the installation of Further software. Although you
donttneed an internet connection to use Linux Mint, youl miss out on
‘world of free software available forthe distro.
Xe
Although Linux Mint can be installed
‘onto a Mac, there's @ school oF
thought that recommends Mac
owners use a virtual environment,
such as Vrtualbox or Parallels;
and why not, macOS's already a
splendid operating system. If you're
wanting to breathe new lif into an
colder Mac, make sure i's an intel
CPU madel and not the Power PC
models. Beware though, it's nat as
pain free as installing on to aPC.
Poor Coni rts
wn bdmpublcatonscom Coding or Linuxwv Say Hello to Linux
Desktop Environments
WHICH MINT?
‘A Desktop Environment is the graphical interface which you use to interact with the core Linux system. Just as the graphical
desktop For Windows 10 is also called Fluent Design.
Linux Mint offers the user a choice of versions of the isto:
Cinnamon, MATE and Xfce, While that may sound alittle confusing
or the newcomer, essentially each ofthe versions available contains
re Linux structure and kernel, the kernel isthe core of
he operating system, that handles ll the instructions between the
software and hardware
fh versionis simply a different desktop environment, the
Graphical User Interface (GUI) that you use to interact with the
‘operating system. Each ofthe desktop environments uses diferent
apps ta accessor use the system, suchas the file manager to browse
he operating system's file structure or the way it launches other
‘apps. Again though, the core available productivity, video and
a
—
ae
Follow that by clicking on the System section,
then the Processor tab. Depending on your CPU,
allocate as many cores as you can without detsimentto your host
system; we've opted For two CPUs. Now click on the Display section,
slide the Video Memory up to the maximum anc
‘Acceleration’. Click OK to commit the new settings
k’Enable 30
Click on the Start button and use the explorer
ca
button a folder with a green arrow) inthe ‘Select
Startup Disk’ window to locate the downleaded 1SO of Mint; then
ickStartto boot the VM with the Linux Mint Live Environment. You
1h now install Linux as per the standard PC installation requirements.
=Gettingto » |
nae LINUX“Anyone can build a Fast
processor. The trick is to
build a fast system.”
~ Seymour Cray (Electrical Engineer, and
designer/founder of Cray Supercomputers)
#
worm bdmpubleations.com
Getting to Know Linux @&Y
We've used Linux Mint asa guideline
here, as it’s an easy to use distro and
perfect for former Windows users.
It’s also one of the most developed
and well documented Linux distros.
as well as having some fantastic
configuration options.
In this section, we introduce the Linux
Mint Cinnamon Menu and Desktop
Environment, how it works and what
you can do to customise it. Want to
create another user or even discover
how to become anonymous online?
Then read on.
Introduction to the Cinnamon Menu
Navigating the Cinnamon Desktop
10 Things to do After Installing Linux Mint
Did You Know...Apallo 11
Creating Users
Customising the Desktop
Becoming Anonymous Online
Coding ortinuxwy Getting to Know Linux
Introduction to the
Cinnamon Menu
CINNAMON VIRTUALBOX FIX
You've already looked at some list functions, using insert, .remove, and .pop but there are also functions that can be applied
to strings.
FETED fore we beoin, we're assuming youre having this REINEMEM artera moment or two you're automaticaly
issue within Vitualbox. The Software Rendering dropped into a commandline view, called the
message appears in the top right of the desktop. To Fix thi, click erminalin Linux. This details the installation of the new VirwalBox
‘on Devices in the Virtualbox window, Followed by Insert Guest drivers, eemoving any old drives it has detected, and installing the
Additions CD image. latest versions. won't take Long and when its done you will be
asked to hit Return to exitthe Terminal
PEPE D The Cucst Additions CD contains drivers For FEI D The virtualbox Additions CD iconis on the desktop,
Virtualbox, including the virtual video hardware so right-click itand then scroll down the menu to
\when its loaded in, you get a ‘software needs running’ notification Eject. You can now restart Linux Mint by clicking the Menu, the
box with two options, Cancel and Run. Click the Run button and bottom icon inthe stripto the left, then the Restart button. This
enter your Linuxuser password. boots Mint and the problems fixed.
box 64s 602 °
automatically stated, Would you ike to run
Black Dog ech Series-Velume38CINNAMON ON THE MENU
Introduction to the Cinnamon Menu om
Now the Software Rending issue for Virtalbox users is out of the way, let's take a look at the Mint Menu and how it all works.
Remember, this s just For Mint Cinnamon, other distros look and behave differently.
PEPER F'scoFF you may have already noticed the Welcome
Screen that pops up when you login to Linux Mint
se through the options, read the First Steps
Take a moment to brow
‘option and so on, When you're done, click the Xin the top
comer of
e window to close it
You've already used the Mint Menu to reboot
the system and when you first used the Live
ronment. Thistime, click the Menu button and haver ove
the Office entry in the middle column. This changes the icons
represented inthe right-hand column detaling what apps are
installed under that section
ESTER L2unching any ofthe apps from the Menuis as
simple as finding one and clicking it. For example,
under the Office section, click on LibreOffice Writer, Writer isthe
preinstalled word pracessor for Linux Mint. It opens and saves as
Microsoft Word and functions in almost the same way.
wn bdmpublcatonscom
FTI D open up the Menu again but this time hover
the mouse pointer over Graphics, then click on
CGN Image Manipulation Program. GIMP isa powerful imag
nanipulation app that’s probably as effective as Adobe's Photoshop
but requires alittle more workto getthe results you want. It's
certainly worth taking the time to master, though,
IF you're looking for a particular Function or app,
such as setting up a printer, click on the Search box
‘at the top of the Menu box. Start typing the app or function you.
‘want, such as printers, and the Mint Menu displays the relevant
options below. This works with most modem Linux menus,
regardless ofthe distro.
FPP tiover over any ofthe apps listed onthe righthand
calumn and right-click, to be presented with als of
options: Ad to Panel, Add to Desktop, Add to Favourites and Uninstall
Most of these options are abviousin their use. Ad
though places the app inthe left-hand, quick-access_
my Getting to Know Linux
Navigating the
Cinnamon Desktop
Each desktop environment behaves differently to that of the next. Some DEs offer
widgets that can be customised and placed on the desktop, others instead opt for a
clean, sharp look to keep everything running as fast as possible. Let's see what the
Cinnamon desktop has to offer.
A TOUCH OF SPICE
‘The Cinnamon desktop environment isa great blend of style and performance. There's lots to like about it, which is why it’s
such a popular DE.
PEPPER) eccin exploring the Cinnamon desktop by double. SPPED Nemohas many different Features, views and
clicking the Computer icon. This brings up Nemo, ways so that you can view and manipulate files and
the ile manager used in Cinnamon. The Computer icon opens up Folders. For example, if you have any images n the Pictures Folder,
the root level ile system, with access and views to the optical rive you can select the icon zoom level forthe images by using the sider
(Fyou have one installed), hard drive and core Linux fle system, located in the bottom right af Nema, labelled Adjust Zoom Level
WHEE Gowe
SERRE EE
ZEEEBSERaE
PEPER) The Linux ile system can appear confusing to EEPP DD ust ike any good file manager, you right-click
a former Windows user, so until you're alittle any of the Fle or Folders within you get a wealth of
‘more knowledgeable on how it all works, we'd recommend you __optons.n the case of Cinnamon, the defaults alow you to play or
concentrate on the Home con on the desktop instead. Inhereis _viewa file depending on what type of fileitis and copy, cut, delete,
‘everything relating to your user account: where youstore Pictures, compress, rename, send via email and view its properties.
Videos, Musi, Documents, Downloaded items etc
ck op eh SteleAte bottom ofthe destop there's the Panel
SNAPE ‘We've already looked at one section of the Panel,
the Menu. If you right-click anywhere on the Panel, other than on 2
Panel app, you see a menu allowing you to edit, add and set up the
Panelin a different way
“ Navigating the Cinnamon Desktop om
FEPD From that desktop right-lick, context menu, select
Customise, allowed by the Desktop Settings lnk at
the bottom of the newly opened window. This opens new window
where you're able to edit which desktop icons are present. you're
using a setup with multiple monitors attached, you can also choose
which monitor displays which icons.
ESTEE) For example, ifyou click the option Modify Panel
you can remove, move, remove the Panel, add 2
new one and clear it of any Applets that are currently present. An
‘Applet, by the way, san app that’s designed to work and it into the
Cinnamon Panel
IF you rightclick anywhere on the Cinnamon
desktop you see a set of aptions that allows youto
Further add to, editor view the desktop content differently. t's very
similar to that of Windows, which s why Mint is @ good choice For
ex'Windows users.
=
B creme NewDociment
Ds
Bi change Deny nackround
+ creme anewlauchertere
0
wn bdmpublcatonscom
Clickon the Menu and type system settings and
‘open the resulting icon. This takes you to the
System Settings options. From here you'e able to control and edt
the way Linux Mint Cinnamon looks and works as well add new
users, manage the firewall and enable accessibilty options
eas a
Bas Ss S
@ Gacgss 8
PEPER | short Linux mint cinnamon can be configured
tolook quite extraordinary. There are many
examples avalable of how good it can get and what can be
achieved. You can go as complex or as sim
rent component and animations or ust
easy toread,
ss you want, adding
-epingit plain ayD Getting to Know Linux )
10 Things to do After
Installing Linux Mint
Linux Mint is a polished distro out of the box but, as with most Linux distros, there are
some tweaks that can be applied to improve the way it works. Although these are Mint-
specific tweaks, most can be applied to other distros.
LINUX TWEAKS
‘Some of these post-installation actions are highly recommended, while others are just handy additions and simply tweak the
system or add a customisation.
The first, and most important, postnstallation Click the OK button and you can see acouple of
actions to update the system. lickon the shield ‘Updates ready for installation. Before you update
icon in the Panel, found at the bottom right of the desktop next to though, click on the blue bar OK button to switch toa Lacal Mirror.
the time and date. This launches the Update Manager. ‘This opens the Software Sources option. nthe Mirrors section, click
‘on the Main and Base drop-down menus and select aserver closest
toyour current location,
PEPER Linux Mint offers the usera three level policy Bea ick the Update the Cache button and close the
approach to updates: Don't Break My Computer, Software Sources window. Back n the Undate
Optimise Stability and Security and Always Update Everything Manager, click on the Install Updates icon and enter your password,
The recommended options the Optimise Stability and Security, __The updates automatically apply themselves and relaunch Update
which only updates safe, essential patches that won't impact critical Manager, this time with a lot more updates, Again, click Install
elements ofthe core OS, Read through the descriptions but choose Updates, OK any messages and wait for ther to Finish
the middle, and recommended option.10 Things to do After Installing Linux Mint “
SE the und: graded by level, 1 being alow BSTTSEDD when asked to accept the changes, enter ¥and also
level update, level 5 being a dangerous one. Stick wen asked to configure ibdvd, Make sure OK is
tollevel 3 updates, is our advice; and lace for any messages highlighted and press Ente, then Yes to any Further questions. Next
-egarding overwriting a configuration file, With regards to the up, stilin the Terminal, enter: cat. /proc/sys/vm/sappiness;
Software Rendering issue and lack oF drivers For non-VirtualBox _the result should be 60. F your computer has less than 4GB of RAM/
Users, click the Menu and type ‘diver int the search box. memory, then enter: gksudo xed /etc/sysctl..conf.
Click the Driver Manager app that appears asa ‘This tweak helps speed up systems with ess than
result ofthe search and enter your password, Mint 4G8 RAM/memory. Scroll down to the bottom of
akes amo vallable and presents youwith the fileyou just opened and add the Following new lines:
a selection of potential drivers based on your detected hardware.
Those with graphical problems, such as Software Rendering, should
‘optto use the lates, recommended Graphics drives
ent to analyse what's
# Decrease snap usage to a more reasonable Level
‘vm. swappiness=10
Click File > Save, then File > Quit. Reboot Linux Mint and you should
= notice a slight hike in performance
EEPTEM) 2: this point you'l probably need to restart Linux PBIB Security i always a concernin this modern digital
‘Mint, sa do that now. Aftera reboot click the Menu age. While Linux Mint isa secure system, t's
n again, Followed by the Terminal. The Terminal icon s Found in advisable to always try and improve't Click the Menu button and
he left-hand column, above the Files icon. With the Terminal open, search for Firewall click the Firewall Configuration icon and enter
enter: sudo apt-get install Libdvd=pkg, press Enter and your password. In the Firewall window, click the Status slider to On.
ype in your password, This enables encrypted DVD playback
worm bdmpubleations.com Coding or LinuxApollo 11
[DID You KNOW... AAR
Dee tans aca)
Pesca halo!
Beare st ae oe eters
Preece Meus
re era Lee elie)
Tne aks
Pere ieute che eens
Saas ene ca
een ee uae)
ee ree us
ere Ae eee ECS
to view on GitHub. Uploaded by a
researcher in 2003, you can view the code
Rn Rae a Sa
Apollo-11/.Look out for code snippets,
tenes Mune ac gS
Sa Seu Nak le) Meo
Peed :
humour
Seawhatelsel
inthers
S
Pee eeOne giant leap for
\ mankind, and coding.my Getting to Know Linux )
Creating Users
When you first install Linux Mint it is configured For use with a single user. While
Slee Melee aan eMC eM Reo eRe ROR ole]
Dre feet eR MATTOON eM en ate) Le
NEW USERS
‘on are separate, as with multiple users on other opers
different users means each user has access to his or hers own areas on the system. Documents, pictures, videos and so
systems,
BETTE click on the LinuxMmint Menuand type ‘users to
begin searching For the relevant console. From the
search results, choose Users and Groups and enter your password,
The Users and Groups console i quite basic looking, and thankfully
‘easy to use. At First, you can just see your own username From when,
you installed Linux Mint
To add anew user, click the Add button atthe
bottom of the console. There are two types of
ser you can create, Standard and Administrator. Unies the new
ser has need to install new apps or access parts ofthe file system
beyond their Home folder, then opt for the Standard account type,
(Otherwise, use the Administrator account type.
BlackDop Mech Seres- Volume 38
PEED Enter the new user's FullName, followed by the
Username they need when logging into Linux Mint
Make sure the username'sallin lower case, a and 0-9 characters
‘only. You can have full stops, underscores or hyphens iF you wish
Click the Add button when you're ready to continue.
FST The new user appearsin the list of current Linux
Mint users in alphabetical order. At present, there's
no password set so click the user inthe lst of current users, then