gnu/linux laptop | lenovohome.eol.ca/~hgibson/lenovoslackware.pdf · 8 gnu/linux actually tracks...

26
GNU/Linux Laptop – Slackware Howard Gibson 2018/11/14 Contents 1 Introduction 1 1.1 Objective ............................. 1 1.2 Copyright ............................. 1 1.3 Why Linux? ............................ 1 1.4 Summary ............................. 3 1.4.1 Installation ........................ 3 1.4.2 DVDs ........................... 3 2 Hardware 4 2.1 Laptop ............................... 4 2.2 CPU ................................ 4 2.3 Memory .............................. 4 2.4 Hard Drive ............................ 4 2.5 DVD ................................ 4 2.6 Video Card ............................ 5 2.7 Monitor .............................. 5 2.8 Sound Card ............................ 5 2.9 Modem ............................... 5 i

Upload: dotram

Post on 20-Nov-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

GNU/Linux Laptop – Slackware

Howard Gibson

2018/11/14

Contents

1 Introduction 1

1.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.3 Why Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4.2 DVDs . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Hardware 4

2.1 Laptop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.3 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.4 Hard Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.5 DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.6 Video Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.7 Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.8 Sound Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.9 Modem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

i

Page 2: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

2.10 Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.11 Webcam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.12 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.13 Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.14 Slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Installation 7

3.1 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.2 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3.3 Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.4 Sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.5 Install Media . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.6 Text Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.7 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.8 Booting for the First Time . . . . . . . . . . . . . . . . . . . . 14

3.9 Root Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.10 User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.11 As Installed Partitioning . . . . . . . . . . . . . . . . . . . . . 16

3.12 The X Windows Interface . . . . . . . . . . . . . . . . . . . . 17

3.13 Exploring the Desktop – KDE . . . . . . . . . . . . . . . . . . 18

3.14 Exploring the Desktop – Xfce . . . . . . . . . . . . . . . . . . 19

3.15 Exploring the Desktop – Other Window Managers . . . . . . . 19

3.16 Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.17 Networking and Bluetooth . . . . . . . . . . . . . . . . . . . . 21

3.18 Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.19 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.20 More Software . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.21 More Security . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

A Backups 22

B Mounting a USB Stick While Installing 23

ii

Page 3: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

1

1 Introduction

1.1 Objective

Test the default installation of a popular GNU/Linux distribution, in thiscase, Slackware 14.2.

I have been installing Linux since 1995. I have been formally trained in UNIXadministration. I have developed all sorts of installation and usage habitswhich are of no interest to ordinary people who might be tempted to installLinux. The install instructions for my regular computers show all sorts ofcustomizations I like to do.

I want to know how easy it is for an ordinary mortal to install Linux. I willdo a standard installation. I will customize only if something important ismissing. I will not use vi.1 I will use the editor nano if absolutely necessary,but I will use easily located graphical administration tools whenever possible.

The OS is Slackware 14.2, downloaded from Slackware’s website, 2018/02/11The installation was on 2018/11/06.

1.2 Copyright

This document is copyright c© 2018 by Howard Gibson. You may post thison web pages and bulletin boards free of charge. All other rights are reserved.

1.3 Why Linux?

Linux is Free Software. Your computer should not be encumbered by copy-rights and Digital Rights Management (DRM). Proprietary software publish-ers are trying so hard to prevent unathorized copying that they can preventyou from installing and using copies you purchased, and are authorized touse. Also, if you cannot run the application you used to create your data,you don’t own your data!

1 Bill Joy from Sun Microsystems, wrote vi back in the seventies. It is the standardUNIX system administration text tool, and UNIX/Linux administrators are expected toknow it.

Page 4: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

2 1 INTRODUCTION

Linux is not hard to install on most computers. The latest “bleeding edge”video and sound cards may give you trouble. If you are buying a new com-puter, you should do some research on the hardware. If your computer isolder, Linux should have all the drivers you need. You need to research Linuxsupport on printers and scanners. Not everything works.

A basic Linux install will include some very good graphics programs, par-ticularly GIMP, a good substitute for Adobe Photoshop. Just about everyprogramming tool is available for Linux, except for the proprietary Microsoftones like Visual Basic and C#.

