Linux
For BeginnersPhotoshop
elms ed
ET AU
WETS Photography
For Beginners
For Beginners
—=
C++ & Python
For Beginners
Cloud Python
Computing
ele sl}
For Beginners
Photography
For Beginners
Google
For Beginners
iPad Landscape
iPhone
For Beginners old {ce} NT
For BeginnersLinux
For Beginners
eee An eee Redo
Pee Rem aol a Colt od
Wee Ela R od ee NE CRU Lee) UN ae g
Cea ane eA ade}
manual decreases or in some cases it simply disappears. At
Mace Ra Re RM Ett
ua ee Ua em UU od
PEC Ee Aas Rd eee rae WA Re ecg
ol caemm Wala eM Ce UEul=-Wn ase kas oR aT cae ed
EW ee Nn REE ee
ea ACen Uebel Bete a Eo
eV TmUlet recs e kel mt eRe ere a cae Le
Eigen eaten ee eM Rue ella
Coat eA RDU eC AUR) ec M ace nya) e-l Ea y
marae aU taN OAL Ud scan yea elec yc nN
Fiala ym Ramet meee le Maa MUP LUT eRe im core ale) 42
MCR eee CUA OME Menor Teac sald
EUnet kt
Oa ee Le eae NAOMI CUR CUE Uae aay
STM ele) lea ol RenaeC) |
De
Cel
eg
ete
Coie
Erenen
Oa ly
uy @ Using the Terminal a
8 WhyLinux? 46 Basics of the Terminal
10. The Best Linux Distributions 48 Update Mint via the Terminal
12 Equipment You will Need 50 Install Apps via the Terminal - Part 1
14 Desktop Environments 52 _Install Apps via the Terminal - Part 2
16 Which Distro? 54 Did you Know...Linux Kernel 0.01
56 Creating a File Using the Terminal
60 — Fun Things to do in the Terminal.
62 — More Fun Things to do in the Terminal
66 Did you Know...Linux and the Big Bang
68 — Creating Bash Scripts~ Part 1
5 5 5 70 Creating Bash Scripts—Part 2
PEO OL mein R
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
Creating Bash Scripts ~Part 3
74 Creating Bash Scripts —Part 4
76 Creating Bash Scripts Part §
78 PixLinux= The Perfect Combination
30 Introduction to the Cinnamon Menu
32 _ Navigating the Cinnamon Desktop
34 10 Things to do After Installing Linux Mint
Sone 80 Command Line Quick Reference
82 AZo Linux Commands
38 Creating Users
40 Customising the Desktop
42 Becoming Anonymous Online
84 Did you Know...Good enough for NASA
EE) siresesionon“\, these pages will help y
get to grips with Linux, sho
you howit works, wl
can do itandh
can code with it to
www.bdmpublications.com
esSay Hello to Linux
Ke TR Geena)
about computers?”
aT Weill aol oo
7 ~ Admiral Grace Hopper (pioneer programmer)
- 7 De aera eeSay Hello
to Linux
Why Linux? What is it? Where do | get it? Why
Pera ise ala ie ued cavers
beginners ask these, and many more, questions
when starting out. It’s true that Linux is an
Tiree te WAVE CEL p ei ee) curler)
Rua keh lt em UG] Ano]
can Find the answers in this section.
BUEN enrol eRe Raed Lela Cole)
DSR Ud R aot se)
DUR Tela ules cell b Cote Lg
Linux is, what a distro is and what a desktop
environment is. You can also begin to explore
WAR L AUS LAO ath acm Colt
wonabdmpublcatonscom 74) Say Hello to Linux )
Why Linux?
For many of its users, Linux means freedom. Freedom from the walled garden
Erykah Mellel CMe le EL Te Rs Man LOSE Ro
and Freedom from any Form of licensing or payment. There’s a lot more to Linux than
ue aepet is
FREE AND OPEN
Linux is a Fantastic fit For those who want something different. The efficiency of the system, the availablity of applications and
stability are just a few good reasons.
‘The first thing you need to know is that there sno such operating
system called Linux. Linux in Fact the operating system kernel, the
core component of an OS. When talking about Linux what we, and
‘others are refering to are one of the many distributions, or distros,
that use the Linux kemel. No doubt you've heard of atleast one of
the current popular distros: Ubuntu, Linux Mint, Fedora, openSUSE,
Debian, Raspbian, the list goes on. Each one of these distros offer
something alittle different for the user. While each has the Linux
kemel atits core, they provide the user witha different ooking
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 i why we say Linux
Linuxis a great operating system on which to start coding.
pox %
=
Linux works considerably differently to Windows or macOS. I's Free
Fora stat: Free to download, Free to install on as many computers
asyoulke, Free to use for an unlimited amount oftime and free to
upgrade and extend with, equally, Free programs and applications.
This Fee to.use element is one ofthe biggest draws for the
‘developer, While a Windows license can cost upto £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 evel of freedom to
customise and mould the system to your own uses. Each ofthe
‘avaliable distros avaliable on the Internet have a certain ‘spin,‘There are thousands of free packages available
for programmers under Linux.
in that some offer increased security, a Fancy looking desktop,
‘8 gaming speci spn, or something directed toward students
This extensibility makes Linuxa more desirable platform to use,
‘as you can quickly mould the system into a development base,
including many different kinds of IDES forthe likes of Python, web
development, C++, Java and so on; or create a base for online
anonymity, perhaps asa Minecraft server, media centre and
‘much more,
‘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 2
high percentage of Linux distros available, 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
{andis ree from third-party ‘bloatware’ which hogs those systems.
resources. A more efficient system of course means more available
resources For the coding and testing environment and the programs
you eventually create. Les use of resources also means you can
Use Linux on older hardware that would normally struggle or even
( Why Linux? ry
oe
Ql Mandriva stackrsre
Each distro offers something unique to the user
butall have Linuxatthe 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 more popular
programming languages though, Using the command line of
Linux, also called the Terminal, you're ableto 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 avaliable
that cover nearly every aspect of computing, Known as packages,
there are (atthe time of writing) over 8,700 specific programming
applications just 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. It’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.4) Say Hello to Linux.)
The Best Linux
Distributions
MU tk 1am Cole Ko Eon Nel Mla Ue a=) le) carelOa MDI e olla fo nm =tCen CE)
different ethos and approach. Here are five great distributions to try and where you
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 distro (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 user a better overall experience,
NU)
Linux Mint has three main desktop versions avaliable with
each new version ofthe core OSit releases. This may sound
confusing at first butit’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
‘The second most popular distro available is Ubuntu, which
isan ancient African word meaning ‘humanity to others
Ubuntu’s popularity has fluctuated overits fourteen year ie
ALone time, itwas easly the most used Linux-based operating
systemin the world but some wrong choices along the way
with regards toits presentation, and some unfavourable,
controversial elementsinvolving privacy, sadly sawit topple
from the number ane spot.
“Throughout this tite well be using the Cinnamon version;
however, you can try out any ofthe other desktop environments
asyouwish. In fact, it's recommended that you do spend some
time trying different environments, and even different distros,
to.ee which suits you and your computer best
‘That sal, Ubuntu has since made amends and isslowing
crawting 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 isa litle heavy on systern
resources, especialy if you're planning on installing ton an
‘older computer.
‘wwwilinuxmint.com
Ubuntu, forallits Faults, isa good Linux distro to start
‘experimenting wth, I a clean interface, easy to use and install
and offers the user a complete Linux experience.
www.ubuntucom
eeThe Best Linux Distributions om
Arch is one of longest running Linux ‘Arch sa distro For when you're more
distributions and Forms the basis of experienced with Linux. You star with
many other versions of Linux. Why install nothing but the command line and From
Mint or Ubuntu when you can install there you have to manually partition your
‘Arch? Many users do exactly that but it’s hard drive, set where the installation
£ notideal for beginners. Ubuntu and Mint files g0, create a user, set the OS locale
both offer an easier installation path and and finally installa desktop environment
come with software packages to help along with the apps you want.
you get started
‘The advantage though, forall thishard
‘Arch on the other hand, is amore work ia distro that you have created. This
‘bare bones’ affair. Arch is committed to Free software and means your Arch distro wor't come with athe unnecessary files and
its repositories contain over 50,000 apps to instal, including _apps that others have preinstalled custom made for you, by you,
multiple different Desktop environments, and use as you would
with any other distro,
Rig 4s. a keg
No doubtyou'e heard ofthe Raspbeny®.shadnottotine, |
See cee
ord yom forthe last saya since os tecuced
“There are several aspects ta the Raspberry Pi that make it
such asought after piece of the computing world, For ane
it's cheap, costing around £25 for what s essentially a Fully
working computer. t's small, measuring not much bigger than
creditcard, You can buld electronics witht, using a fully
programmable interface; and it comes with Raspbian, its own
‘custom-made, Debian-based operating system that includes an
office suite alongside many different programming languages
‘and educational resources.
Raspbian is exclusive to the Pi hardware, since the Raspberry
Pi uses an ARM processor to power it. However, the Raspberry
i Foundation has since released a PC version of Raspbian:
Raspberry Pi Desktop.
‘Most Linux distributions fall into two camps. There are ones
with the latest features and technology lke Ubuntu and
‘Mint and those with few new features but rack solid reliability,
lke Debian.
ust lke the Pi version, Raspberry Pi Desktop comes withthe
allthe coding, educational and other apps you will ever need.
Ie quick, stable and works superbly. Fyou'e interested in
stretching your Linux experience, then ths s certainly one of
the top distros to consider.
“Meanwhile, penSUSE attempts to cover bath bases.
(OpenSUSE Leap i the rock solid system. It's developed openiy
bya community along with SUSE employees, who develop
an enterprise evel operating system, SUSE; this powers the
London Stock Exchange amongst other things. Itis designed
For mission critical environments where there is no scope
Forinstabilty’. you Find al that too sensible, openSUSE
Tumbleweed sa rolling release with all the latest Features, and
the occasional crash
‘www.raspberrypiorg/downloads/raspberry-pi-desktop
‘openSUSE is 2 highly respected Linux distribution and many
of ts core contributors work on the Linux Kernel, LibreOfice,
Gnome and other key Linux areas. n short, openSUSE is where
{youll find the pros hanging out
wwrwopenSUSE.org
een~
4) Say Hello to Linux )
Equipment You
Will Need
The system requirements for successfully installing Linux Mint on to a PC are
evr ature la OAR UE Ree ln) Uc im eat] e OI O lee RW Mar) VAR eel cco
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.
SIMU Ieee)
‘The minimum system requirements for Linux Mint are ‘You can install Linux Mint onto your computer via USB or DVD.
asfollows: We look into each alittle later on but i you're already Familiar
“with the process, or thinking of USB and just gathering the
2 hardware you need, then you're going to
OE) 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
=e
63.8
eee
DVD INSTALLATION
WD installation of
Linux Mint simply
requires blank
DVDR disc. OF
course, you aso
need an optical
drive (a DVD Writer
E deive) before you're
able to transfer or
burn the SO image
tothedisc
7Equipment You Will Need ry
hy
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 available; however
VirtualBox, From Oracle, is one ofthe easiest to into, You can Find the latest version at wwwvirtualbox.org
Parse
0 VirtualBox
Ie. goes without saying really, that an internet connection is vital for
making sure that Linux Mint is up to date withthe 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.
Cerny
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 life 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.ry 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 10s also called Fluent Design.
Linux Mint offers the user a choice of versions of the distro:
Cinnamon, MATE and Xfce, While that may sound alittle confusing
for the newcomer, essentially each of the versions available contains
the same core Linux structure and kernel, the kernelis the core oF
the operating system, that handles all the instructions between the
software and hardware
h versionis simply a diferent desktop environment, th
Graphical User Interface (GUI that you use to interact with the
‘operating system. Each ofthe desktop environments uses diferent
‘apps to access or use the system, suchas the file manager to browse
the operating system's file structure or the way it launches other
‘apps. Again though, the core available productivity, video and
a" aN Network Interfaces
EB screens ron ss:nnintian
Sromedyarton tenon
voonsa2 = pew
FETTER The default installation location of VirtualBox ESTEE You'll probably be asked by windows to accepta
should satisy most users but if youhave any special security notification. Click Yes for this and you may
location requirements click on the ‘Browse’ button and change the encounter a dialogue box asking you to trust the installation from
Install folder. Then, make sur that allthe iconsin the VirtualBox Oracle; again, clickyes and accept the installation ofthe VirtualBox
feature tree are selected, ie. none of themhavearedX next to __ application. When i's complete, click finish to start VirtualBox.
them. Click Next to move on,
(Bh Ore vietion 602 Sap x
(crac aoc Seip x
costom Stop Oracle VM VirtualBox 6.0.2
Sect he ay yuan ete bee installation is complete.
(suet onte trator 02ers
WraBox Boe) ate ences Son yor
ap] restoryten 235.) Rbteanres secede
FSTEEEAD Thissection can beleft alone to the defaults, should ESSE With VirtualBox up and running you can now
‘you wish. Itsimply makes ie alittle easier when install the VirtualBox Extension Pack. Locate the
dealing with VMs, especially when dealing with downloaded VMs, downloaded add-on and double-ick. There may be a short pause
\which you may encounter in the Future. Again clicking Next moves while VirtualBox analyses the pack butyou eventually receives
you onto the next stage message to instal it; obviously cick Install to begin the process, scroll
down the next screen to accept the agreement and cick Agree.
[Once Vion 602 Sete x
custom Setup & VirtualBox - Question 7 x |
‘The Oracle VM Virtualbox Extension Packhas been
| ) sucessful dowricaded fom bibs:
‘em nm fom tu eomre bd: | Seg ss Seen 202 econ
ounuetneveme ‘2 saved bcaly 2s G\Users\david iralbox
\Oracle_Vit_Virtuallox_ Extension Pack-6.0.2.vbox-
oestessartatn edie extpack,
‘orate s ttn be ick a Do you wish to instal is extension pack?
Drege ocr4) Getting Started with Linux)
Installing Linux ina
Virtual Environment
Pe eM om En nm ae ae kerr Ate
MACE enuianca unin se en mnicinlecoenteaien ils
currently installed operating system, which is why a VM is a great choice.
CREATING THE VM.
‘There are plenty of options to choose from when creating a VM. For now though, let's set up a VM adequate to run Mint
Cinnamon and perform well.
FETED With VirwalBox open, cick on the New con in the
top right ofthe app. This opens the new VM wizard,
e222 ered
Seen Ey
=
FESR nc vrnoisnona pein
the Type and Ubuntu (64-bit) as the Version; if not then use the
drop-down boxes to select the carrect settings (remember Mint
‘mainstream i based on Ubuntu]. Click Next when you're ready
BETESEWD The next section defines the amount of system
‘memory, or RAM, the VM has allocated. Remember
this amountis taken from the available memory installed on your
‘computer, so don't give the VM too much. For example, we have
{8GB of memory installed and we're giving 2G8 to the VM. When
you're ready, click Next to continve.
pers.
as
This section is where you stat to create the virtual
hard isk that the VM uses to install Minton to.
‘The default option, ‘Create a virtual hard disk now, isthe one we're
using. Click Create to move on.
oes.Installing Linux in a Virtual Environment.
Thepopwpnicow etepeassterciing | TRARY ste ing etetheltalseip he
Susp Create is asking you what type of virtual hard disk S18 is complete; you should now be looking at the
you wantto crete We're gongtousethedefauk VD (Vituelbox newly crested Vist te Vituloox apples Before you
Dekimage ths case, asthe othersare ten vedto moves begin though ck the Settings button and within the ceneral
from one VM aplationto the next Make sureVOl selected and section cick the Advanced ta, Using the pul-down mens, choose
clk wet ‘idrectonl for bath shared Cipboad and brag Or0p
am
a—
o—
ba
o—
2
ae
FETED) The question of whether to opt For Dynamically ESTEE DD Follow that by clicking on the System section,
cor Fixed sized virtual hard disks may come across then the Processor tab. Depending on your CPU,
{as being somewhat confusing to the newcomer. A Dynamically allocate as many cores as you can without detsimentto your host
Allocated virtual hard diskis amore flexible storage management _system:; we've opted For two CPUs. Now click onthe Display section,
‘option and wont take up much space within your physical hard disk side the Video Memory up to the maximum and tick Enable 3D
to begin with. Ensure Dynamically Allocated s selected and clckNext. Acceleration’. Click OK to commit the new settings.
PEPTEDD The vieeual hard dskis asingle older, up tothesize RIM cick on the Star button and use the explorer
{you state in this section. Ensure the location of the button a folder with a green arrow) inthe ‘Select
Virtual hard disk, on your camputer, has enough free space available. Starcup Disk window to locate the downloaded ISO of Mint; then
For example, we've used a bigger storage option on ourD:\ drive, click Start to boot the VM with the Linux Mint Live Environment. You
named Linux Mint and allocated 25.50GB of space tothe virtual can now install Linuxas per the standard PC installation requirements.
hard disk
®“Anyone can build a Fast
processon The trick is to
PUR seen 1
~ Seymour Cray (Electrical Engineer, and
designer/founder of Cray Supercomputers)
1)
ED) serowiatorscom - |Getting to
Know Linux
ACA PRT Tae eel
tee ee eerie cle
ett ae eee eek Lo
most developed and well documented Linux
Cee REST ROME hiae
Ceo ite tla) 1s
Mensa RO ecee Ce Rene Ae
Cinnamon Menu and Desktop Environment,
WA aL SEU ULES (lt kelks (hse)
CT Te ea aco rele
Cre ee mea eel EU
Crane kod
coe ee)wv 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
Before we begin we'e assuring youre having ths
SUP i issue within Virtualbox. The Software Rendering
message appeasinthe top right ofthe desktop. Tf ths cick
‘on Devices in the Vrtualbox window, Followed by Insert Guest
Additions CD Image.
PEPE DD) The Guest Additions CD contains divers For
Virtualbox, including the virtual video hardware.
en t's loaded in, you get a software needs running’ natifcation
box with two options, Cancel and Run. Click the Run button and
enter your Linuxuser password.
automatically stated, Would you ike to run 2
Aer 8 moment ort youre automaticaly
SUaPS dropped into a command line view, called the
jerminalin Linux. Ts deta the staan ofthe new VitualBox
divers remoungany old verses detected and insalng the
latest versions, won take long anduhen ks dane you willbe
asked toh ture ext the Terminal
PEP D The Vireualbox Additions CD iconis on the desktop,
soright-ickit and then scrall down the menu to
Eject. You can now restart Linux Mint by clicking the Menu, the
bottom ican in the strip to the lft, then the Restart button. This
reboots Mint and the problem s Fixed.CINNAMON ON THE MENU
Introduction to the Cinnamon Menu
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.
PEPE Fi'scoFF you may have already noticed the Welcome
Screen that pops up when you login to Linux Mint
Take a moment to browse through the options, read the First Steps
‘option and so on. When you're done, click the Xin the top right
comer of the window to close it
FETIP DD open up the Menu again but this time hover
the mouse pointer over Graphics, then click on
CGN Image Manipulation Program. GIMP isa powerful image
manipulation app that’s probably as effective as Adobe's Photoshop
but requires little more workto getthe results you want. t's
Certainly worth taking the time to master, though,
BEER Youve already used the Mint Menu to reboot
the system and when you first used the Live
ronment. Thistime, click the Menu button and haver over
the Office entry in the middle column. Tis changes the icons
represented in the right-hand column, detaling what apps are
installed under that section,
Launching any ofthe apps from the Menus as.
simple as finding one and clicking it. For example,
under the Office section, click on LibreOffice Writer, Writer isthe
preinstalled word processor For Linux Mint. t opens and saves as,
Microsoft Word and functions in almost the same way.
FETED you're looking fora particular Function or app,
such as setting up a printer, click on the Search box
‘atthe 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 mast madecn Linux menus,
regardless ofthe distro.
FETS over over any ofthe apps listed on the righthand
column and right-click, to be presented with alist of
options: Ad to Panel, Add to Desktop, Add to Favourites and Uninstall
Most of these options are obviousin their use. Add to Favourites
though places the app inthe left-hand, quickaccess column,
ommD Getting to Know Linux
Navigating the
Cinnamon Desktop
feragKel 09. ne) Rake aK CeCe R Mela ca Ma eer aD) kee
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.
PEPER) e2cinexoioring the Cinnamon desktop by double- RIE nemohas many different Features, views and
clicking the Computer icon. This brings up Nemo, waysso that you can view and manipulate files and
the file manager used in Cinnamon. The Computer icon opens up Folders. For example, if you have any images in the Pictures Folder,
the root level ile system, with access and views to the optical drive you can select the icon zoom level for the images by using the slider
(iF you have one installed}, hard drive and core Linux file system. located in the bottom right of Nemo, labelled Adjust Zoom Level
WEHE COS
RRB R EEE
ZREEBSERBaE
BRR Awe
Eater The Linux ile system can appear confusing to Be ust lke any good file manager, iFyou rightclick
a former Windows user, so until you're alittle any of the Fle or Folders within you get a wealth of
‘more knowiedgeable on how it ll works, we'd recommend you __options.n the case of Cinnamon, the defaults allow 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, Music, Documents, Downloaded items etcAte bottom ofthe destop there's the Panel
Suz ‘We've already looked at one section of the Panel,
the Me. Fyouritecikonhee onthe Panel oter than on
Panel app yu see 8 menu allowing ou ted add and setup the
Panelino erent ay
Eee For example, if you cick 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 isan app that’s designed to work and Fit into the
‘Cinnamon Panel
IF you rightclick anywhere on the Cinnamon
desktop you see a set of options that allows you to
further add to, editor view the desktop content differently. It's very
similar to that of Windows, which s why Mint is a good choice For
exwindows users.
=
E> Asatte
ge Desleop Background
Navigating the Cinnamon Desktop @FY¥
that desktop right context me select
S18 Customise, followed by the Desktop Settings link at
the bottom ofthe ney opened wncow-Ths opens ane window
where youre ableto edt which desktop cans are preset. Fyoue
Using setup wth matile motors tached you con ao cose
which reir dls chon
FETIP lick onthe Menu and type system settings and
‘open the resulting icon. This takes you to the
‘system Settings options. From here you're able to control and edit
the way Linux Mint Cinnamon looks and works as welladd new
users, manage the firewall and enable accessibilty options
aea
B8seeaacsa
a ogsae
Ssaaee
aees oo |
PEPER | short Linux mint cinnamon can be configured
tolaok quite extraordinary. There are many
examples available of how good it can get and what can be
‘achieved. You can go as complex or as simple as you want, adding
rent component and animations or ust keepingit plain and
easy toread,EEE) cetrsicvcontinn
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 a couple of
actions to update the system. Clickon the shield ‘Updates ready for installation. Before you update
‘conn the Panel, found at the bottom right of the desktop next to though, click on the blue bar OK button to switch toa Local 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. Backin the Update
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 or ther to Finish
the middle, and recommended option.
ccd10 Things to do After Installing Linux Mint vv
The upd graded by level, 1 being alow
level update, level 5 being a dangerous one. Stick
lace for any messages
tolevel 3 updates, is our advice; and:
-egarding overwriting a configuration file, With regards to the
Software Rendering issue and lack of drivers for non-VirtualBox
users, click the Menu and type ‘driver into the search box.
PEPE cick the oriver manager app that appears asa
result ofthe search and enter your password, Mint
takes a moment to analyse what's available and presents you with
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
Eee ’2this point you'l probably need to restart Linux
Mint, sa do that now. Aftera reboot click the Menu
button again, followed by the Terminal. The Terminal con is Foundin
the lethand column, above the Files icon, With the Terminal open,
enter: sudo apt-get install Libdvd-pkg, press Enter and
type in your password. This enables encrypted DVD playback
Beer When asked to accept the changes, enter Y and also,
when asked to configure ibdvd, Make sure OK is
highlighted and press Enter, then Yes to any Further questions. Next
up, stilin the Terminal, enter: cat. /proc/sys/vm/snappiness;
the result should be 60. IFyour computer has less than 4GB of RAM/
memory, then enter: gksudo xed /etc/sysctl..conf.
BSTISED This tweak helps speed up systems with less than
4G8 RAM/memory. Scroll down to the bottom of
the file you just opened and add the Following new lines:
# 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
BED Security is always a concern in this modern digital,
age. While Linux Mintisa secure system, it's
‘advisable to always try and improve it. lick the Menu button and
search for Firewall click the Firewall Configuration icon and enter
your password, In the Firewall window, click the Status slider to On.Na
AVAXHOME?nee cd
providing you various content:
LC eC a
Ee ee
eS mea eas ces
Unlimited satisfaction one low price
Cheap constant access to piping hot media
Protect your downloadings from Big brother
Safer, than torrent-trackers
18 years of seamless operation and our users' satisfaction
PRE Uys
ETC emer
ol Tei
AvaxHome - Your End Place
We have everything for all of your needs. Just open https://avxlive.icuPt
Ee tans aca)
mankind first stepped on the moon. The
Beene oe eters
ode NO Cee eu eis
ee ee Lee etc)
Te cee Ens
Demme eee kee
Se eae)
ene aan)
Be uaa
ere Ae eee CC
eae eaNer gn MU tes)
ee RPE RC ean ten
ER Ree On Re ene nV
Apollo-11/. Look out for code snippets,
erate Mune ac nea
925 with the comment “Goodbye, Come
Pee
Have a look through, and see what else
Netecara
Programmers
arent without
fence a humour,
Seewhatelsel
inthere
Ee
ww bmpublcations com) One giant leap For
\ mankind, and coding.my Getting to Know mux)
Creating Users
When you first install Linux Mint it is configured For use with a single user. While
Slee Rc m-lecele naan eM MM eo RRO R Olt]
tel coRe gree cRs ere) MU eA Man alm aR aT Rane) (ee
NEW USERS
on are separate, as with multiple users on other opers
FETTER click on the LinuxMmint Menu and type ‘users to
begin searching or 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 at the
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
publications com
different users means each user has access to his or hers own areas on the system. Documents, pictures, videos and so
systems.
BETEDD Enter the new user's Full Name, followed bythe
Username tey need when logging into Linux Mint.
Make sure the username i alin lower case, a- and 0-9 characters
‘only. You can have full stops, underscores or hyphens iF you wish
‘lick the Add button when you're ready to continue.
Cee] o
‘The new user appears in 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
lick the No Password Set option under the user's username.
Mapa
niYou can now enter a password forthe new user
SUPE or click the curled arrow at the end of the New
Password text boxto generate a password for you, as well as
displaying it. Naturally it's a good idea to come up with as strong a
password as possible. when you're done, click the Change button,
se e
You can cose the Users nd Groups console window
EPS now, as the new user has been created. IF you click
{he Mine Menu, flowed by Logout, you ae presented uth the
Mine Login Manager The new user snow present inte st of
currently avaiabe users, Clk ontimyher to log them,
COMMAND LINE ACCOUNTS
PRISED) once logaed in the new useris required to set up
their own desktop wallpaper, icons, Panel, Menu
‘and so on, Depending on what Account Type you set up For them,
‘Standard or Administrator, they won't be able to install any new
‘app5. This screenshots From a Standard user account type,
You can create as many new accounts as you
‘when required It's best to have just one account that's capable of
installing new software, that way you can keep track of what's on
your system.
Session
Log out ofthis system now?
ce
Switch User
Just as you'd expect, you can also create a new user within the command Line. Open up a Terminal session under the main
tev cuireereuetents
PIR the process for adding 3 new user fromthe
Course aera sos
rae Pip y,
the new user's login name, You're then asked to create n
engi rte name eae
Mitt ee hee eet
PEPER vou can check the details and account type for
the new user from within the Users and Grou
Cease
GG goY
Piicgsudo deluser int pemie ies
Peet Mair ern ons
Cen)
Creating Users omwv Getting to Know Linux
Customising the Desktop
YOUR DESKTOP
Linuxis probably one of the customisable operating systems there is. With usta few tweaks, one or two extras installed and
some imagination, you can create something incredible,
STEERED The Fist aspect of desktop customisation sto
change the wallpaper. Rightclick the desktop and
choose Change Desktop Background, This opens the Backgrounds
‘pp in Linux Mint; emember, other distros may present their
background, wallpaper selection tools differently.
is different because it reads the image content from the Pictures
folder in your Home area
Youjust needa cick the aaiabeimages, rom any
SNP) of the locations provided to have them install as the
Update Mint via
the Terminal
Up to now you've been using the shield icon to launch Mint Update Manager in order
to update the system and upgrade the currently installed apps, tools and other
elements. However, you can also accomplish a complete system update and upgrade
From the Terminal.
USING APT-GET
‘To update and upgrade via the Terminal you use the APT (Advanced Packaging Too!) command. It's a powerful command and
combines different elements depending on its use.
FSTEEEDD S2tbyopening anew Terminal orifyou already ESTEEM) Apt get is used to update and upgrade the
have one opened clear its contents wth the clear software in Mint, as well as Ubuntu and other
‘command. This tarts you off witha clean slate on which to work. _Debiarvbased distros. Using the Update element retrieves
new package lists and updates the list of source files. Uparade
downloads and performs an upgrade tothe latest versions of those
files. To start the entire Upgrade and Update process, enter: sudo
‘apt-get update, followed by your password.
ESTEE [ster apt-get intothe Terminal This brings upa EES Notice now the addition ofthe sudo command. The
list of the most used apt-get commands, along with sudo command once meant Super User Do; these
‘brief description of what the command does. I's worth having a sit'smore acceptable as Substitute User Do. It means that the
lookat, even fit doesn't make a huge amount of sense at this time. administrative user (Super User) uses APT (Advanced Packaging
‘Tool to Get any Updates. Now try this: sudo apt-get. upgrade,
48) wwmbdmpubleationscomDepending on the state of your undates,iFyou
have any waiting to be installed, you might be
‘askedif you want to apply the results ofthe sudo apt-get
upgrade command. You can press to accept and continue What's
happening here isthat apt-get has some updated software to apply
‘to Mint, and you're okaying the action,
Therese tbe along ist of whats
BiG gibberish now Filling your Terminal window
batt wor. he es neces fe the upgrodehove ben
ouncodd prepared unpaid proces taled ands >
Cored Thee'olocaoia on en youetfrman oud, en
smthhe sales pdage
TERMINAL VS UPDATE MANAGER?
‘Why use the Terminal to update and upgrade over the Update
‘Manager, regardless ofthe distro you're using? Some users
‘reatly prefer using the Terminal to update their Linux systems
‘and accompanying apps, in the belief that it’s better. However,
that’s not often the case.
Using the Terminal, apt-get upgrade, doesn't handle changing
dependencies between versions of packages, so if a package,
thas its dependent files changed from one version to another,
then the upgrades held back,
‘The Update Manager, or Software Manager (depending on the
distro), often phases its updates and marks those packages.
“ Update Mint via the Terminal
4
scent thas your systemisnowup to date
Sur according to the available list of packages From the
an-get update command, Youcan rn rough the process one
tore ie jsto chee everything wet oy To ea ee:
Sudo apt-get update, press Enter, thentype sudo apt-get
Upgrade an pres Enter.
interestingly Linux Mint, among other distros,
(offers you the ability to chain several commands
together. n this example, therefore, we can use sudo apt-get
update && sudo apt-get upgrade. The double ampersandis
what combines the commands and works perfectly, providing the
preceding command went without a hitch. It's recommended to
start any session withthe update and upgrade combo.
with changed dependencies for updating, However, and this is
‘where Linux can often get confusing, sometimes it doesnt.
Itall bolls down to the developer of the package being
updated and the way the package is held in the distro's
repositories and whether the update is classified as stable
‘or not, In essence, From the point of view of the user, iFyou
‘update and upgrade using both the Terminal and the Update
Manager regularly, then you will be as up to date as possible,
‘and get the essential and necessary stable versions of the
packages and core software. If you're looking for cutting edge
package updates, then it's best to opt Fora rolling release
distro instead.
worabmpublcatonscom — (48)ZN) Using the Terminal
Install Apps via the
Terminal—Part 1
There are different ways to install apps and programs on Linux. You can opt for the
graphical route, using a Software Manager, or you can use the Terminal. Often, the
Terminal provides better control over the software being installed and sometimes, you
have no choice in the matter.
COMMAND LINE INSTALLS
Installing an app with the Terminal may require some nifty keyboard work but you get a better sense of what's being installed
‘and where,
BETES ERD stalling apps form the Terminalisoften relatively EEE You need to enter y to confirm the instalation,
simple. First though, you need to make sure that which takes up around 5.SMB of storage inthe
the system is up to date. To dothis open up the Terminal and enter: system. Once Stellais installed, you can see again that Mint has
sudo apt-get update && sudo apt-get upgrade. Enter automaticaly created the Games category in the Menu as well as
your password and accept any necessary updates. the app shortcut.
PRPTSEDD ust asvou've een, sudo apt-get update/ung PEP D sometimes, when instaling software, you need to
and so on are designed to upgrade the software dd the app’s Repository. The repository, or repo,
that's already installed on the system. How do you installore apps _ is simply the remote server location where the software isheld,
though? Iejust so happens that it's extraordinarily simple. Frstyou along withallts dependencies (the vital libraries and such it need!
need an app to install so let's use Stella again. Enter: sudo apt- to function) Start by typing inthis sudo add-apt-repository
get install stella pa: peterLevi/ppa. Press Enter when asked to and add the PPA
(Personal Package Archive),
50) wwwbdmpubleationscomInstall Apps via the Terminal Part 1 A
BETTER) Thisadds the repo forthe app Variety Wallpaper FST vow toinstall variety, enter: sudo apt-get
Changer, an Ubuntu-based app that works in Mint install variety. Press to confirm and accept
{and changes the wallpaper automatically. Now that the repos added, — the installation, and to continue with the install, Once installed, you
enter: sudo apt-get update, to update the new information and can type variety into the Terminal torun the app.
‘add the contents ofthe repo to the package database,
REMOVING APPS
In addition to installing apps, the apt command can also be used to remove any apps and helps keep the system tidy and free
up resources.
PEPER to uninstall or remove, the Variety app enter the EEN) when you remove apps From the system you're
following: sudo apt-get remove variety. be informed that some packages that were
ry to continue with the uninstall ofthe app; notice also that automatically installed are no longer required, You already saw in
You're informed af how much space you'e Freeing up on the hard the previous tutorial, that you can tidy things up withthe following
drive as a result of removing the app. command: sudo apt-get autoremove, followed by pressing y
to.accept the process.
ie tet ven Seach teil Heb
PEPER While the apt-get remove’ command uninstals an BAVA Finally, totidy up allthe non-used packages in
app, it doesn get rd ofthe extra clutter that comes the system, and to remove elements that the
with an app, such as configuration and library files. To completely _autoremove command didn't, you can enter: sudo apt-get
remove the clutter,enter:sudo apt-get purge variety. ‘autocLean, These last Few steps are vital for keeping your Linux
Mint setup in good working order and to trim off the unnecessary,
sowsearasiee ‘excess caused by installations and upgrades.
wubémpublcatonscom (54ZN) Using the Terminal
Install Apps via the
Terminal—Part 2
Most of the time you'll get to install apps from the Terminal using the standard apt-
get command. However, sometimes an app demands a little more work. This means.
installing an app From its source code, which isn’t as scary as it First sounds.
FROM THE SOURCE
‘The commands you'll need to become Familiar with here are Configure, Make and Install. You'l Find a lot of apps use installing
from source, so it’s certainly a skill worth investing time in.
FR sourcecode es for inuxusualy come inthe frm RRM the wget command tives content from the
su? of .TAR.GZ or .TAR.BZ2. Both are compressed Files SuaPS internet, in this case the .822 file for Vim. To check
hotdngallthe core les needed to'make the app Sartoff ths the le was downloaded sucessfully, enters. cording to Mins
tutorial by creating anew elder Home: akin Vim Fiesytem colourkey, the compressed le should be depayed i red
PEPER vic bythe way, isan advanced text editorwhich VB weneed to uncompress the contents ofthe file
well use as an example to instal Enter the new now, so enter: tar -xf vim-7.4.tar.b22 into
folder, cd Vim, then from within the new Vim folder, enter the the Terminal. Note: you can type in tar =xF vand pressthe Tab
following command intothe Terminal: wget ftp://Ftp.vim. key to autor the remaining file name.
org/pub/vin/unix/vim-7.4.tar.bz2.
52) wwmbémpublcationscomInstall Apps via the Terminal—Part 2 A
Froveneris agen outoatcetenen ERE you ns neetoleepnsling new dependences
Susp Folder has been created: vim74; in light blue text Suz? depending on the app. After each new dependency
representing a older nintI’savays handy to create root folders sista rerun «configure and when doer report back
forthe mainappthenasyou upgrade anpstroughths method than eroryoucan continue tothe next stage ofthe stalin,
thelndidaleson wl ech have the own folder Not: you may needto search anne for some err message,
Fe Edt Vow Search Terminal Help
FTE Tein cd vin74 to enter the folder, and 1s again EIB with a successful ./configure, the system will
toview ts contents, There wil likely bea fair umber create a Makefile. Tis needs to be ‘made’ by
of files present; most are the app's core files, while others willbe entering: make into the Terminal. This may take a while, depending
labelled README or INSTALL I's always ise toread these lesfirst on the sizeof the app,
asthey provide valuable information regarding the installation,
PEPER) The first part of theinsallation requires youto enter [SIAM Final, you need to enter: sudo make install
/configure. The /configute command will check into the Terminal. Ths wil install the app, and
yur system for any missing dependencies associated withthe app. IF make itready fr use inthe system, When complete you can execute
youreceived an error regarding a C Compile, then enter: sudo apt- the app, in this case by entering vim into the Terminal or searching
get install build-essential. Thethirdparty app Neurses _Foritvia the Dash.
was recorded as missing. Weneed to instal that with: sudo apt
get install Libncurses5-dev LibncursesnS-dev.
wuampublcatonscom — (53)Ce een eC eae hme Tie COT ae
locko rootfstype=jffs2 inits/etc/preinit noinitrd console=ttyO console=ttyS0, 384
Cormac
Found and enabled local APIC!
ECU eee ae
Enabling unmasked SIMD FPU exception support... done
lipeee besa wear)
PID hash table entries: 32 (order: 5, 128 bytes)
Detected 191.657 MHz processor.
Coe Cems an (cea oe
console [tty0] enabled
Cur Cmeas eo MCU ICe
eRe Cnc
Mi eee eC
eRe te oe aac Mees)
(come mC)
Gane cea mc Ts
eC MCC MT)
NCE aaa 2 Oa)
race c OU Oe)
eae ems cr a eT)
tetra ea
Ora oc emo a)
checking if this processor honours the WP bit even in supervisor mode. . .Ok
Calibrating delay using timer specific routine.. 4047.64 BogoMIPS (1pj=20238210)
1024 (order: 0, 4096 bytes
(order: 0, 4096 bytes)
kernel code, 2624k reserved, S97k data, 196ZN) Using the Terminal
Creating a File Using
the Terminal
Using the Terminal, you're able to create folders, files and even execute Linux Mint
apps. In truth, if you didn’t have the GUI at hand, you could still accomplish the same
From the Terminal.
MORE TERMINAL WORK
Creating content using the Terminal isn’t quite as strenuous as it may first appear. Yes, the Terminal can look a daunting place
for the newcomer, but once mastered it’s really quite intuitive.
‘pen upthe Terminal and ake sureyouein the Your command tn sould change tothe Test Folder
SUP Home Folder. If not use the ed ~ command to retum SUaPS and if you enter Ls (List folder contents) there'll
yoUto the Home folder From wherever you're currently located, be nothing within the Folder, as you've just createdit. The mkdir
commands fairly selF explanatory: Make Directory Followed by the
aoaaeamine name of your choosing
et ew sear Temes He
PPTP DD Let's start by creating a new folder within Home, PEP D Tocreate an empty text fie, called Test.txt, enter
and call it Test. The command youtl need is inthe Terminal: touch Test..txt. You can then
mkdir Test. Press Enter to create the folder when you've typed _—_use Ls toview the new fein the folder. Touch sa standard Linux
inthe command, then ed Test and press Enter. Thiswill Change command that allows the creation of files without the need to open
Directory (hence €D) to the newly created Test Folder. atext editor, save the file, then close the editor,
56) wwwbdmpublcationscomPEPER 2''s sav you now wanted to create a text file, well
callitTest2.tx, complete with some content, To do
so,enterscat > Test2. txt. Thiswill create the file Test2.txt and
put the Terminal into an editing mode,
aovidedvi
Fle Eat View Search Terminal Help
(a
Pars
rarer
eter
rena i
prrar
FETED Youll notice thatthe cursors flashing below the
cat > Test2.txt command, without the usual
‘prompt. This editing mode wil allow you enter the text thatthe file
‘will contain. Enter some text, then press CtrleD to ext and write the
contents tothe fe.
PRPTSED) (0f course you don't alwayshave to use the Terminal
to-enter text into ale. Mint comes with atext
editor called Xed, whichis similar to Windows’ Notepad. To view the
previously created ile in Xed, type into the Terminal-xed Test2..
‘ext, and press Enter.
( Creating a File Using the Terminal
4
main window, and the File > Save, or File > Save As functions from
its top menu bar options.
koeaa
as
F however, you prefer to remain working in the
Terminal to edt/save/create Files, you can use
Nano. Nanoisa simple Terminal based text editor. To uy it with
the example, enter:nano Test2. txt. There's a meny along the
bottom of the screen. To exit and save any content in Nano, press
Ctrl4X and follow the on-screen instructions
We've used the Terminal to launch a Mint app,
ed, but any app can be launched from within the
‘or example, try Firefox, and press Enter. Close Firefox
Terminal
toretum to the Terminal. Providing you know the name of the app,
itcan run from the Terminal, Additionally, entering fireFox8 opens
Firefox, AND lets youstll use the Terminal
“Caeaxy “Gavens| ESI Phone “Eee:
ora vdmpublcatonscom
37ZN) Using the Terminal
Creating and
Removing Directories
As with creating files in the Terminal, you can also create and delete directories, or
Folders if you prefer. Directories Form the structure of your File system, without logical
directories the filing system would be in utter chaos.
MANAGING FOLDERS
Learning how to create and delete folders in the Terminal is an important Mint, and indeed Linux overall, skill to master. Here's
the basics for you to try out.
FETED With the Terminal open enter cd ~ to make sure FETED vou were to enter the command again, mkdir
you're in your own Home directory. Now enters testdir, youll receive a message stating: mkdir:
toview the current folders you have housed inthe Home directory, cannot create directory ‘testdir’: File exists. It
YYou!l notice that folders are labelled in Mint in cyan (Ught blue). oes without saying then, that you're only able to have one uniquely
Let's start by creating a new directory. Enter:mkdin testdir. named directory within the current directory, However, as Linuxis
case-sensitive, you can have Testdir, TestDir, testDir and soon,
PEPER | youncw enterls again, youll see that the new PEP You can create directories within directories youve
directory, testdir, has been created alongside the already created. For example, enter the testdir
‘ther directories in the Home area. Obviously the commandmkdir directory with ed testdir/ followed by sto listthe folder structure.
iswhat creates the directory, nd no doubt you've already quessed _Naturallythere's nothing present, as you've|ust created the directory.
itstands For Make Directory Now drap back to Home with ed ~ and entermkdir testdir/
reports. Gobacktothe testdir,cd testdir/, and Ls again
58) wwwbdmpublcationscomThe commando create directories saute logical
SNAPE therefore. You'll create the directory, and any sub-
directories within, However, what iF you want to create a directory
and a sub-directory ina single command? Make sure you're at Horne
(cd~)andentecmkdir -p Tenp/fnances. Now, ed Temp/, and
Istolist the new directory
‘Command, Option, and Argument. In the previous step example,
command (mks), option (p), and argument (Temp/finances).
File Edit View Search Terminal Help
ldavidedavid-mint ~ § mkdir -p Temp/finances§|
PEPER you want to drill down into the various options
available forthe mkdir command, you can enter
mkdir --help into the Terminal, This will provide a quick help
‘Quide detailing the options and how the command structure works.
Creating and Removing Directories
4
Now tat weve created some drectores et see
S18 about removing them. Start by entering the testdir
decor and isting ts contents: cd testi, then The previous
created reports subdrector preset. One waytoremove isto
entered reports, then sagen o conti snot there,
A.quick warning: removing a directory in the
Terminal doesnt place it inthe Mint Rubbish Bin, via
"Nemo file manager. The same goes for any files, too. you remove 2
dicectory From the Terminal command then it’s gone For good.
FERED Perdir wil only eemove empty directories, to
remove directories containing sub-directories, or
even files, you'll need to use the rm command with the R option.
For example, on the Tempjfinance directories, use rm -R Temp.
‘Aauicks reveals that the parent folder and all ofits cantents are
removed, Careful when using this command,
wubémpublcatonscom — (58)Z¥) Using the Terminal >
Fun Things to do
in the Terminal
Despite the seriousness of an operating system, the Linux community are certainly no
strangers to a bit of Fun. The developers over the years have created and inserted all
manner of Fun and odd elements into the Terminal.
TERMINAL FUN
You'll be working exclusively in the Terminal for these next two sections, so start warming up your Fingers. After all, all work
and no play... as the saying goes.
PEER) the frstcommand wee going to uses it's FSTTSED you've ever Fancied having the computer reada
not installed by default so enter: sudo apt-get ‘random fortune out to you, then you're in luck. Most
instaLL sl. The command can be run withsland when executed distros require you to install the fortune app, however Linux Mint
will display a Steam Locomotive travelling across the screen (hence differs somewhat by having it already pre-loaded. All you need to do
‘st) Entering LS, note the upper case, also works isenter the command fortune into the Terminal, and enjoy.
PEPER F205 f starwars even getafixwhenitcomesta FB therevcommandis certainly interesting, and at
the Terminal. By linking toa remote server via the first what seems aquite useless addition to the
telnet command, you can watch Episode IV: A New Hope being 5, However, it can be used to create some seemingly unbreakable
played out, albeit in ASC To view this spectacle, enter: telnet _ passwords. Enter: Fev, now type some text, when you press Enter
tonel.bLinkenlights.nl next, everything you typed in will be reversed, Press Ctrl+C to exit
60) wwwbdmpublcationscomPEPER youre stuck trying to work autallthe possible
Factors For any particular number, simply enter
Factor Followed by the number. For example, Factor 7 doesnt
coffer much output, whereas Factor 60 displays more
FETED) There'sa ine line between the rather cool and
really-quite weird. Having an ASCII cow repeat text
toyou could potentially fallin the latter. Enter cowsay Followed
byany text you want, suchas: cowsay Linux Mint is ace!
infact, ou can even output the Is command through the cow, by
entering: Ls. cowsay.
PEPTED) To further the cow element, there's even a graphical,
Le. non-Terminal, cow avaiable. Installt with
sudo apt-get install xconsay, then when t'sinstalled enter
something similar to cowsay, suchas: Xcowsay BOM Publications.
Fun Things to do in the Terminal A
graphical cow equivalent: Fortune |_ xcowsay. Plus, there's
always comthink. Try cowthink ...This book is anesone.
FTE The command toilet doesnt inspire much
confidence, well admit, However, i's not as bad as
itfist sounds. Startby installing it with: sudo apt-get install
toi Let. Then when installed, type something along the lines of:
toilet David. Or perhaps ist the contents ofthe current folder
throught, with:Ls I toilet.
BETS ERE OR [panding the toilet command, you can actually
generate some decent looking graphics through
it For example, ty this: toilet -F monol2 -F metal David.
You canenter toi Let. =-help, fora list ofthe command line
More Fun Things to
do in the Terminal
IF the previous list of Fun, and quite bizarre, things to do in the Terminal has you
wanting more, you're in luck. We've put together another batch of some useful, and
some not so useful, commands for you to try out.
MORE FUN, YAY
Since the Terminal session is already open, and your keyboard digits are nicely warmed up, here are another two pages of
Terminal nonsense.
Remember the old x Spectrum days of computing, Having alittle white cat chase your mouse pointer
when you could type in 10 print “Helo", 20 goto 10, around the desktop may sound tke a terrible waste
and Hello would lst down the screen? Well in Linux Mint you can do of time. Oddly though, itisnt. Enter: sudo apt-get install
the same. Simply enter yes followed by some text, eyes. Linux neko, then type oneko to have the cat appear. Move your ‘mouse
is ace. It'll keep going until you press Cle. cursor around the screen and the cat will chase it. Use CErL4C to
exit the action.
FETTER) The Matrixwas one of the mast graphically copied — EIS his entry isa litle more serious than the previous.
flims ever released; there's even a version of the It's called the Fork Bomb and what t does, basicaly,
Matrix code available for Linux Mint. Install t with: sudo apt-get is continually replicate itself until ithas used up all the available
install cmatrix When t'sdone enter cmatrix andfollow system resources, thus causing your computer to crash. You don't
the white rabbit, Neo. Unlike the real Matrix though, you can press have to try it but it's interesting nonetheless. Simply enter :C){.
Cer +C to ext 21:8 }: and be prepared to reboot.
fle Et View Search Terminal Help
orcs
62) wwmbémpublcationscomStringing several commands and piping them
through other commands is what makes scripting
such a powerful element to an 0S, Using the while command, For
‘example, together with toilet, can yield some impressive results
rerwhile true; do echo “$Cdate “+XD XT” | toilet
=f term -F border --metal)”; sleep 1; done
Talking computers were the craze ofthe 8s, ete
SUS espeak “Hello, this is Linux Mint”
tohavete computer epent the ex inside the quotes tou
Mak sure your volumes turned up, and ty te following 1 >
folders. txt && espeak -F folders. txt. hs wil have Mint,
read back the contents ote command
St Vem Search Terminal Help
ETeGE AD 4 02ring ASCII Fire isn't the most useful command
tohave at your disposal, but i's Fun. Install t with
sudo apt-get install Libaa-bin, then when installed use:
afire. snot exactly warming but you get the idea. To expand
the above, enter: sudo apt-get install bb caca-utils,
then, cacafire.
es
Fa
More Fun Things to do in the Terminal
4
Used as must demo from the od Amiga and
Sra DOS days, the bb command reminds us of getting
hold ofthe and ahalFinch floppies crammed with al manner oF
demescene goodies, We've dread stale bb fom the prevous
Step, sot enter bb, Folow the onscreen instruction, and tun UP
yourvolume
get install Libcursessperl when thats done enter-cd
Bowntoads/ && wget http://search.cpan.org/CPAN/
tuthors/id/K/KB/KBAUCON/Tern-Anination-2-4. tar.gz
ik tar xf Term-Anination-2,4,tar.gz && cd Term
‘Animation-2.4/.Then:perl Makefile.PL && make && make
test && sudo make install.
This entryisin two parts, First youneed to get
STEP 9
hold of the necessary packages: sudo apt
eh that tte ot done, ont the net Ener: ed
Sui . && wget http://www. robobunny. com/
projects/asci iquariurvasciiquarium. tar.gz 88 tar
wf aseliquariam.tor gz 8& cd oscliquarun1.1/
Ak chod x asc quarium Proving al went wel, ener «/
act iquariumand eno your very own ASCH based aquarium,
wonabdmpubcatonscom — (63Z¥) Using the Terminal >
Linux Tips and Tricks
As you've seen, the Linux Terminal is quite an exceptional environment. With a few
extra apps installed, and a smidgen of command knowledge, incredible, and often
quite strange, things can be accomplished.
TAKING COMMAND
There are countless Linux tips, secrets, hacks and tricks out there. Some are very old, originating from Linux's Unix heritage,
while others are recent additions to Linux lore. Here's our Favourite ten tips and tricks.
PRED ccs cient seen eer
emacs -batch -1 dunnet
Dunnetisa text adventure written by Ron Schnellin 1982, and
hidden in Emacs since 1994,
PUTT eeNap f25ec on the classic 1982 arcade game,
Moon Patrol, Moon Bugay appeared on
the home computers of 1985 amid much praise. l's cracking Atari
‘game, and t's available inthe Linux Terminal by entering
sudo apt-get install moon-bugay
Then:
rmoon-bugay
Enjoy.
UU EIND 5% farcedbeina able to
the Terminal While not particularly useful tis quite a Fascinating
thing to behold. Todo so, enter
sudo apt-get install elinks
elinks
Enter the website you wantto vist.
SRST Sowing in the Terminal console isn’t
something you come across every day. IF
you're interested, however, enter:
get https://gist.githubusercontent con/sontek/
1805483/raw/7d024716e0S7e69Fb52632Fee09F42
753361c4a2/snowjob.sh
chmod +x snowjob.sh
-/snowjob.sh
G4) wwbémpubleationscomLinuxTips and Tricks @@Y
Ifyou need io see what ppsare Backin the daysofdabup connections, the online world
REXEREES) "ores et)
‘was made up of Bulletin Board Systems. These remote
LUnux, simply enter: servers provided hang-outs for users to chat, swap code, play games
an ‘and more, Using telnet in Linux, we can stillconnect to some active
PS aux | sort =pnk 4 ae
This sorts the output by system memory use ‘SUERTE
There are countless operational BBSes available, check out https//
‘www.telnetbbsguide.com/bbs/list/detaly, for more
Wiensou dete fie heesacancot ERED, evan iocsteamenie
eRaas os: someone with the right software being able (eu See) ee TSES directory (or Folder) tree with a
toretrieve it. However, to securely and permanently delete afile, single command, you can use:
eee ikdir =p New-Dir/
shred ~zvu NAMEOFFILE. txt {subfoldert, subfolder2, subfolder3, subfolderd}
Replace NAMEOFFILE with the name of the file to delete This creates a NewDir with four sub folders within,
ASCIIART PRREROEEEOUESSCIME FORGOTTEN COMMANDS EEsennanr]
some images. However, soften dificult to to remember all the
{get just right. You can create some great ASCIlart from the images available Linux commands. Thankfully, we can use apropos to help
you have by using ima2bxt: Us. Simply use it, along with a description ofthe command
‘img2txt NAMEOFIMAGEFILE..png ‘apropos “copy files”
Replace NAMEOFIMAGEFILE IDEA
with the actual name of the
image fle on your system. F
img2txt instal installed, use:
sudo apt-get install
caca-utils,
wonabdmpubcatonscom — (68wv
co
a)
Uv
c
oO
x
5
=
aZ¥) Using the Terminal >
Creating Bash Scripts
eee ore
Eventually, as you advance with Linux Mint, you'll want to start creating your own
automated tasks and programs. These are essentially scripts, Bash Shell scripts.
to be exact, and they work in the same way as a DOS Batch file does, or any other
Programming language.
GET SCRIPTING
‘ABash script is simply a series of commands that Mint will run through to complete a certain task. They can be simple or
remarkably complex, it all depends on the situation,
ESTER ED Youll be working within the Terminal and with a BETS DD Tobeain with, and before you start to waite any
text editor throughout the coming pages. There scripts, you need to create a folder where you can
are alternatives to the text editor, which we'lllook at inamoment put all ourscriptsinto. Start withmkdir scripts, and enter the
butfor the sake of eace, we'llbe doing our examples inXed. Before folder cd scripts/. This will be our working Folder and from here
you begin, however, run through the customary update check sudo you can create sub-folders you want ofeach script you create.
‘apt-get update && sudo apt-get upgrade.
Fle Edt View Seach Terminal Hep
Fe Ede View Search Terminal Help
PEPER There are several text editors wecanuseto create [EIB windows users willbe aware that in order For a
a Bash script: Xed, i, Nano, Vim, GNU Emacs and batch file to work a in be executed and follow the
so 0n.In the end itll comes down to personal preference. Our programming within, tneedsto have a.GAT Fle extension Linux
se of Xed is purely due to making t easier to read the scriptinthe isan extensionless operating system but the convention isto give
scteenshots you see below. scripts 3 sh extension.
Fle Edt View Search Terie Hep
68) wwwbdmpublcationscomLets stare with simple rp to output something
UEP tothe Terminal. Enter xed helLoworld. sh.
This wil launch Xed and create alecaledheloworish n Xe
enter the folowing: #l/bin/bash, then ona new ine: echo
Hello World!
Fle et View Search Terminal Hep
Fle St View Search Tools Documents Hep
xoojag
Doane
slinersh
echo Hetto worts!
(#8 denotes a comment ine, one thatis ignored by the system, the
‘exclamation mark () means that the comment is bypassed and will
force the script to execute the line as a command, This isalso known
asaHash-Bang,
Fle Edt View Search Tool Documents Help
poalnv)xyeejag
helowcrsh %
FEPTEM You can save thisfile, clicking File > Save, and exit
back to the Terminal Entering Ls, willreveal the
script the folder. To make any script executable, and able to
‘un, you need to modify its permissions, Do thiswith chmod +x
hhelLoworld. sh. You need to do this with every script you create,
Creating Bash Scripts-Part1 @%Y
the script, in other words make't do the things you've typed into it
enter: /heLLoworld. sh
Fede View Search Tein Help
it in the Terminal, as we move on you can make the echo command
output to ather sources.
Fle dt View Search Toole Document Help
Doale~ xeojaa
Bw retonorssh >
1 /binvbach
leche Hello World! This is my first script im Linux Mil
FEPETR) Thinkot echo as the old BASIC Print command. It
cisplays either text, numbers or any variables that
{are stored in the system, such asthe current system date. Try this
example: echo Hello World! Today is SCdate +A). The
S{date +94A) is calling the system variable that stores the current day
of the week
wurabmpublcatonscom — (68)Z¥) Using the Terminal >
Creating Bash Scripts
—Part 2
Previously we looked at creating your first Bash script, Hello World, and adding a
system variable. Now you can expand these and see what you can do when you start to
play around with creating your own unique variables.
VARIABLES
Just as in every other programming language a Bash script can store and call certain variables from the system, either generic
‘or user created.
something different: ./heLlo.sh Mint.
Fle Edt view Search Terminal Help
Beain+i)xoniag
PEPER the scriptis now executable, unit with ./ FETIP DM You caneven rename variables, Modify the hell.
helo. sh. Now, as you probably expected a simple shscrint with the following: frstname=$1,
‘Hella’ is displayed in the Terminal. However, fyouthen isuethe surname=$2, echo Hello firstname $surnane. Putting
command with a variable, it begins to get interesting. For example, each statement on a new line. Save the script and exit backinto |
uy «/hetlo.sh David the Terminal
Govaedan Fle Edt ew Search Toole Ocumens Help
Fle Edt View Search Terminal Help BoeX n+ xyonjag
(me etash x
f/sinvoash |
70) wwwbdmpublcationscomWhen yourun the script now you can use two
custom variables: ./hello.sh David Hayward,
ma name; unless
Naturally change the two variables with your
you're aso called David Hayward, tthe moment we're just printing
the contents, so let's expand the two-variable use alittle,
File Et View Search Terminal Help
Pate state
BSED ccate anew script called addition. sh, using
the same format as the hello sh script, Bt
changing the variable names. Here we've added firstnumber and
‘secondnunber, and used the echo command to output some
simple arithmetic by placing an integer expression, echo The sum
is $(($firstnunbers$secondnunber)). Save the script, and
make it executable (chmod +x addition. sh).
Fle Ee View Search Tools Documents Help
poealns)xooniag
Bu stonah
+1 bin/bash
[echo The sum is $((Sfirstrunbersssecondnumber))
\When you now run the addition sh script we can,
entertwo numbers: ./addition.sh 1 2.The
result will hopefully be 3, withthe Terminal displaying The sum
is 3 Tryitwith a few different numbers and see what happens.
‘see also if you can alter the script and rename it do multiplication,
and subtraction
Fle Est view search Terminal Help
Creating Bash Scripts — Part 2
4
BSTTSED cts expand things Further. Create anew script
called greetings..sh. Enter the scripting as below
in the screenshot, save it and make it executable with the chmod
command, You can see that there are afew new additions to the
script now.
Fle Edt View Sreh Tools Document Help
aoa xoon,ag
Bu geeongsh
es oinsbash
ead firstname
rend surnane
FETT Weve added a-nto the echo command here
‘which will eave the cursor on the same line asthe
question, instead ofa new lie. The read command stores the
users’ input as the variables firstname and surname, to then read
back later inthe last echo line. And the cLear command clears
the screen,
Fle Eat View Seorch Terminal Help
‘As afinal addition, let's include the date variable
we used in the last section, Amend the ast line
ofthe script toread: echo Hello Sfirstnane $surnane, how
‘are you on this fine $(date +KA)?. The outputshould
display the current day ofthe week, calling it fram a system variable.
Fle Edt View Search Tools Documents Help
poo eonjag
a reeungssh x
s1ybin/bash
ecto
Creating Bash Scripts
—Part5
The backup script we looked at previously can be further amended to incorporate
choices, user-interaction with regards to where the backup file will be copied to and so
on. Automating tasks is one of the main benefits of Bash scripting, a simple script can
help you out in many ways.
EASY AUTOMATION AND HANDY SCRIPTS
Entering line after line of commands to retrieve system information, Finda file or rename a batch of files? A script is a
better answer.
FETED .snane’ 2> /dev/null )
ut® 15 thenCreating Bash Scripts - Part 5
4
When executed the script waits for input from the
User, inthis case the file extension, such as pa,
‘mp4 and so on t's not very friendly though. Let's make it alte
friendlier, Add an echo, with:echo -n “Please enter the
extension of the file you’re looking for: “just
before the read command,
|
Here's an interesting, Fun kind of script using the
app espeak. Install espeak with sudo apt-get
install espeak, then enter the text below into anew script called
‘speak, sh. As youcan seeit'sa rehash ofthe fist greeting script
‘we ran, Only this time, it uses the variables in the espeak output
PEPER We briefly looked at putting some coloursin the
‘output For our scripts. Whilst it's too long to dig a
little deeper into the colour options, here's script that outputs
what's avallable, Create anew script called colours. sh and enter
the text (see below) intoit
The output from colours sh can, of course, be
BALD isc together binging diferent effects
roamto gow nto ote ambos projec concep an lets nd
itneededtedosoinaseasjtousefashionas posse The galas
tote unersalleaming platform thet students of ay 09e
Could expandon and tke ath whl learring new concepts such
szprogramming, electrons and computing tural once .
the hardware was developed the only rel choice of ; aa
operating system was of course, Linux.
The verstity of Linuxis legendary. This incredible
core OSis so malleable thatit can be steered
toward near any aspect of computing, from
supercomputing t robotic, the space industry to
‘more terrestrial engineering; education and
science, manufacturing and the Internet.
Think ofan industry, and you wil ikely
find a Linux installation somewhere inthe
background keeping tall together.
Raspbian i the recommended operating system for the Raspberry
Pi. a customised Debian-based distribution that comes packed with
‘collection of useful tool that cater For coding, electronics, and
‘general desktop computing duties. Alongside the apps are pre
loaded modules to help get the mast from each ofthe programming
languages you decide to learn and use, as well as software to
hardware modules that will enable you to power and use the
hardware speci items unique to the Pi. For example, there are
Python modules that interact withthe Raspberry P's 40-pin GPO,
allowing you to create content For any ofthe Hardware Attached on
Top devices
‘This combination is what makes the Raspberry Pian excellent base
‘of operations to learn not only cading on, but also Linuxin general
RRaspbian, being Debian-based, willbe ableto run any ofthe
Terminal commands listed in this book, as Linux Mint and even
buntu are also Debian based. And since the Raspberry is so
all, and costs very litte setup, you're able to have both your
regular, Windows or macOS computers, and have a Raspberry Pas
headless (a powered device that doesnt needa keyboard, mouse or
‘monitor attached, as you cannect ta it remately) computer from which
you can connect to and learn how to use Linux and how to code
7B) wwwbdmpublcationscomWHICH PI?
‘There are several Raspberry Pi models available, with each
‘offering something slightly different from the others. The
‘most recent Pi released is the Raspberry Pi 3 Model B+, and
while this model is slightly more expensive than some of the
‘other examples, itis the most powerful and feature-rich Pi
BEYOND RASPBIAN
‘The Flexibility of the Raspberry PI's ARM processor means
that it’s capable of running other operating systems beyond
Raspbian. Still keeping with Linux, you can instead install
Ubuntu MATE, Pidora (a Fedora-based distribution), Lakka,
iPlay (@retro emulation distribution) and Arch Linux ARM.
‘There are alco systems based loosely on the Linux kernel, such
{as Android, Minibian, and Chromium OS,
There's Windows 10 loT Core, FreeBSD, RISC 0S PI, Plan 9 and,
‘remarkably, AROS an Amiga OS clone. Needless to say, that
‘once you've Finished experimenting with one version of Linux,
justas you would with a desktop version of Linux, you can hop
to another on the Raspberry Pi and see how that one works,
Pix Linux = The Perfect Combination
4
available. Overall, it’s probably best to start experimenting
with the Pi using the PI3 Model B+, then moving on to one
‘ofthe other models as you develop your skills and Focus on a
particular project, such as the need to use one of the Pi Zero
models, with a smaller Footprint and WiFi enabled connectivity.
PI, LINUX AND CODING
‘As previously mentioned, the Raspberry Plis an excellent code
base, and with Linux as the backbone you're able to start learning
how to code in a multitude of different programming languages.
Bash scripting works perfectly, since Raspbian is Linux, and
Debian-based, and you can easily expand your scripts to
‘encompass much of the P's Functionality. Aside from creating
backup scripts, you can also create scripts that can access the
GGPIO pins on the Pi, and in so be able to control LEDs, and even
‘more complex HATS.
Pythonis by far the most popular choice For beginners, and.
Raspbian comes pre-installed with everything you will need to
‘get the most from your Python experience, There are countless
preoaded modules, as well as the most recent stable release of
the language.
‘Ce+is one ofthe most powerful programming languages
to lear. t's used for games, apps, and even entire operating
systems. The Raspberry
Picomes witha great C++
‘editor, that’s easy to use
‘and canhelp you develop
‘amazing content. Whichever
‘way you decide to take your
‘coding and Linux adventure,
the Raspberry Piis an
‘excellent platform from
‘which to begin on,
wonabdmpubicatonscom — (79)A Using the Terminal.)
Command Line
Quick Reference
When you start using Linux full time, you will quickly realise that the graphical
interfaces of Ubuntu, Mint, etc. are great for many tasks but not great for all tasks.
Understanding how to use the command line not only builds your understanding of
Linux but also improves your knowledge of coding and programming in general. Our
command line quick reference guide is designed to help you master Linux quicker.
TOP 10 COMMANDS
‘These may not be the most common commands used by everyone but they will certainly Feature frequently for many users of
Linux and the command line.
‘The my command maves a file toa different
location or renamesafile. For example my file
sub renames the original fle to sub. mv sub
~/Desktop moves the file'sub'to your desktop
directory but does not rename it. You must specify
‘anew filename to rename afl.
The edcommand is one of the commands you
walluse the most athe commandline in Linu.
CM) atiows you to change your working directory. You mv
{set to move around within the hierarchy of your
file sytem, You canals use char.
‘The chown command changes the user and/
‘oF group ounership of each given file. Fonlyan
1S) sousce ile sizes, when files where created and ile (EOWA) owner (e user name or numericuserI0)is given
The 1s command shows you the files in your
current directory, Used with certain options i ets
that users made the owner of each given file, and
the files’ group isnot changed.
permissions. For example, 1s ~shows you the files
that are in your home directory.
The chmod command changes the permissions on
the es sted Permissions are based on airy
CP) anesact copy ofthe flewhose nameyouentered — | EMMOM ) simple model. vou can set permissions For user,
The cp command is used to make copies of Files
and directories. For example, cp file sub makes
‘group and world and you can set whether each can
read, write and or execute the fe
and names the copy sub but the first ile wil tl
exist with ks original name.
‘The rm command removes (deletes) files or
directories. The removal process unlink aflename
ina filesystem from data on the storage device
‘and marks that space as usable by Future writes a
‘other words, removing fils increases the amount
(of available space on your disk
The pnd command prints the full pathname of
the current working cretory (pwd stands For
PW “print working directory’), Note that the GNOME rm
terminal also displays this information inthe tie
bar ots window,
‘The clear command clears your screen if this
's possible. t looks in the environment for the
CLEA) terminattype and then inte terminfo database
to figure out how to clear the screen. This is
equivalent to typing Control when using the
bash shell
wu bmpublcations com
Short for "make directory’, mkdir is used to
create directories on a ile system, ifthe specified
directory does not already exist. For example,
mnkdir work creates a work directory. More than
‘one directory may be specified when calling mdUSEFUL HELP/INFO COMMANDS
The following commands are useful for when.
yyou are trying to learn more about the system or
program you are working with in Linux. You might.
not need them every day, but when you do, they
willbe invaluable
‘The Free command displays the total amount
‘of Free and used physical and swap memory in
the system. For example, free -mgives the
information using megabytes.
free
The cf command dspays lesystem disk space
‘usage forall partitions, The command dfh
GF isprobably the most useful the-h means
human-readable).
The top program provides a dynamic realtime
view oF a running system, te can sisplay
system summary information, as well asa list
of processes
top
‘The uname command with the -« option prints
allsystem information, Including machine name,
kernel name, version and a few other details.
unmame-a
‘The ps command allows you to view all the
‘processes running on the machine, Every
Ps ‘operating system's version of ps is slightly
different butall do the same thing
‘The grep command allows you to search inside a
‘numberof files for a particular search pattern and
QFED then print matching tines. An example would be:
grep blah file
Command Line Quick Reference (/Y
‘The sed command opens stream editor.
‘A stream editor's used to perform text
transformations on an input stream: afile or input
From a pipeline.
sed
The adduser command adds a new user to the
system, Similarly, the addgroup command adds a
new group tothe system,
adduser
‘The deLuser command removes a user from
the system. To remove the user's files and
hhome directory, you need to add the -renove
home option,
deluser
The del group command removes a group from
the system. You cannot remove a group thats the
delgroup
primary roup of any users.
‘Theman man command brings up the manual
man man _ enteyforithe man command, whichis great place
tostart when using it
‘Theman intro command is especially useful.
Ik-displaysthe introduction to User Commands,
man intro
‘whichis a well written, fairly brief introduction to
the Linux command line.
wonabdmpublcatonscom (81ay Using the Terminal.)
A-Z of Linux Commands
A
‘adduser
arch
nk
B
be
C
cat
chdir
charp
chroot
ccksum
@
crontab
csplit
cut
D
date
de
‘Add anew user
Print machine architecture
Find and replace text
within Files)
‘Anarbitrary precision
calculator language
Concatenate files and print
on the standard output
‘Change working directory
‘Change the group
‘ownership of files
Change root directory
Print CRC checksum and
byte counts
Compare two files
‘Compare two sorted files
tne by tine
Copy one or more files to
‘another location
‘Schedule a command to
runatalater time
Split afile into context
determined pieces
Divide a ieinto
several parts
Display or change the
date & time
Desk calculator
dd
diff
dirname
du
E
echo
ed
earep
env
‘expand
expr
F
factor
fdisk
farep
find
it
fold
format.
fsck
Data Dump, convert and
copyatile
Display the differences
between two files
Convert a full path name
tojusta path
Estimate file space usage
Display message on screen
Aline oriented text editor
(edn)
Search file) for lines
that match an
extended expression
Display, set or remove
environment variables
Convert tabs to spaces
Evaluate expressions
Print prime factors
Partition table
‘manipulator for Linux
Search ile) for lines that
rmatcha fixed string
Search For files that meet
adesired citeria
Reformat paragraph text
Wrap text to fita
specified width
Format disk or tapes
Filesystem consistency
check and repair
gawk
arep
‘groups
wip
head
hostname
id
info
install
J
join
K
kill
L
less.
in
Locate
Find and Replace text
within Files)
‘Search File for tines that
match a given pattern
Print group names a user
Compress or decompress
rpamed file(s)
Cutputthe first part
of Files)
Print or set system name
Print user and group ids
Help info
Copy files and
set attributes
Jointines ona
‘common field
Stop a process
from running
Display output one screen
atatime
‘Make links between files
Find files(_ AZ of Linux Commands
ognane Print currentloginname rep Copy files between U
two machines
ipe Line printer
control program rm Remove files fusouhe juernoamiee device]
Ipr Off line print. rmdir Remove folder(s) tonexpora| Comer specs tots
Apr Remove jobs from the rpm Remote Package Manager UNL Uniquity files
print queve units Convert units rom ane
rsync emote fie copy peel
(Synctronise fle trees)
M tunghar "Unpack shel archive scripts
= see elpmanul S useradd Greate new user account
mkdir Create new folder(s) screen Terminal window manager oe ody usereccount
nikffo “Male rrOs(necones) aiff Nersetuofiesnatey USES Urs cureny
inknod ‘ake biockorcharacter” select Accept keyboard input
spel sea Bancoumeriseavences J
more Display output one screen a
‘atatime Simo Shutdown or restart linux yagi Verbosely list directory
aaa MStnta rie Gael sleep Delay fora specified time contents (151-0)
sort Sot tet ies
N split Split file into WwW
Fixedsze pieces
watch Execute or display a
ntee Sette piontyofs ay Subsite wserideniy program perdialy
= eT sun frintachecisum forafile we Prot, wor od
write fies symlinic "Make anew name for
nou Runaconmandimmane a SCREAM Report allinown
cohanguns syne Sinchronze data on disk
wth memory which Locate a program fein
P T wi tasers
ossnd Modify user assuord caren oggedn
paste Mevgeinesoffies oncatenoteandwrte Wagan Pint he arent userid
ansname
path Chek name potbity utp tne os pn
er onertext fies orrles
printcap rntercpsbity database See Teee vares ecto
printenv Print environment variables multiple files :
printf Famatandprnedaa = test—SSClunten
ime Messi Program yes Pen sting
Resource se nlierrupted
quote dipay dak ace foich Change Fetes
eet ‘top List processes running on
auotacheck Scan fesse fo these
diskusage
traceroute Trace Route to Host
quotacti Set disk quotas
ram Ram disk deviceeon
cutee
rere eet)
Peer)Now you've got the basics
down, you can improve and
learn more essential skills in
our next guide...
Linux
Tricks and Tips
Coming soon!Discover more of
MacBook
For Beginners
Outdoor
Photography
For Beginners
pT ay 4
Galaxy
old {Ue}
oa
Nikon —
For Beginners
our guides...
Par Ts 0})
(ee iar}
For Beginners
ae |
|
OSM Adobe ‘| | Raspberry Pi
Elements Lightroom [ For Beginners
For Beginners For Beginners
Windows 10
eg = ed
Meet
mel gst nl ey
3
For Beginnersa Black Dog Media
Master Your Tech
To continue learning more about your tech visit us at:
www. Cee ene com
ON enemy
Nea ecm e Ae
Photography,
eee eee ce
—_
“DR Ar ea i remacOS
phone fmm Coding cami,
: Manual
Print & digital editions
Featuring the very latest updates
Step-by-step tutorials and guides
Created by BDM experts
Check out our latest titles today!
SPECIAL DEALS
and Bonus Content
Sign up to our monthly newsletter
and get the latest updates, offers
and news from BDM. We are here
to help you Master Your Tech!