More Debian 8 for Beginners
By Ed Hurst
Smashwords Edition
Copyright 2015 by Ed Hurst
Copyright notice: People of honor need nocopyright laws; they are only too happy to give credit where creditis due. Others will ignore copyright laws whenever they please. Ifyou are of the latter, please note what Moses said aboutdishonorable behavior be sure your sin will find you out(Numbers 32:23)
Permission is granted to copy, reproduce anddistribute for non-commercial reasons, provided the book remains inits original form.
Cover Art: Paste up of Open Source and PublicDomain art, created by the author using GIMP on a Debian computer.Background image is Public Domain ( source ).Debian art logo is licensed under Creative Commons 3.0; source . Cover art fallsunder CC 3.0 and is freely available upon request in several electronic formats,including a version without the text.
Other books by this author include Debian8 for Beginners, CentOS: The Commercial Grade LinuxDesktop and The Shortest Path to Linux.
More Debian8 for Beginners
Table of Contents
This is the second volume in a two-bookseries; the first volume is Debian 8 for Beginners.
This book is the companion or sequel toDebian 8 for Beginners. This volume assumes that you haveread the first already, or that you at least understand what istaught there. It is not that the subjects covered here are moreadvanced, but they are more of the same level of tutorial thatcovers things not appropriate for a bare introduction. This volumetakes you farther along the same beginners path.
As with the previous volume, I recommend youread through the book before trying any of it.
The firewall is simple. You probablyunderstand the original concept: There is something you really needto use, but which is troublesome. So you build a barrier betweenyourself and the trouble to reduce damage when it catches fire. Soit is with computers and the Internet. Unless you have no use forthe global communications network, you'll need an electronicfirewall to prevent damage to your computer when you connect.
It would be impossible to cover every sort ofconnection people use to get online. There are two configurationsmost common today: laptops with wifi and home computers withrouters. A great many people combine the two, with wifi routers intheir home. Frankly, the intermittent connection of a mobile deviceis safer for the device. But it's inconvenient to cut off your PCconnected by an ethernet cable during those moments when you haveno need for the Net. With a laptop, a great many people carry themaround to places with public wifi requiring they trust an unknownconnection, so it balances out in terms of risk.
The simplest answer on Debian is a packagecalled ufw. Install that. To make it work properly is simplicityitself; two commands from your root account:
ufw enable
ufw default deny
The first turns it on. The second tells yoursystem to ignore anything that isnt a response to some traffic yousent out. Both of those should result in some feedback on the CLI,so don't be surprised by what appears as warnings. Unless themessage indicates something isnt working, it's okay thosemessages let you know that the instructions were receivedproperly.
The other smart defense is already in place.Debian by default does not run any services that you dont actuallyneed. This is easily one of the biggest problems with Windows. Forthe sake of user convenience, there is a standard profile ofservices that are running in the background on Windows. If youunderstood it better, you would wonder about some of them. They areobviously there for the convenience of someone else, not you. Evensome of the bigger Linux projects tend to do this, particularly theones designed for the commercial workstation market. However,Debian tends to the minimum actually needed.
One of those extras you might want on Debian,though, is keeping the clock updated on Internet time. Its a minorthing, but some systems tend to drift in time keeping, causing amismatch here and there between your system and the rest of theworld.
Again, the answer is simple: Installntpdate. The thing sets itself up automatically and seldom needsany configuration. Your only consideration is realizing that, whenyou bring you system up from sleep mode or hibernate mode, theclock may take a few moments to synchronize. So far, there hasnever been any significant security risk from using this kind ofservice.
In the first volume of this series, I notedthat Debian provides an opulent collection of CLI utilities. One ofmy favorites is units converting various units of measure. Ittakes a little getting used to, but its fairly simple.
Lets say I want to convert feet to meters.On the CLI (no need for root), I simply type units. Theprompt says something about exchange rates (it does currencies) andoffers some statistics on how many units it can convert. It asks mewhat I have to convert, so I type in at the prompt that I have 50feet. Next, it asks what unit I want in conversion of the samemeasure. Heres how it looks:
You have: 50 feet
You want: meters
* 15.24
/ 0.065616798
You have:
It comes back with the answer plus theconversion rate it used. Then it waits for you to submit somethingelse. If you are finished, simply hit CTRL+C.
That CTRL+C is a standard for stoppingsomething that runs on Unix-type CLI, as well as some other OSes.Another CLI trick is that you can read all about the unitscommand on the CLI by typing man units. The Linux mancommand is short for manual and covers virtually everything youcould type on the CLI. For future reference, if you need tounderstand more about a particular command on the CLI, you canusually find a manual page (manpage) covering it. If you dontknow the command, but have some idea of the proper term forsomething, you can ask if there is anything appropriate: apropos[something].
Get used to seeing that kind of notation,with some word in brackets indicating a variable that you supplybased on the context. If you type in apropos units, youllget a few lines of response with some text summarizing what eachmanpage covers. You also get some numbers in parenthesis. Thatsimply indicates which catalog it belongs to within the manpagecollection. They are broken down into 9 catalogs based on how thedevelopers associate them in their own patterns of use. Its notlikely youll ever have much use for those numbers, but if you wantto know more, try the command man man. Its the manpage onmanpages.
A final small item I run across helpingpeople use Linux is gaming. That is, XFCE comes with no default setof simple games as other desktop environments (DEs) do. Ill startyou off with something simple: PySolFC. Thats short for PythonSolitaire, Fan Club Edition. Its an updated version of a very oldPySol package that the original developers abandoned. Because itsOpen Source, the code was there so a group of new developers (thefan club) revived the project and added some games and otherfeatures.
On Debian, search for pysolfc andpysolfc-cardsets. There will be some additional packages neededto make it work properly (dependencies), so youll need to allowthe installer to add them. Once installed, it will show up in themain menu under Games and you will discover that it has music andsound effects. You can search the menus and turn them off, if youlike, or any combination of those you like. You can also change theappearance of the cards and the tiles for the mahjongg games. Thereare hundreds of games hidden in this thing; you can easily get lostfor hours.
Some of the games you might find if you run asearch (apt-cache search game) will depend on the librariesassociated with some other DE besides XFCE, such as GNOME or KDE.That would mean installing sucks in a lot of dependencies. Considercarefully whether its worth it to you. Some of those extrabackground libraries of software can slow down your machine whilerunning the game. Do the research and ask questions.