Linux can run efficiently on older, slower computers, because you can selectsmaller, faster user interfaces and applications. Install the window managersXFCE and LXDE. Libre Office is a credible alternative to Microsoft Officebecause it is just about as bloated as Microsoft Office. Try the word processorAbiWord, and the spreadsheet Gnumeric. You could learn to use LATEX,whose files are edited with a text editor.2

Linux is less capable at video games and multimedia. There are lots of FreeSoftware computer games out there, but the best stuff is commercial andproprietary. Few publishers support Linux.

The big problem with Linux and multi-media is ideological. Most mediaformats are proprietary. GNU and Linux are the work of Free Softwarepeople, who are reluctant to support proprietary formats. If you spend anhour or so surfing GNU.org , you will understand who you are dealing with.The GNU “Copyleft” really is a copyright. All copyrights are supported bythe Free Software community.

Linux can be made to support multi-media. I watch YouTube and Netflixon my Linux box. I can watch most commercial DVDs. Don’t expect theFree Software community to knock itself out to help you.

For more information on the thinking behind Free Software, just follow thelinks. You can get support for most media formats. Just search Google forLinux multi-media support.

2 This document is maintained in LATEX. The best reference on LATEX is A Guideto LATEX 2ε by Helmut Kopka and Patrick W. Daly, Addison Wesley books. This bookprovides good document templates. I have not found other references to be useful.

Page 5: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

1.4 Summary 3

1.4 Summary

1.4.1 Installation

Slackware is the very first GNU/Linux distribution I ever installed, back in1995. This installation gave me a warm, fuzzy feeling of nostalgia. I lovedseeing the fortune cookie, and being able to select a cool console font. If onlythe Open Windows desktop was still available. . .

Slackware 14.2 does not have a user friendly installer. It is not idiot resistant.There is no convenient GUI3 support for wireless networking, Bluetooth, orthe firewall. The GUI does not launch by default. You have to update con-figuration files to change default run levels. There is no GUI support for useraccounts. For most people, these are do-not-install-Slackware issues. Slack-ware is not suitable for a non-hacker laptop. Non-hacker desktops should bekept behind firewalls.

Softare companies who support Linux, provide Debian and Red Hat packages,which work on Ubuntu and Fedora, respectively. Slackware is not supported.

This is too bad, since Slackware does some things rather well. I really likenot having to set up the Fortune Cookie. I like setting up the user accountsmy way. Slackware installs GIMP by default. I don’t understand why theother distributions don’t. Slackware installs lots of programming stuff bydefault. I did not test to see how extensive this was.

A very nasty difference between Slackware and Fedora in particular, is thatyour hard drive gets reformatted early in the installation. A Fedora instal-lation does not touch your hard drive until you finally hit the install button.This protects your hard drive. Less obviously, you spend significantly moretime in a Slackware installation, waiting for hard drives to format. With Fe-dora, you quickly set up your installation, and you wait for one long process.

1.4.2 DVDs

Download install images from the internet. These can be burned to DVDsand CDs, which is what I normally do. You can copy the image to aUSB stick. There are instructions for this on the internet. Many computerthese days do not have CDROM/DVD readers.

3 Graphical User Interface.

Page 6: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

4 2 HARDWARE

If you are interested in Linux, buy one of the books. Periodically, I buy one ofthe Linux Bibles. You get documentation, and you support the community.Before you visit the bookstore, check the internet and find out what versionsof Linux are current. The stores sell surprisingly old books, often on a shelfright next to the current book that you ought to be buying.

2 Hardware

This is a Lenovo Thinkpad T400. I purchased it second hand at Laptops forLess, at 3358 Lakeshore Blvd, in Etobicoke, Ontario.

The machine has a double density DVD burner, an Ethernet connection, andthree USB ports.

2.1 Laptop

Lenovo Thinkpad Model 6475GZ5, Serial Number R8-GEFYN 09/11

2.2 CPU

Intel Core 2 Duo CPU P8400 2.26GHz

2.3 Memory

It came with 4GB, in the form of two 2048MB DDR3 SD-RAM.

2.4 Hard Drive

ATA HDD0: Hitachi HTS723216L9SA60-(S1) listed at 160GB.

2.5 DVD

ATAPI CD0: Matshita DVD-RAM UJ862A-(S2)

Page 7: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

2.6 Video Card 5

2.6 Video Card

Intel HD graphics with up to 1.6 GB of shared video memory. This supportsan external monitor 1920x1200 16 million colours.

2.7 Monitor

14.1” 1280x800, and 16 million colours

2.8 Sound Card

Realtek codec ALC269 with 2-channel High-Definition (HD) audio

2.9 Modem

Protocols & Specifications: ITU V.90, Max Transfer Rate: 56.0Kbps, Fea-tures: V.92 upgradable.

This is a “soft” modem requiring drivers, as opposed to a hardware modemthat just works. Linux drivers probably are available, but they are not FreeSoftware. When was the last time you used a modem?

I have gotten these modems working way back in the distant past.

2.10 Keyboard

Laptop keyboard with touch-pad and nipple. Cool! Also, there are two sets ofmouse buttons. The buttons near the nipple include a middle button. Withthe X Windows System graphical user interface, this is very good indeed.

2.11 Webcam

Oh oh!

1.3 megapixels with digital microphone. This camera has an LED that goeson when the camera is running.

Page 8: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

6 2 HARDWARE

Gnome comes with something called cheese to operate webcams.

I have tried running cheese remotely, using another computer as the display.It could not find a device. This is good. We do not want the webcam runningremotely.

Recent articles in the news show that webcams and impressionable younggirls are a bad combination. I don’t have a young girl, impressionable orotherwise, so there is no problem for me. I will refrain from taking myclothes off when asked. I promise!

Facebook is being blamed for recent teen suicides. Facebook does not havea live “please take your clothes off” feature. I suspect that the real culpritis Skype, which is available for GNU/Linux.

Like all other web-enabled devices, the webcam in your daughter’s bedroomwill be inaccessible to the internet if it does not exist. My newer Lenovolaptop does not have a webcam.

2.12 Network

Integrated 10/100 Ethernet LAN

Atheros XSPAN BGN (802.11BGN) wireless

Bluetooth V2.1 technology

Wireless: 802.11 a/b/g/n (draft), Bluetooth 2.0, Network Interface: GigabitEthernet

2.13 Battery

6-cell Lithium ion

I have replaced this with a higher capacity battery, which give me a lifespanof around four and a half hours.

2.14 Slots

ExpressCard/54

Page 9: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

7

3 Installation

3.1 Planning

I have replaced this machine with a newer, faster laptop. This now is a playtoy.

Newer machines all are 64 bit. GNU/Linux is a good way to extend thefunctional life of older machines. Google Chrome is available for GNU/Linuxin 64 bit, only.

I will treat this as a user’s primary computer. The machine must have emailand web surfing tools, as well as a Microsoft Windows compatible office suite.The ability to read and to save files in Microsoft DOCX, XLSX and PPTXis necessary.4

The user may have a family, and they may want to create extra accounts.

Programming is not necessary, but I will look at this as an option. A homecomputer, as opposed to this laptop, may be used as a central file server. Iwill look into this, too.

3.2 Security

This machine is a laptop. I expect it to be transported out of the home, andconnected to the internet in coffee shops, and in schools and colleges.5 Evenif the machine is kept at home, it may be plugged directly into an internetmodem. Wireless routers act as firewalls, but not everybody has one. Wewill activate and test the firewall.

If your laptop gets stolen, the best thing you can have is an encrypted harddrive. The bad guy will have your hardware, but your data will not beaccessible. An encrypted installation is not necessary for a desktop or serverthat stays at home, but this is a laptop.

4 If you share office files, you should stick with the older DOC, XLS and PPT formats.If people’s computers ain’t broke, they don’t fix them.

5 The Toronto Transit Commission provides WiFi in its subway stations.

Page 10: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

8 3 INSTALLATION

3.3 Partitioning

GNU/Linux installers break the hard drive up into separate partitions.

There are two important issues with partitioning. I assume you plan touse your computer for a fairly long time. Eventually, you will want to re-install GNU/Linux to get a more advanced version, or perhaps, a differentdistribution.

1. You need a root partition large enough to hold the newer version of theOS.

2. You do not want to harm your /home partition. This is where all ofyour data will be stored.

3. Slackware recommend a swap partition.

Device Memory Filesystemroot 40GB ext4

swap 20GB swap/home 100GB ext4

160GB

We will not bother with the traditional /usr/local partition this time.

3.4 Sudo

There are two ways to administer UNIX/Linux. You can have a root account,or you can use sudo.

Historically, UNIX type systems are installed with a super user account calledroot. This account has complete write access to everything on the computer.This is dangerous. Good practise is not use this account for anything otherthan system administration. When you are logged in as a regular user, yourability to damage your system is drastically reduced.

When you open any sort of UNIX/Linux terminal or shell, you are promptedby a text string ending in a dollar sign, $.6

6 The command line prompt is configurable. Fedora’s current default is to show theuser name, the computer name and the current directory. If you want to change this, youwill have to read up on it.

Page 11: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.5 Install Media 9

When you log in as root, the prompt changes to a pound sign, #, also calleda hash sign in the computer world. This is a sign of danger. The hash signsays you are root, and you can trash the system if you are not careful.

An alternate approach for all this is to not have a root account. A group ofusers are designated as administrators. To issue a root command, they go

$ sudo nano /etc/group

The system prompts for the user password. The resulting increased accesscontinues throughout the session.

This is used on Ubuntu Linux and on MacOS. I prefer to keep the root ac-count. When I am logged in as root, I can see the hash sign, and I know thereis a threat. On a single user machine, like mine, sudo makes administrationeasier, and reduces the number of strong passwords you need to track. Thismay be one of those six of one, half dozen other issues.

Up to version 27, Fedora creates a root account. Fedora 28’s default installset up sudo.

3.5 Install Media

The files you download from the distribution websites are ISO files. These areused to create potable DVDs or USB sticks. I find DVDs easier to manage.If your machine lacks a DVD reader, you will have to search the internetto find out how to install an ISO image onto your USB stick. The ISO forUbuntu 16.04.5, 32bit, is 1.6GB. Any cheap old USB stick will work. Ifyour computer will not boot from USB, you will have to pick up a USBDVD reader.

3.6 Text Editing

This document is written mostly with the text editor vim, a version of vi.This is an extremely efficient and productive editor once you learn it, espe-cially if you are a touch typist, like me. It is especially efficient with largedocuments, since you can navigate by doing the text seaches through the

Page 12: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

10 3 INSTALLATION

command line. It is the text editor of UNIX and Linux geeks everywhere.Unfortunately, it is mindbogglingly not user friendly.

Linux newbies need to try something else. You need a text editor that runsin a terminal session. You don’t always have the X Window System runningwhen you do administration.

The text editor nano, is available and strongly recommended. You navigatearound the text file using the arrow keys, just like you think it should. Ithas a CTRL key menu at the bottom of the screen.

When you are told to edit configuration files, use nano.

3.7 Installation

I am plugging this thing into the network because Slackware’s wireless sup-port is not good. I will try to make it work once I have everything installed.

1. Insert your DVD and boot the computer.

2. The “boot” window comes up immediately. The machine will boot onits own if you leave it, but you can hit [Enter].

3. Slackware is loaded off the DVD. There is no X11R6 graphical userinterface. You are prompted for a keyboard map. I hit [Enter] again.

4. We are now in the Slackware login window. Type root, and hit [En-ter].

5. I am informed that to partition my hard drive, I must use the commandcfdisk or fdisk. To install, I must run the command setup.

6. Type cfdisk, then hit [Enter].

7. You should see a partitioning table, showing partitions, and free space.

8. Delete any existing partitions.

9. Select [New].

10. As per our partitioning scheme, type 40G, for 40GB.

Page 13: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.7 Installation 11

11. Select [Primary].

12. Make the partition [Bootable].

13. Select the “Free space” line, and select [New].

14. Type 20G, and [Primary].

15. Still on that line, select [Type].

16. Select “82 Linux swap”.

17. Select the “Free space” line and [New].

18. Accept 89.1G for approximately 100GB, and make it [Primary]. Thetable should look like this, excluding the sectors.

Device Boot Size Id Type/dev/sda1 * 40G 83 Linux/dev/sda2 * 20G 82 Linux swap/dev/sda3 * 89.1G 83 Linux

This is your last chance to not wipe out whatever is on your hard drive.

19. Select [Write]. It asks if you are sure. It expects you to type out thefull word “yes”. Do so.

20. Select [Quit]. It claims it quit without writing to the partition table,but your partition table has been written to. You can check this byrunning cfdisk again.

21. We are back on the Slackware command line. Type setup.

22. The “Slackware Linux Setup” windows comes up. Go ahead and readthe Help file.

23. Select ADDSWAP.

24. It gives you the choice of /dev/sda2. Hit [OK]. You can check for badblocks while formatting the swap partition. This takes a while. Hit[OK] when it is done.

25. Now it wants you to select a root partition. Select /dev/sda1.

Page 14: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

12 3 INSTALLATION

26. You can select the quick format. I selected Check for a slow format,checking for bad blocks. I selected the file system ext4. Again, for-matting takes a while.

27. Now, select /dev/sda3, [Check] and ext4, and then wait again.

28. When it prompts you for where you want the partition mounted, typein /home.

29. When it shows you the table for /etc/fstab, hit [Enter].

30. When you are asked to select install media, select your CD or DVD.

31. I told it to scan for the CD/DVD. It found it at /dev/sr0.

32. For package selection, I selected everything except international lan-guage support. This is the default setting. I hit [OK].

33. Under “Select Prompting Mode”, I selected Full.

34. The install begins. It takes around 20 minutes. All sorts of interestingtext goes scrolling by, too fast to read.

35. At the end, you are prompted for a boot USB stick. What the heck.4GB USB sticks are cheap.

36. [Continue] the configuration.

37. Select a Simple lilo installation.

38. Use standard frame butter console.

39. You can append things to the lilo command line. I did not bother.

40. Use UTF-8 text console? [No].

41. I installed LILO to MBR.7 MBR is the default selection. Note how I havemade the partition bootable.

7 My Slackware installation was done over an older GNU/Linux installation that usedGrub. When I booted the installed Slackware system, I got grub. Grub went looking forFedora, I think. There was no way to get to Slackware. Install Lilo to MBR!

Page 15: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.7 Installation 13

42. I was asked to configure a mouse. I used the default selection of[imps2], Microsoft PS/2 Intellimouse.

43. Do I want to run gpm at boot time? [Yes].

44. Configure my network? [Yes].

45. I entered my hostname Lenovo.

46. I entered by local domain name rev.

47. My configuration type is [DHCP]. This should work with my wirelessrouter.

48. I don’t have a DHCP Hostname.

49. I confirmed my network setup by selecting [Yes].

50. When asked about start-up services, I turned on rc.cups. I left every-thing else as it was.

51. I want to try screen fonts. You want something that draws bordersaround console windows. I like scrawl w.fng.gz!

52. Your hardware clock should be set to UTC.

53. I set my timezone to America/Toronto.

54. Slackware does not support Gnome. The fancy window manager isKDE. I selected the smaller, faster Xfce.

55. I set root’s password.

56. I can now reboot my system!

57. Back in the Slackware Linux Setup menu, select [Exit].

Page 16: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

14 3 INSTALLATION

3.8 Booting for the First Time

There is a big Slackware screen. Below, there is text asking you what OS toboot. Hit [Enter].

When the system finishes booting, you are in a text window, not the X Win-dow System. The only user account on the system is root’s.

Log in as root. Let’s explore the system a bit.

When you log in, the system prints a joke. This is the fortune cookie. It hasbeen installed, This feature must be installed and configured on most otherGNU/Linuxes.

The text editor nano has been installed. This also is very good. The old vi

editor is a nasty thing to spring on a newbie.

3.9 Root Email

You have some.

At the command line type. . .

# alpine

Alpine is an adequately user friendly, command line email tool. There isa command menu at the bottom of the screen. You can read the emailsSlackware has sent you!

3.10 User Accounts

There is a command adduser, but configuring the user files is not very diffi-cult.

Type the following command. Note pound sign (#) prompt. You are loggedin as root. Be very, very careful.

# cat /etc/group

Page 17: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.10 User Accounts 15

The command cat prints text file contents to the screen. Towards the bottomof the output, you will see the line. . .

users:x:100:

Slackware assumes that all users should belong to one group. I like thisconcept.8 Now, we are going to add a user named “howard”.

# nano /etc/passwd

The text editor nano has a command menu at the bottom of the screen. Atthe bottom, you should see the line. . .

nobody:x:99:99:nobody:/:/bin/false

Move to the line and cut it using [CTRL-K]. Go [CTRL-U] twice, recov-ering the line, and adding a copy. Edit the second line as follows. . .

howard:x:1000:100:Howard Gibson:/home/howard:/bin/bash

Code Functionhoward User’s login name

x Password placeholder.1000 User number100 User’s group number. This is users as shown above.

Howard Gibson The user’s actual name/home/howard The user’s home directory

/bin/bash The user’s command shell.

Way, way back in the past, the users’ encrypted passwords were stored in/etc/passwd. This turned out to be a security hole, and it is no longer done.

# nano /etc/shadow

This is where the encrypted passwords are stored now. This file has waytighter security than /etc/passwd.

Copy the line nobody:*:9797:0:::::, and change the second “nobody” to“howard”.

Now, to create the user directory. . .

8 GNU/Linux actually tracks the group number. “users” is the text it spits out to thescreen to represent the group number. If you were to replace “users” with “family”, youwould change the text down in detailed directlory listings. Maybe this appeals to you.

Page 18: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

16 3 INSTALLATION

# mkdir /home/howard

# chown howard /home/howard

# chgrp users /home/howard

# chmod 755 /home/howard

# passwd howard

# ls -l /home

We created the directory /home/howard. This is located on the /home parti-tion. We set howard as the owner of the directory. We set users at the groupof the directory. We set the file permissions on /home/howard to read, write,execute for howard, and read, execute for everyone else.9 The last thing wedo is list /home. You should see a directory called howard, owned by howardand by the group users.

Do this for each and every user you want on your system.

3.11 As Installed Partitioning

I am showing you here how the disk drive got partitioned. There is no needfor you to do this.

The following output was done immediately after installing GNU/Linux, Thecommand fdisk can wipe out everything on your hard drive, so use it withextreme caution. Here, I read the partition table, then I exited withoutsaving anything. I see no reason why an ordinary user should run fdisk.10

root@Lenovo:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.27.1).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Command (m for help): p

9 Read my UNIX Command Line HOWTO for an explanation of directory and filepermissions.

10 If you are in fdisk, Enter the command “q” to quit without saving changes.

Page 19: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.12 The X Windows Interface 17

Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0x95196d6f

Device Boot Start End Sectors Size Id Type

/dev/sda1 * 2048 83888127 83886080 40G 83 Linux

/dev/sda2 83888128 125831167 41943040 20G 82 Linux swap

/dev/sda3 125831168 312581807 186750640 89.1G 83 Linux

Command (m for help): q

root@Lenovo:~# df

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/root 41153856 8324736 30715584 22% /

devtmpfs 2008664 0 2008664 0% /dev

tmpfs 2009080 1056 2008024 1% /run

tmpfs 2009080 0 2009080 0% /dev/shm

cgroup_root 2009080 0 2009080 0% /sys/fs/cgroup

/dev/sda3 91777928 57040 87035740 1% /home

cgmfs 100 0 100 0% /run/cgmanager/fs

root@Lenovo:~#

3.12 The X Windows Interface

In Slackware, the X Windows System is not activated by default. We wantit activated.

# nano /etc/inittab

Look for the following lines. . .

# Default runlevel. (Do not set to 0 or 6)

id:3:initdefault:

Page 20: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

18 3 INSTALLATION

Change the 3 to a 4. . .

# Default runlevel. (Do not set to 0 or 6)

id:4:initdefault:

Run level 3 is multi-user mode. Run level 4 launches the X-Window System.

# reboot

When it reboots, you will have a graphical screen, and you can log into yournew account.

3.13 Exploring the Desktop – KDE

Slackware’s default window manager is KDE. I could have sworn I selectedXfce. Maybe I didn’t. Let’s explore KDE.

There is an icon bar across the bottom of the screen, just like on the screenof a certain Redmond, Washington based OS supplier.

You can see the Firefox browser icon on the icon bar. Click on it to launchFirefox.

There is sort of a globe/gear sort of thing that turns out to be the Konqueror“web browser”. Konqueror is KDE’s answer to Microsoft Internet Explorerin that it is a browser and a file manager.

Now, we look for an office suite. Click the KDE icon at the bottom left handside of the icon bar. Click the Applications button. Select Office. SelectWords or Spreadsheet. What you get is Calligra, not Libre or Open Office.Calligra uses the same Open Document format that Libre and Open Officeuse. I have not played extensively with Calligra. It seems to work. I don’tknow how compatible it is with Microsoft Word. Libre and Open Office bothare pretty good.

I went looking throught the graphics applications, and I found GIMP. If youhave a camera, you need GIMP. I don’t understand why Ubuntu and Fedorado not install this by default. Advantage Slackware.

Page 21: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.14 Exploring the Desktop – Xfce 19

I like command line terminals. There is a terminal icon on the icon bar, soI clicked it. Yes, it is a command line terminal. To make the fortune cookiework, I need to configure this thing as a login terminal. I cannot find theconfiguration for this anyway. Rats!

3.14 Exploring the Desktop – Xfce

I meant to use this as the default desktop. On the login window where youtype in your name and password, there are two buttons at the bottom lefthand. Click on the down-arrow icon, and select Xfce Session.

Xfce is a lightweight window manager. I don’t like fancy window managers.I want to use CPU cycles and RAM for my applications. On older, slowercomputers, I strongly recommend lightweight window managers like Xfce orLXDE.

Xfce’s icon bar is at the top of the screen. There is an “Applications” iconat the left hand side. Over on the right hand side, you see four rectangles,which we will look at later.

Pull down the Applications menu. The web browser is Firefox. The emailtool is Thunderbird.

Launch the terminal. Click on Edit. Click on Preferences. Click on Run

command as login shell. The next time you launch this terminal, you willget the fortune cookie!

Otherwise, you get the same applications as with KDE.

Launch Firefox. Look at the four boxes on the right hand side. A Firefoxicon appears in one of the boxes. Click on one of the other boxes. Pull downthe Applications menu, select Office, and Calligra Words. One of theboxes now has a Firefox icon, and another has a Calligra Words icon. Youcan select windows by clicking on the boxes. This is the X Windows pager.Most X11 window managers do this.

3.15 Exploring the Desktop – Other Window Man-agers

Slackware installs a whole bunch of window managers.

Page 22: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

20 3 INSTALLATION

Default

Custom

Blackbox

FVWM I have been using FVWM since 1996, and I have it set up exactlythe way I like it. Setting it up will take some time and research.

Fluxbox

KDE Plasma Workspace Described above.

KDE Plasma Workspace (failsafe session)

MWM Motif, I think. This was an important window manager back in the90s.

TWM Tab Window Manager. This is very old.

WindowMaker

Xfce Session I recommend this. It is described above.

Failsafe

Have fun exploring all this.

3.16 Firewall

On any machine not located behind a firewall, this is absolutely critical.Slackware does not have a graphical firewall tool.

There is a lot of security information here. . .

https://docs.slackware.com/howtos:security:basic_security

I followed the instructions and got a firewall installed, but did not test itthoroughly. The secure shell daemon (ssh) allowed me to log in remotely.I activated the Apache web server (httpd), and I accessed it remotely, i.e.,through the firewall.

To run a networked service like ssh or httpd, you have to do two things.You have to run the service, and you have to allow it through the firewall.

Page 23: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

3.17 Networking and Bluetooth 21

For security purposes, you must close the firewall. Even if the service is notrunning, the hacker sees the open port, and knows that there is a hackablemachine.

If you want to manually set up your firewall, you can read the web pageabove, and read up on iptables. You can go to Gibson11 Research at https://grc.com and test your firewall using their Shields Up feature.

3.17 Networking and Bluetooth

Slackware configures your wired network at installation. There is no graphi-cal configuration.

There is no graphical support for wireless or for Bluetooth. Slackware is nota suitable OS for a laptop.

3.18 Printer

From Xfce, I pulled down the Applications menu, I located Settings, andthen Manage Printing. The “Print Settings” window gave me the option ofadding a printer. I clicked on this. I was prompted for root’s password. Ifollowed the prompts, and Slackware found my network printer and installedit.

3.19 Programming

I did a quick search for cc, g++, make, perl, python, ruby, and f77 (Fortran).I found them. Slackware is a programming platform.

3.20 More Software

Software vendors who support GNU/Linux, support Debian (Ubuntu) andRed Hat (Fedora). They mostly do not support Slackware. Slackware’s web-site provides instructions for installing Google-Chrome from Debian .deb files.

11 No relation.

Page 24: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

22 A BACKUPS

If you want to install games and other software, you need a different GNULinuxdistribution.

Back in the day, we installed software by downloading, compiling and in-stalling from the source code. It was a fairly reliable process, although oftenit required some programming skill. Slackware comes with a lot of program-ming tools, so this may still often work. I did not test it. As the interestingapplications get more complicated, installations from source are less and lesslikely to work. Software updates are a lot of work this way.

3.21 More Security

Slackware lacks convenient tools for wireless and for firewall configuration.Slackware is not a good GNU/Linux distribution for your laptop. You needto keep this thing behind a firewall, where fancy security procedures are notneeded.

There is no point in lining your hat with aluminium foil.

A Backups

You need a strategy for backing up your hard drive.

I have had an administered, backed up hard drive since 1996. I was takingsome college courses, and getting involved in a ski club in 1998. My emailsand working files are still on my hard drive, although I used at least onecommercial application I cannot get working at the moment.

The primary threat to my data has been me stupidly deleting things, some-times realizing this months later. My primary hard drive has died on me. Ilost no data.

At present, I have two backup devices on my primary computer, a 4 terabytehard drive, and a Blue-ray burner. My automatic nightly backup is doneto the 4TB drive. Periodically, I copy my latest backup to a double densityBlue-ray disk, which has a capacity of 50GB. These are stored in my house,away from my computer. If I really wanted to be thorough, I could rent asafety deposit box at the bank, and store my backup Blue-rays there.

Page 25: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

23

Optical disks, like Blue-rays, are disappearing off of new computers. I amconcerned that it will become hard to find Blue-ray disks, especially thedouble density ones. I love Blue-rays because the individual disks are cheap,and suitable for single use. I have recovered data months after having deletedit.

The Blue-ray requires me to limit the disk space I use. My biggest directoriesare my digital photo directory, and my email, which is archived at least backto 1997. I archive my digital photos to DVD. I am not intensively doinggraphical design, or engineering CAD.

The Cloud is an excellent resource for temporary sharing of information.As a long-term backup of information with security issues, it is risky. Askyourself why such a service is provided free. Assume that data uploaded toa free server is being scanned. Can you say “data mining”? An NDA12 willbe worthless when the owners of the server go out of business, and the bailiffsells their equipment to the highest bidder .

Consider how you store your backup media at home. If you are concernedabout security, you should store your backups in a locked cabinet or a safe.Once your backup has been transported to another Linux machine, it isaccessible to whoever has that root access.

You can encrypt your backups, but this makes it more difficult to do recov-eries. I try to avoid compressing my backups, because this takes time, andit can introduce data errors.

I may have to switch to portable USB drives. Tape drives still are available,and they have huge capacity. The tapes do not appear to be particularlycheap.

B Mounting a USB Stick While Installing

Maybe you will need to do this.

I was having some problems with an install, and I decided to mount myUSB stick. During the install routine, this is fairly easy. Hit ctrl+alt+f4.Log in as root. You should not need a password. Insert your USB stick. Youwill see a gibberish message on the screen with something like /dev/sdb.

12 Non Disclosure Agreement

Page 26: GNU/Linux Laptop | Lenovohome.eol.ca/~hgibson/LenovoSlackware.pdf · 8 GNU/Linux actually tracks the group number. \users" is the text it spits out to the screen to represent the

24 B MOUNTING A USB STICK WHILE INSTALLING

This is your USB device. You need to create a file system as a mount point,then mount your stick.

# mdkir /usb

# mount /dev/sdb1 -o auto /usb

The mount command, above, specifies the device. Note that it is /dev/sdb1,not /dev/sdb. The -o auto tells Fedora to figure out the file system type.You could specify vfat, which probably is what it is, but why?

Now, you can copy files, or back up data. See my article on the UNIXCommand Line.

Now, you need to get back to your installation window. On Fedora andUbuntu, ctrl+alt+f1 should do it. Anything up to ctrl+alt+f7 will pro-duce a terminal.