0% found this document useful (0 votes)
115 views123 pages

Getting Started With Comptia Linux+ Training Course

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 123

Getting Started with

CompTIA Linux+
Training Course

CompTIA Linux+ Training


Instructor: Veronica Henry

Getting Started with CompTIA Linux+ Training Course


CompTIA Linux+ Training

In This Lesson:
 Who is Your Instructor?
 What We Will Be Doing
 How to Use This Course

Getting Started with CompTIA Linux+ Training Course


CompTIA Linux+ Training

Who is Your Instructor?


• Veronica Henry
• Over 20 years of IT experience
• MCP, MCSE, MCSE +Internet, GIAC (GSEC), PMP, Linux+,
Novell CLA, LPIC-1
• Volunteer in local community
• Sci-fi & Fantasy writer

1
Getting Started with CompTIA Linux+ Training Course
CompTIA Linux+ Training

What We Will Be Doing


• 2 part course covering:
– LX0-101 exam objectives
– LX0-102 exam objectives
• CompTIA suggests:
– At least a year of network administration experience
(Windows or Linux)
– Recommended CompTIA A+ and CompTIA Network+
certifications

Getting Started with CompTIA Linux+ Training Course


CompTIA Linux+ Training

What We Will Be Doing (cont’d)


• Topics covered in LX0-101 part:
– Linux Hardware Settings
– The Boot Process
– Runlevels and System Shutdown and Reboot
– Linux Installation Planning
– Package Management
– GNU and Unix Commands
– Linux Filesystems
– Managing User Resources with Quotas and Permissions
– Linux Links and System Files

Getting Started with CompTIA Linux+ Training Course


CompTIA Linux+ Training

How to Use This Course


• Start with the “Lab Setup” and “The Course Scenario” lessons
• Watch lessons in order
• Pause
– Take notes
– Practice the demonstrations
• Watch lessons again…and again
• Watch the Transcender lessons
• Watch “Preparing for Your CompTIA Linux+ Certification Exam”
lessons
• Watch the “Next Steps” lesson

2
Lab Setup

CompTIA Linux+ Training


Instructor: Veronica Henry

Getting Started with CompTIA Linux+ Training


CompTIA Linux+ Training

In This Lesson:
 The Lab Environment
 VirtualBox Setup
 Creating a Linux Virtual Machine

Getting Started with CompTIA Linux+ Training


CompTIA Linux+ Training

The Lab Environment


• Toshiba Satellite
• Intel core 2 duo - 2.10 Ghz
• 4 GB memory
• 250 GB hard disk
• DVD drive
• Dual-boot: Windows Vista and Ubuntu 10.04
• Oracle VirtualBox 3.2.8 (3.2.10 most current)

3
Getting Started with CompTIA Linux+ Training
CompTIA Linux+ Training

VirtualBox Setup
• Oracle VirtualBox
– Download from Oracle: www.virtualbox.org
• VirtualBox OSE
– Download from Oracle: www.virtualbox.org
– Install with Linux package manager
• Guest additions
– More seamless mouse pointer integration
– Video support (screen resizing)
– File sharing
– Shared clipboard

Getting Started with CompTIA Linux+ Training


CompTIA Linux+ Training

Creating a Linux Virtual Machine

Getting Started with CompTIA Linux+ Training


CompTIA Linux+ Training

Creating a Linux Virtual Machine

4
Getting Started with CompTIA Linux+ Training
CompTIA Linux+ Training

Creating a Linux Virtual Machine


• Fedora 13
– www.fedoraproject.org
• Launch VirtualBox
• Click New
– Enter virtual machine name
– Allocate memory
– Allocate virtual hard disk space
– Start & select .iso image
– Follow prompts to install product
– Install guest additions
– Reboot & login

Linux Hardware Settings


CompTIA Linux+ Training

What We Covered

 The Lab Environment

 VirtualBox Setup

 Installing a Linux Virtual Machine

The Course Scenario

CompTIA Linux+ Training


Instructor: Veronica Henry

5
The Course Scenario
CompTIA Linux+ Training

In This Lesson:
 The Globomantics Scenario
 The Globomantics Network

The Course Scenario


CompTIA Linux+ Training

The Globomantics Scenario


• Globomantics, Inc. is a national application development
company, specializing in business software and headquartered in
Dallas, TX.
– Dallas, TX headquarters
– Establishing New York, NY satellite office
• There are currently 500 employees, with one employee soon to
launch the New York satellite office. They have a mobile
salesforce of 10 employees. There are about 100 other
employees who telecommute from home, mostly in Texas, but a
few scattered across the United States.
• New CIO is a Linux enthusiast, so his first task is to convert all
their Windows servers to Linux. Existing Windows admins will
need to be retrained and prepared for certification.

The Course Scenario


CompTIA Linux+ Training

The Globomantics Network


Telecommuters Dallas, TX

New York, NY Internet

Road Warriors

6
Linux Hardware
Settings

CompTIA Linux+ Training


Instructor: Veronica Henry

Linux Hardware Settings


CompTIA Linux+ Training

In This Lesson:
 IRQs
 I/O Addresses
 DMA Addresses
 Boot Disks and Geometry
 Coldplug vs. Hotplug Devices
 Expansion Card Configuration
 Kernel Modules
 Configuring USB Devices
 Configuring Hard Disks

Linux Hardware Settings


CompTIA Linux+ Training

IRQs
• What is an IRQ
– An interrupt request sent to the CPU
• How does the system use IRQs?
– Keyboard control
– Timer control
– Open for new hardware additions
• Displaying IRQs in use
– /proc virtual filesystem
– cat /proc/interrupts

7
Linux Hardware Settings
CompTIA Linux+ Training

IRQs (cont’d)
IRQ Typical Use Notes

0 System timer Reserved for internal use


1 Keyboard Reserved for keyboard use
2 Cascade for IRQs 8-15 Original x86 architecture only
allowed for 8 IRQs, 2 is used
to handle IRQs 8-15
3 Second RS-232 serial port Can also be shared with a 4th
(Windows COM2) RS-232 port
4 First RS-232 serial port Can also be shared by a 3rd
(Windows COM1) RS-232 port
5 Sound card or 2nd parallel port
(Windows LPT2)

Linux Hardware Settings


CompTIA Linux+ Training

IRQs (cont’d)

IRQ Typical Use Notes

6 Floppy disk controller Reserved for 1st floppy


controller.
7 First parallel port Windows LPT1
8 Real-time clock Reserved for system clock use

9 Open interrupt
10 Open interrupt
11 Open interrupt
12 PS/2 mouse

Linux Hardware Settings


CompTIA Linux+ Training

IRQs (cont’d)

IRQ Typical Use Notes

13 Math coprocessor Reserved for internal use


14 Primary ATA controller The controller for ATA devices
like hard drives; usually
/dev/hda and /dev/hdb
15 Secondary ATA controller Controller for additional ATA
devices; usually /dev/hdc and
/dev/hdd

8
Linux Hardware Settings
CompTIA Linux+ Training

I/O Addresses
• I/O (Input/Output) addresses - Unique memory locations reserved
for communications between CPU and hardware devices
• Typical Linux Device Matrix
Linux Device Typical IRQ I/O Address
/dev/ttyS0 4 0x03f8
/dev/ttyS1 3 0x02f8
/dev/ttyS2 4 0x03e8
/dev/ttyS3 3 0x02e8
/dev/lp0 7 0x0378-0x037f
/dev/lp1 5 0x03f0-0x027f
/dev/fd0 6 0x03f0-0x03f7
/dev/fd1 6 0x0370-0x0377

Linux Hardware Settings


CompTIA Linux+ Training

I/O Addresses (cont’d)


• Determining which I/O ports are used on a system
– Contents are stored in the /proc/ioports file
– cat /proc/ioports

Linux Hardware Settings


CompTIA Linux+ Training

DMA Addresses
• Direct memory addressing
– Alternative method of communicating with I/O ports
– No CPU intervention
– Performance improvements
• Display DMAs in use on your system
– cat /proc/dma

9
Linux Hardware Settings
CompTIA Linux+ Training

Boot Disks and Geometry


• Boot device order
– Hard disk
– CD-ROM
– USB
• Removable disk considerations
– Security
• CHS geometry
– The history
– CHS challenges
• Logical block addressing
– Uses a single unique number for each sector on hard disk

Linux Hardware Settings


CompTIA Linux+ Training

Coldplug and Hotplug Devices


• Coldplug vs. hotplug
– Coldplug devices can only be attached/detached when
computer is turned off.
– Hotplug devices can be attached/detached while the
computer is on.
• Devices
– Coldplug: memory, cpu, hard disks
– Hotplug: USB drives or video cameras

Linux Hardware Settings


CompTIA Linux+ Training

Coldplug and Hotplug Devices


• Managing hotplug devices – 4 utilities
– D-Bus – desktop bus runs as a daemon (a program that
runs in the background at all times) and enables
communication between processes
– HAL Daemon (hald) – hardware abstraction layer daemon,
provides user space programs information about available
hardware
– Sysfs – virtual filesystem, mounted at /sys, that exports
information about devices
– udev – virtual filesystem mounted at /dev, that dynamically
creates device files as drivers are loaded and unloaded;
Configured via /etc/udev file

10
Linux Hardware Settings
CompTIA Linux+ Training

Expansion Card Configuration


• PCI devices
– Expansion cards added to the PCI bus
– Sound & video cards, firewire, etc.
• PCI configuration
– BIOS
– MMConfig
– Direct
– Any
• setpci
– Query and modify PCI device
configurations: setpci [options] devices operations
• lspci

Linux Hardware Settings


CompTIA Linux+ Training

Expansion Card Configuration (cont’d)


• Examining current PCI configuration lspci –option

Option Result
–v Increases verbosity, or depth of output; may also
include –vv or –vvv options
–n Displays results in number codes rather than
manufacturer or device name
–nn Displays manufacturer and device name, along with
numeric code
–x An advanced option that displays PCI configuration
space as a hexadecimal dump; may be tripled (–xxx) or
quadrupled (–xxxx)

Linux Hardware Settings


CompTIA Linux+ Training

Expansion Card Configuration (cont’d)

Option Result
–b Shows IRQ's and other data as
seen by devices instead of the
kernel
–t Displays a tree view showing
device relationships
–s [[[[domain]:]bus]:][slot][.[func]] Displays only devices that
match the listed specification.
Useful for limiting output
–d [vendor]:[device] Shows data for the specified
device

11
Linux Hardware Settings
CompTIA Linux+ Training

Expansion Card Configuration (cont’d)


Option Result
–i file Uses the specified file to map vendor and device IDs to
names; default is /usr/share/misc/pci.ids
–m Dumps data in a machine-readable format, for use by
scripts; single –m uses a backward compatible format, while
--m uses a newer format
–D Displays PCI domain numbers
–M Used only by root to perform a scan in bus-mapping mode,
which can reveal devices hidden behind a misconfigured PCI
bridge
–version Displays version information

Linux Hardware Settings


CompTIA Linux+ Training

Kernel Modules
• Linux drivers
– /lib/modules
• Determining the current configuration
– lsmod
• Loading modules
– insmod
• insmod /lib/modules/2.6.33/kernel/drivers/vhost/vhost.ko

Linux Hardware Settings


CompTIA Linux+ Training

Kernel Modules (cont’d)


– modprobe
• modprobe –C /etc/my.conf floppy
– –v or --verbose - displays extra information
– –C filename - modifies /etc/madprobe.conf config file
– –n or --dry-run - performs checks but not module
insertion
– –r or --remove - reverses modprobe
– –f or --force - forces module load even if kernel versions
don‟t match
– --show-depends - shows all modules on which the
specified module depends
– –l or --list - displays list of available options whose name
matches the specified wildcard

12
Linux Hardware Settings
CompTIA Linux+ Training

Kernel Modules (cont’d)


• Removing kernel modules
– rmmod
• rmmod vhost
– Options:
• –v or --verbose - displays extra information
• –f or --force - forces removal of a module, if its being
used (CONFIG_MODULE_FORCE_UNLOAD kernel option
must be enabled)
• –w or --wait - causes rmmod to wait for module to
become unused
– Consult man page for other options

Linux Hardware Settings


CompTIA Linux+ Training

Configuring USB Devices


• usbmgr - runs in the background and detects changes to the
USB bus
– /etc/usbmgr - for specific devices
– /etc/usbmgr/usbmgr.conf - for overall configuration
• hotplug
– /etc/hotplug
– /etc/hotplug/usb.usermap - contains a database of USB
device id‟s and pointers to scripts in /etc/hotplug/usb

Linux Hardware Settings


CompTIA Linux+ Training

Configuring USB Devices (cont’d)


• USB drivers
– lsusb command will tell you which USB devices are in use on
your system
• Options
– –v - verbose option, extended information
– –s[[bus]:[devnum] - restricts output to specified bus and
device numbers
– –d [vendor]:[product] - limits output to a vendor and
product
– –D filename - displays information about the device
accessible via indicated filename located in /proc/bus/usb
– –t - displays device list as a tree
– –V or --version - displays version of lsusb utility

13
Linux Hardware Settings
CompTIA Linux+ Training

Configuring Hard Disks


• PATA (Parallel Advanced Technology Attachment) disks – uses
parallel interface
– /dev/hda & /dev/hdb
• SATA (Serial Advanced Technology Attachment) disks - on most
modern computers; connects to the motherboard controllers on a
1-1 basis
• SCSI (Small Computer System Interface) disks - found on high end
systems; supports up to 8 or 16 devices per bus
– Hard drives: /dev/sdx
– Tapes: /dev/stx and /dev/nstx
– CD-ROM & DVD-ROM: /dev/scdx, /dev/srx
• External disks – USB thumb drives, firewire, SCSI device
– /dev/sdx device node

Linux Hardware Settings


CompTIA Linux+ Training

What We Covered
 IRQs
 I/O Addresses
 DMA Addresses
 Boot Disks and Geometry
 Coldplug vs. Hotplug Devices
 Expansion Card Configuration
 Kernel Modules
 Configuring USB Devices
 Configuring Hard Disks

The Boot Process

CompTIA Linux+ Training


Instructor: Veronica Henry

14
The Boot Process
CompTIA Linux+ Training

In This Lesson:
 The BIOS
 The Boot Loader
 The Boot Sequence
 The Boot Process and the Kernel
 Interpreting Log Files

The Boot Process


CompTIA Linux+ Training

The BIOS
• Basic Input Output System (BIOS) – located on your computer‟s
motherboard in ROM or flash memory
– Power on self test (POST), which tests system components
– Initializes hardware
– Loads the boot loader
– Hands off control to the boot loader
• BIOS functionality
– The role in the boot process
• BIOS configuration
– Function key access
• F1 or F2
– Save, ext and reboot
• F10

The Boot Process


CompTIA Linux+ Training

The Boot Loader


• Master Boot Record (MBR) - sits in boot sector of your hard drive
• Boot Loader - software program read by the BIOS at bootup
• Two boot loaders
– GRUB - Grand Unified Boot Loader
– LILO - Linux Loader
• MBR vs. boot sector

15
The Boot Process
CompTIA Linux+ Training

The Boot Sequence


• Outlining the boot process
– Power on the system
– The BIOS
– The boot loader
– Loading the kernel
– Initializing devices
– Mounting root partition
– Loading and executing system‟s initial program
• /sbin/init
• /etc/inittab

The Boot Process


CompTIA Linux+ Training

The Boot Process and the Kernel


• Boot messages
– Stored in kernel ring buffer
– /var/log/dmesg
• dsmesg command
– Navigating output
– Hardware names
– Hardware chipsets

The Boot Process


CompTIA Linux+ Training

Interpreting Log Files


• The system logger
– Sylogd
• /var/log/messages
• /var/log/syslog
• /var/log
• Onscreen viewing

16
The Boot Process
CompTIA Linux+ Training

What We Covered

 The BIOS
The Boot Loader


 The Boot Sequence
The Boot Process and the Kernel


 Interpreting Log Files

Runlevels, System
Shutdown and Reboot

CompTIA Linux+ Training


Instructor: Veronica Henry

Runlevels, System Shutdown and Reboot


CompTIA Linux+ Training

In This Lesson:
 Defining Runlevels
 Runlevel Services
 Managing Runlevels
 Checking and Changing Runlevels
 Managing Runlevels - Utilities

17
Runlevels, System Shutdown and Reboot
CompTIA Linux+ Training

Defining Runlevels
• What is a runlevel?
– An alternative mode of operation
– 7 runlevels, 0-6
Runlevel Description
0 Halts the system; since it switches
runlevel to another mode, this is a
transitional mode
1, s, or S Runs in single-user mode; services vary,
used primarily for maintenance
2 Debian: runs in multi-user mode with X
and a graphical login; undefined in other
distributions

Runlevels, System Shutdown and Reboot


CompTIA Linux+ Training

Defining Runlevels (cont’d)

Runlevel Description
3 Red Hat, Mandriva, Fedora and other
distributions, runs in multi-user mode with
command line interface
4 Unused; available for customization
5 Red Hat, Mandriva, Fedora and others,
same as runlevel 3 with graphical interface
6 Reboots the system

Runlevels, System Shutdown and Reboot


CompTIA Linux+ Training

Runlevel Services
• Defining services
– /etc/inittab - defines what programs will run in certain runlevel
• identifier:runlevel:action:process
– id (identifier) –1-4 characters that identifies function
– runlevel – list of runlevels for which this entry applies
– action – action to be taken
– process – tells Linux which process to run for this entry
• System V or SysV startup scripts - run all scripts that are
associated with the current runlevel
– /etc/rd.d/rc?.d, /etc/init.d/rc?.d, or /etc/rc?.d
– Symbolic links stored in /etc/rc.d, /etc/init.d, or /etc/rc.d/init.d
– Starting scripts manually with start command
• /etc/init.d/sshd start

18
Runlevels, System Shutdown and Reboot
CompTIA Linux+ Training

Managing Runlevels
• Configuring default runlevels
– Change 2nd value in /etc/inittab file command
• Specify which system processes are automatically started
• Modify runlevel from the command prompt
• Management utilities
– chkconfig
– ntsysv

Runlevels, System Shutdown and Reboot


CompTIA Linux+ Training

Checking & Changing Runlevels


• Determine runlevel with runlevel command
• Specify which system processes are automatically started
– Edit /etc/inittab
• Modify runlevel from the command prompt
– init/telinit
– shutdown
• Options:-now, -r reboot, -H halt, -P power off, -h halt or
power off
• shutdown –h +5 “save your data, reboot in 5” (-c cancel)
– halt
– reboot
– poweroff

Runlevels, System Shutdown and Reboot


CompTIA Linux+ Training

Managing Runlevels - Utilities


• Management utilities
– chkconfig
– chkconfig –-list

19
Runlevels, System Shutdown and Reboot
CompTIA Linux+ Training

Managing Runlevels - Utilities


• Management utilities
– ntsysv
– ntsysv –level 1

Runlevels, System Shutdown and Reboot


CompTIA Linux+ Training

What We Covered

 Defining Runlevels
Runlevel Services


 Managing Runlevels
Checking and Changing Runlevels

Managing Runlevels - Utilities

Linux Installation
Planning

CompTIA Linux+ Training


Instructor: Veronica Henry

20
Linux Installation Planning
CompTIA Linux+ Training

In This Lesson:
 Hard Disk Layout
 LILO Boot Manager Configuration
 GRUB Boot Manager Configuration
 Shared Libraries

Linux Installation Planning


CompTIA Linux+ Training

Hard Disk Layout


• Partitions - segment your hard drive
– Master Boot Record (MBR)
• Uses 4 primary partitions, one that can be used as a
placeholder extended partition, which will contain logical
partitions. (codes: FAT, extended, NTFS, swap, linux filesystem)

1st primary partition 2nd primary 3rd primary partition


partition/extended
partition
1st logical 2nd logical

Linux Installation Planning


CompTIA Linux+ Training

Hard Disk Layout (cont’d)


• MBR partitions have the following one-byte type codes:
– 0x0c (FAT)
– 0x05 (older type of extended partition)
– 0x07 (NTFS)
– 0x0f (newer type of extended partition)
– 0x82 (linux swap)
– 0x83 (linux filesystem)

21
Linux Installation Planning
CompTIA Linux+ Training

Hard Disk Layout (cont’d)


• Partitions
– GUID Partition Table (GPT)
• Intel‟s intended BIOS replacement for all x86 and x86-64
computers
• Reserved for disks bigger than 2TB
• Has 3 data structures:
– Protective MBR
– Header
– Partition table

Linux Installation Planning


CompTIA Linux+ Training

Hard Disk Layout (cont’d)


• Partitions
– Logical Volume Management (LVM) partitions
• Complex alternative to partitions
• Partition type codes of 0x8e
• Utilities
– pvcreate
– vgcreate
– lvcreate
– lvscan
• To access these volumes
– /dev/mapper/myvol-home

Linux Installation Planning


CompTIA Linux+ Training

Hard Disk Layout (cont’d)


• Common partitions & filesystem layouts (mount points)
Partition Typical Size Use
Swap 1-2 times system RAM addon, allows system to run
RAM more programs
/home 200MB – 1000GB Holds users‟ data files; Useful for
(or more) upgrades
/boot 20MB – 200MB Holds critical boot files; Separate
partition overcomes older BIO
limits and boot loaders on disks
over 8GB
/usr 500MB – 10GB Holds most Linux programs & data
/usr/local 100MB – 3GB Holds Linux unique programs and
data files (like those you compile)

22
Linux Installation Planning
CompTIA Linux+ Training

Hard Disk Layout (cont’d)


Partition Typical Size Use
/opt 100MB – 5GB Linux program and data files
associated with 3rd
(commercial) party packages
/var 100MB – 500GB Miscellaneous files, often
transient
/tmp 100MB – 20GB Holds users‟ temporary files
/mnt N/A Not really a separate partition,
but mount points for
removable media
/media N/A Like /mnt, holds subdirectories
that may be used as mount
points for removable media

Linux Installation Planning


CompTIA Linux+ Training

Boot Manager Configuration


• The boot loader revisited
– BIOS and the MBR
• Boot Managers / Boot Loaders
– LILO (LInux LOader)
– GRUB (GRand Unified Bootloader)

Linux Installation Planning


CompTIA Linux+ Training

Boot Manager Configuration - LILO


• Configuration file /etc/lilo.conf
– Options
• Boot
• Default
• Prompt
• Timeout
• Lba32
• Vga
• Root
• Read-only

23
Linux Installation Planning
CompTIA Linux+ Training

Boot Manager Configuration - LILO (cont’d)


– Per-image options
• Image, other, label, initrd, append
– Adding a Kernel
• Obtain root access
• Open up the /etc/lilo.conf file
• Copy and paste an existing stanza and modify the
appropriate information
• Change the label line
• Change the image line to point to your new kernel
• Save and exit
• While still logged in as root, type “lilo”. This will install
LILO in the MBR, and you‟ll see your stanza names
echoed on the screen.

Linux Installation Planning


CompTIA Linux+ Training

Boot Manager Configuration - LILO (cont’d)


– LILO command options:
• -C conf-file tells Linux to use a config file other than
lilo.conf
• -t tests the configuration
• -v is often used with -t, to see more information about
your changes
• -b bootdev specifies an alternate boot device

Linux Installation Planning


CompTIA Linux+ Training

Boot Manager Configuration - GRUB


• Configuration file: /boot/grub/menu.lst
• Options
– Default
– Timeout
– Splashimage

24
Linux Installation Planning
CompTIA Linux+ Training

Boot Manager Configuration - GRUB (cont’d)


• Per-image options
– Title
– Root
– Kernel
– Initrd
– Rootnoverify
– Chainloader
• Adding a Kernel
– Same steps as for LILO
– Reboot to have the changes take effect

Linux Installation Planning


CompTIA Linux+ Training

Boot Manager Configuration - GRUB (cont’d)


• Installing GRUB manually
– Use the command:
• grub-install device
• grub-install/dev/had
• grub-install „(hd0)‟
• Interacting with GRUB
– Arrow keys - to move up and down the kernel listing
– Pressing e - will allow you to edit that kernel option
– Pressing the enter key - to complete your edits
– Pressing b - to boot the computer

Linux Installation Planning


CompTIA Linux+ Training

Shared Libraries
• What is a library and why should it be shared?
– Gimp Tool Kit (GTK+)
• Library file locations (/etc/ld.so.conf)
• Path settings
– LD_LIBRARY_PATH
• Command syntax
– export LD_LIBRARY_PATH=[path]
• Library management
– ldd -v

25
Linux Installation Planning
CompTIA Linux+ Training

Shared Libraries (cont’d)


• Library cache
– /etc/ld.so.cache
– ldconfig
• Options:
– -v verbose
– -N update links
– -n update links in specified directories
– -X update cache
– -f conffile use new config file
– -C cachefile change cache file ldconfig creates
– -r dir to reat dir as root directory
– -p display cache

Linux Installation Planning


CompTIA Linux+ Training

What We Covered

 Hard Disk Layout
LILO Boot Manager Configuration


 GRUB Boot Manager Configuration
Shared Libraries

Package Management

CompTIA Linux+ Training


Instructor: Veronica Henry

26
Package Management
CompTIA Linux+ Training

In This Lesson:
 The Role of a Package Manager
 Debian Package Management
 Apt Package Management
 Debian Configuration &
Troubleshooting
 RPM Package Management
 Yum Package Management
 RPM & Yum Configuration &
Troubleshooting

Package Management
CompTIA Linux+ Training

The Role of a Package Manager


• What are packages?
• Install new packages
• Files database
• Upgrade
• Dependencies
• Checksums
• Binary packages
• Uninstall
• Choosing a package manager

Package Management
CompTIA Linux+ Training

Debian Package Management


• Which distributions use Debian?
• dpkg command:
• dpkg [options] [action] [package-files] [package-name]
• Options
Options Action Description
--root=dir All Modifies system using a
root directory:dir
-B or --auto-deconfigure -r Disables packages that
rely on one being
removed
--force-things Many Forces actions

27
Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)

Options Action Description


--ignore- -i,-r Ignores dependencies for
depends=package specified package
--no-act -i, -r Checks for problems
without taking action
--recursive -i Installs all packages that
match wildcard
-G -i Doesn‟t install package if
newer versions exists
-E or --skip-same-version -i Doesn‟t install if same
version exists

Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• dpkg command – actions

Options Description
-i or --install Installs a package
--configure Reconfigures installed package, runs
post-install script to set site-specific
options
-r or --remove Removes package, leaves config files
-P or --purge Removes package and config files
-p or --print-avail Displays info about installed package

Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• dpkg command – actions
Options Description
-I or --info Displays info about uninstalled
package file
-l pattern or – list pattern Lists installed package whose names
match the indicated pattern
-L or --listfiles Lists installed files associated with
package
-S pattern or --search pattern Locates package(s) that own the file(s)
indicated by pattern
-C or --audit Searches for partially installed
packages and suggests fixes

28
Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• apt-get commands

Command Description
update Gets updated package info from
/etc/apt/sources.list
upgrade Upgrades all installed packages
dselect-upgrade Performs any undone changes in
package status following dselect
dist-upgrade Upgrades with conflict resolution
install Installs a package by package
name
remove Removes package by package
name

Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)

Command Description
source Gets newest source package file by
package filename:
/etc/apt/sources.list
check Checks consistency & broken
packages
clean Clears info about retrieved
packages from Debian database
autoclean Like clean, but removes info about
packages that can‟t be downloaded

Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• apt-get - options

Option Command Description


-d or --download-only upgrade,dselect- Downloads package
upgrade,install,source files, but doesn‟t install
-f or --fix-broken install, remove Attempts to fix
unsatisfied
dependencies
-m, --ignore-missing, upgrade,dselect- Ignores all package
or --fix-missing upgrade,install, files that can‟t be
remove, source retrieved
-q or --quiet All Omits some progress
indicator info; Can be
doubled

29
Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• apt-get – options

Option Command Description


-s,--simulate,--just- All Performs simulation
print,--dry-run,-- without action
recon,--no-act
-y,--yes,or --assume- All Yes response to any
yes yes/no prompts in
installation scripts
-b,--compile, or –build source Compiles source
package after retrieval
--no-upgrade install apt-get will not
upgrade if older
version exists

Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• apt-cache
• showpkg
apt-cache showpkg packagename
• stats
apt-cache stats
• unmet
apt-cache unmet
• depends
apt-cache depends packagename
• pkgnames
apt-cache pkgnames

Package Management
CompTIA Linux+ Training

Debian Package Management (cont’d)


• dselect
/etc/apt/sources.list
• aptitude – access with Ctrl+T
• search
• update
• install
• remove
• upgrade
• autoclean
• clean
• help
• Synaptic

30
Package Management
CompTIA Linux+ Training

Debian Configuration & Troubleshooting


• Reconfiguring packages
• dpkg-reconfigure packagename
• Configuring Debian package tools
• /etc/dpkg/dpkg.cfg or ~/.dpkg.cfg
• apt - /etc/apt/sources.list or /etc.apt/apt.conf

Package Management
CompTIA Linux+ Training

RPM Package Management


• rpm [operation] [options] [package-files|package-names]
– packagename-a.b.c-x.arch.rpm
• “a.b.c” represents the version number
• “x” represents the build number
• “arch” represents the architecture

Operation Description
-i Installs package - can‟t already exist
-U Installs new package or upgrades existing
-F or --freshen Upgrades only if an earlier version exists
-q Queries – installed? Packages it contains

Package Management
CompTIA Linux+ Training

RPM Package Management


• rpm [operation] [options] [package-files|package-names]
– packagename-a.b.c-x.arch.rpm

Operation Description
-V or --verify Verifies package – present & unchanged
-e Uninstalls package
-b Builds binary, given source & config - rpmbuild
--rebuild Builds binary, given source RPM file - rpmbuild
--rebuilddb Rebuilds the RPM db to fix errors

31
Package Management
CompTIA Linux+ Training

RPM Package Management (cont’d)

Option Operation Description

--root dir Any Modifies Linux system having root at


dir
--force -i, -U, -F Forces install
-h or --hash -i, -U, -F Displays has maks (#) to show
progress
-v -i, -U, -F Used with –h, produces uniform no.
hash marks for each package
--nodeps -i, -U, -F, -e No dependency checks; Installs or
removes anyway
--test -i, -U, -F Checks for dependencies or other
problems without installing

Package Management
CompTIA Linux+ Training

RPM Package Management (cont’d)

Option Operation Description

--prefix path -i, -U, -F Sets install directory to path


-a or --all -q, -V Queries or verifies all packages
-f file or --file file -q, -V Queries or verifies packages that own
file
-p package-file -q Queries the uninstalled RPM package-
file
-i -q Displays package info: maintainer,
description, etc
-R or --recursive -q Displays packages and files on which
this one depends
-l or --list -q Displays files contained in package

Package Management
CompTIA Linux+ Training

Yum Package Management


• Install using the command line: yum [options] [command]
[package…]
Command Description
install Installs one or more packages and
dependencies by name
update Updates specified packages to latest version or
if none specified, all
check-update Checks to see if updates available, & displays
name, versions, & repository
upgrade Updates with –obsoletes flag
remove or erase Deletes packages, similar to rpm –e, but also
removes depended-on packages
list Displays info about package

32
Package Management
CompTIA Linux+ Training

Yum Package Management (cont’d)


Command Description
provides or whatprovides Displays info that provides program or feature
search Searches package names, summaries, etc. for
keyword
info Displays information, similar to rpm –qi
clean Cleans cache directory
shell Enters Yum shell mode, multiple commands
resolvedep Displays pckg matching specified dependency
localinstall Installs local RPM files, Yum for dependencies
localupdate Updates system using RPM files, Yum for
dependencies
deplist Displays dependencies of specified package

Package Management
CompTIA Linux+ Training

RPM & Yum Configuration and Troubleshooting


• RPM and YUM configuration files
– /usr/lib/rpm/rpmrc
– /etc/yum.conf
• Converting between package formats
– apt-get install alien
– alien [options] file[…]
• --to-deb
• --to-rpm
• --to-slp
• --to-tgz

Package Management
CompTIA Linux+ Training

RPM & Yum Configuration and Troubleshooting


• Package troubleshooting
– Dependency problems
• rpmbuild –rebuild
• rpm –i packagename.rpm –-nodeps

33
Package Management
CompTIA Linux+ Training

What We Covered

 The Role of a Package Manager
Debian Package Management


 Apt Package Management
Debian Configuration & Troubleshooting


 RPM Package Management
Yum Package Management


 RPM & Yum Configuration & Troubleshooting

GNU and Unix


Commands

CompTIA Linux+ Training


Instructor: Veronica Henry

GNU and Unix Commands


CompTIA Linux+ Training

In This Lesson:
 The Linux Command Line
 Text Streams & Filters
 File Management
 Process Management
 Searching & Regular Expressions
 The Vi Editor

34
GNU and Unix Commands
CompTIA Linux+ Training

The Linux Command Line


• The shell
• bash or Bourne Again (bsh)
• tcsh
• csh
• ksh or Korn
• zsh or Z

GNU and Unix Commands


CompTIA Linux+ Training

The Linux Command Line (cont’d)


• Commands
• cd - changes the current working directory
• pwd - displays the current directory
• echo - echo writes the text you enter to the screen
– echo $PATH
• exec - runs an external program
• time - tells you how long subsequent commands take to
execute
• set - displays options relating to bash operation
• exit & logout - terminate the shell

GNU and Unix Commands


CompTIA Linux+ Training

The Linux Command Line (cont’d)


• Navigation
• Tab - command completion
• History - stores commands in ~/.bash_history file
• Ctrl+R - backward search
• Ctrl+S - searches forward
• Ctrl+G - terminates a search
• Ctrl+A or Ctrl+E - moves cursor to start or end of line
• Ctrl+B or Ctrl+F (or up & down arrow) moves one character
• Ctrl+D or delete - deletes character at cursor
• Ctrl+K - deletes text from cursor to end
• Ctrl+X - deletes text from cursor to beginning of line
• Ctrl+T - transposes char before cursor with character cursor is on
• Esc and T - transposes two words before or on cursor

35
GNU and Unix Commands
CompTIA Linux+ Training

The Linux Command Line (cont’d)


• Configuration files
• ~/.bashrc
• ~/.profile – user config
• /etc/bash.bashrc
• /etc/profile - global
• Environment variables
• export myvariable=my.newserver.com

GNU and Unix Commands


CompTIA Linux+ Training

The Linux Command Line (cont’d)


• Help - man or man x command, info
• 1- executable programs and shell commands
• 2 - system calls
• 3 - library calls
• 4 - device files
• 5 - file formats
• 6 - games
• 7 - miscellaneous
• 8 - system admin commands
• 9 - kernel routines

GNU and Unix Commands


CompTIA Linux+ Training

Pipes, Streams & Filters


• Pipes - send output of a file to standard input of another
• file1 | file2
• Streams - input and output, sent to and from the computer
• Standard input (stdin)
• Standard output (stdout)
• Standard error (stderr)
• Tee - splits standard input so it display on standard output and
other files you specify. Usually used with pipes, so data can be
stored in a file and immediately viewed onscreen.
• runprog | tee newfile.txt
• The xargs command - builds a command from standards input
(`find *.n` backtick)
• xargs [options] [command [initial-arguments]]

36
Operator Effect

> Creates new file with standard output - if specified file


exists, it‟s overwritten
>> Appends standard output to existing file - if it doesn‟t exist,
it‟s created
2> Creates new file with standard error - if specified file exists,
it‟s overwritten
2>> Appends standard error to existing file - if it doesn‟t exist,
it‟s created
&> Creates new file with both standard output and standard
error – if file exists, it‟s overwritten
< Sends contents of specified file to be used as standard
input
<< Accepts text on the following lines as standard input
<> Specified file will be used as both standard input and
standard output

GNU and Unix Commands


CompTIA Linux+ Training

Pipes, Streams & Filters (cont’d)


• Filtering commands
Text Filter Purpose

cat (tac) Concatenate, links files


• –E or --show-ends - displays line ends, $ at end
of line
• –n or –number - adds line numbers to front of
every line
• –b or --number-nonblank - adds numbers only to
lines that contain text
• –s or --squeeze-blank - compresses blank lines
down to single line
• –T or –show-tabs - displays tab characters as ^I
• –v or --show-nonprinting - displays special
characters using car and M- notation

GNU and Unix Commands


CompTIA Linux+ Training

Pipes, Streams & Filters (cont’d)


• Filtering commands

Text Filter Purpose

join Combines two files matching contents of specified


fields
paste Merges files line by line, tab separated
expand Converts tabs to spaces
od Octal dump, displays file as octal numbers

37
GNU and Unix Commands
CompTIA Linux+ Training

Pipes, Streams & Filters (cont’d)


•Text Filtercommands
Filtering Purpose

sort Sorts a file


• –f or --ignore case
• –M or --month-sort
• –n or --numeric-sort
• –r or --reverse
• –k field
split Splits a file into 2 or more files
tr Changes characters, tr [options] SET1 [SET2]
unexpand Converts multiple spaces to tabs
uniq Removes duplicate lines
fmt Cleans up file format, –width, -w width options

GNU and Unix Commands


CompTIA Linux+ Training

Pipes, Streams & Filters (cont’d)

Text Filter Purpose

nl Line numbering
• –b style or --body-numbering=style
• –h or --header-numbering=style
• –d=code or --section-delimiter=code
• –p or --no-renumber
• –n format or --number-format=format (ln, rn, rz)
• T - non blank lines
• a - all lines
• n - no lines
• pREGEXP

GNU and Unix Commands


CompTIA Linux+ Training

Pipes, Streams & Filters (cont’d)


Text Filter Purpose
pr Prints a file
• –d - double space
• –l - line length
• –h - designates header
• –o - left margin
• –f - form feed
• –numcols - includes column by that name
head Allows view first 10 lines of file
• –c num or --bytes=num
• –n num or --lines=num
tail Allows view last 10 lines of a file
• –f or –follow
• --pid=pid

38
GNU and Unix Commands
CompTIA Linux+ Training

Pipes, Streams & Filters (cont’d)

Text Filter Purpose

less Reads a file, one screen at a time


cut Extracts portions of lines and displays
• –b list
• –c list
• –f list
wc Produces word, line and byte counts
• --lines
• --words
• --bytes
• --chars(-m)

GNU and Unix Commands


CompTIA Linux+ Training

File Management
• The rules
– Case sensitive
– Filenames - omit *, ?, /, \
– Brackets [] match any character in a set
– dot and double dot - ., .. - current and parent directories
• Commands
– List - ls [options] [files]
– Copy - cp [options] source destination
– Move - mv [options] source destination
– Delete - rm [options] files
– Modify timestamp (or create file) - touch [options] files
– Create directory - mkdir [options] directory-name(s)
– Delete directory - rmdir [options] directory-names(s)

GNU and Unix Commands


CompTIA Linux+ Training

File Management (cont’d)


• tar or tape archiver command
Command Abbreviation Purpose
--create c Creates archive
--concatenate A Appends tar files to archive
--append r Appends non-tar files to
archive
--update u Appends files newer than
archive
--diff or --compare d Compares archive to files on
disk
--list t Lists archive contents
--extractor r --get x Extracts archive files

39
GNU and Unix Commands
CompTIA Linux+ Training

File Management (cont’d)


• tar qualifiers command
Qualifier Abbreviation Purpose
--directory dir C Switches to dir before action
--file [host:]file f Uses file on computer host as
the archive file
--listed-incremental g Incremental backup or restore,
file using file as list of previously
archived files
--one-file-system l Backup or restore 1 partition
--multi-volume M Creates or extracts multi-tape
archive
--tape-length N L Changes tapes after N
kilobytes

GNU and Unix Commands


CompTIA Linux+ Training

File Management (cont’d)


• tar qualifiers command

Qualifier Abbreviation Purpose


--same-permissions p Preserves protection info
--absolute-paths P Retains leading / on filenames
--verbose v Lists all files read or extracted
--verify W Verifies archive after write
--exclude file none Excludes file from archive
--exclude-from file X Excludes files listed in file
--gzip or --ungzip z Processes archive with gzip
--bzip2 j (I or y) Processes archive with bzip2

GNU and Unix Commands


CompTIA Linux+ Training

File Management (cont’d)


• dd - low level copy
• cpio command has 3 modes
– copy-out (-o or --create options) - creates an archive and
copies in the files
– copy-in (-i or --extract) - extracts data from an archive
– Copy-pass (-p or --pass-through) - combines copy-out and
copy-in
CPIO Option Abbreviation Purpose

--reset-access-time a Resets access time after


reading a file
--append A Appends data to existing
archive

40
CPIO Option Abbreviation Purpose
--pattern-file=filename E filename Uses contents of filename as
list of files to be extracted in
copy-in mode
--file=filename F filename Uses filename as cpio archive
file
--format=format H format Uses specified format (bin, crc,
tar)
N/A I filename Uses filename instead of
standard output
--list t Displays table of contents for
input
--unconditional u Replaces files without
verification
--verbose v Displays files as added or
extracted

GNU and Unix Commands


CompTIA Linux+ Training

Process Management
• uname option
Option Purpose
-n or --nodename Displays system‟s node name (hostname)
-s or --kernel-name Displays kernel name
-v or --kernel-version Displays kernel version (build date & time)
-r or --kernel-release Displays kernel version number
-m or --machine Displays info about your machine
-p or --processor Displays info about CPU
-i or --hardware-platform Hardware platform (usually unknown)
-o or --operating system Displays OS name
-a or --all Displays all information

GNU and Unix Commands


CompTIA Linux+ Training

Process Management (cont’d)


• ps cp,,amd - 3 types of options
• Unix98 - single char, grouped, preceded by single dash
• BSD - single char, grouped, no dash
• GNU long - multi-char never grouped, two dashes
Option Purpose
-A or -e Displays all processes on system (x – user)
-u user, U user, --User Displays processes owned by a user
user (username or id)
-f, -l, j, l, u, v Expands info
-H, -f, --forest Groups and indents processes to show
hierarchy
-w, w Displays wide (more than 80 columns)

41
GNU and Unix Commands
CompTIA Linux+ Training

Process Management (cont’d)


• jobs command
• top - sorts by CPU usage

Option Purpose
-d delay Delays between output updates
-p pid Monitors specific processes (use ps)
-n iter Displays (n) no. updates and quit
-b Batch mode - file instead of screen
h and ? Help
k Kills process (use ps)
q Quits

GNU and Unix Commands


CompTIA Linux+ Training

Process Management (cont’d)


• top - sorts by CPU usage

Option Purpose
r Changes priority (pid & new number)
s Changes display update rate in seconds
P Sorts by CPU use (default)
M Sorts by memory use

GNU and Unix Commands


CompTIA Linux+ Training

Process Management (cont’d)


• Foreground and background
• fg vs. bg & (ampersand)
• Ctrl+Z then bg or Ctrl+Z then fg
• Priorities
• nice and renice
• kill –s signal pid
• nohup program options
• sighup or 1- terminates programs
• sigkill or 9 - exits without shutdown tasks
• sigterm or 15 - exits but closes tasks
• killall [options] [--] name […]

42
GNU and Unix Commands
CompTIA Linux+ Training

Searching and Regular Expressions


• Bracket - anything enclosed in brackets is a bracket expression,
c[aei]r would match car cer cir
• Range - lists start and end point separated by a dash, a[1-3]z
• Single char - matches any single character, c.r = car, cbr, cdr
• Start and end - carat ^ is start and $ is end
• Repetition - special symbol that marks how many times a
matching item should exist
• Multiple - vertical bar | separates 2 possible matches
• Parentheses () - marks sub-expressions
• Escaping - to match a special character like a dot, need to
escape with a backslash
• grep [options] regexp [files] - -c or --count, -f file or --
file=file, -i or --ignore-case, -r or --recursive, --extended-regexp

GNU and Unix Commands


CompTIA Linux+ Training

Searching and Regular Expressions (cont’d)


• Sed command - modifies the contents of files and sends the updated
file to standard output
– sed [options] –f script-file [input-file] (sed `s/blue/green‟
colors.txt > newcolors.txt)
– sed [options] script-text [input-file]

Command Address Purpose


= 0 or 1 Displays current line number
a\text 0 or 1 Appends text to file
i\text 0 or 1 Inserts text into file
r filename 0 or 1 Appends text from filename
into file

GNU and Unix Commands


CompTIA Linux+ Training

Searching and Regular Expressions (cont’d)

Command Address Purpose


c\text Range Replaces selected range of
lines with indicated text
s/regexp/replacement Range Replaces text that matches
regexp with replacement
w filename Range Writes current pattern space to
file
q 0 or 1 Quits but prints pattern space
Q 0 or 1 Quits

• tr –d \\r < dosfile.text > unixfile.txt

43
GNU and Unix Commands
CompTIA Linux+ Training

The Vi Editor
• First editor written for Unix
• Small and nimble, perfect for use on an emergency boot disk, or
as a full fledged web development tool
• 3 Modes
– Command - accepts (usually) single letter commands
– Ex or (:) - file manipulation, saving & outside programs
– Insert (R) - enter text
– Esc - exits & returns to command

GNU and Unix Commands


CompTIA Linux+ Training

The Vi Editor (cont’d)


• Navigation keys
– h, j, k, l - left, down, up, right arrow keys
– yank - (like copy) no.linesyy or 2yy
• yx - copies amount specified by x
– dd - yank, deletes and copies to buffer
• dx - deletes amount specified by x)
– p or P - (p) pastes after cursor (P) pastes before cursor
– :wq - saves and quits, q quit, no save
– ~ - changes case
– u - undo
– o - in command mode, opens text, inserts new line below
current and enters insert mode

GNU and Unix Commands


CompTIA Linux+ Training

The Vi Editor (cont’d)


• Navigation keys
– / - in command mode, searches text
– c - changes text from within command mode (cw, cc)
– G - goes to line, H home, L bottom of screen
– %s/original/replacement - replaces string globally
• Save
– :w - save
– :e - edit new file
– :r - include contents of old file in new
– :!ls - list directory
– :q or q! - quit

44
GNU and Unix Commands
CompTIA Linux+ Training

What We Covered

 The Linux Command Line
Text Streams & Filters


 File Management
Process Management


 Searching & Regular Expressions

 The Vi Editor

Linux Filesystems

CompTIA Linux+ Training


Instructor: Veronica Henry

Linux Filesystems
CompTIA Linux+ Training

In This Lesson:
 Creating Partitions and Filesystems
 Tuning Filesystems
 Debugging
 Mounting and Unmounting Filesystems

45
Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems


• Partitioning a disk
– Fixed disk - fdisk command works on MBR disks
– fdisk nameofdevice
– fdisk /dev/sda - for a primary master SATA disk
• p & l - displays partition table
• n - creates a new partition
• d - deletes a partition
• t - changes partition type code
• l - lists of common type codes
• a – makes the disk bootable
• m – help
• q - exits without saving
• w – writes changes to disk

Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems (cont’d)


• Preparing partition for use – making or formatting the filesystem

– Ext2fs (ext2) – FAT - Fat Allocation Table


– Ext3fs (ext3) – NTFS - New Technology File System
– Ext4fs (ext4) – HFS & HFS+ - Hierarchical File
– ReiserFS (reiser) System
– JFS (jfs) – ISO-9660 (iso9660)
– XFS (xfs) – Joliet (iso9660)
– Btrfs – UDF - Universal Disk Format

Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems (cont’d)


• Creating a filesystem
– mkfs (mk2fs for ext2 and ext3)
• mkfs –t reiserfs /dev/hda5
• Creating a swap partition
– mkswap /dev/hd5
– swapon /dev/hda5

46
Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems (cont’d)


• Tuning filesystems
– dumpe2fs [options] device
– xfs_info devicename
– tune2fs [options] device
• Options
– –c - mounts
– –i - adjusts time between checks
– –j - adds a journal
– –m percent - sets reserved blocks (used by root)
– –l & –u - obtains the filesystem‟s label and UUID
(Universally Unique Identifier)
– –L & –U - changes the labels
– xfs_admin

Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems (cont’d)


• Debugging
– debugfs devicename
– Commands used
• show_super_stats or stats-displays filesystem superblock
info, similar to dumpe2fs
• undelete inode name - undeletes a file
• write internal-file external-f - extracts a file
• cd, ln, and rm - are all usable (change dir, link, delete)
• list_requests, lr, help or ? - gets help
• quit - exits the program

Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems (cont’d)


• Journal - describes pending operations, so prior to writing disk data,
Linux describes what it‟s going to do in a journal
• Linux‟s journaling filesystems are ext3fs, ext4fs, reiserFS, XFS, & JFS
• Checking filesystems
– fsck [–sACVRTNP] [–t fstype] [–] [fsck-options] filesytems
– Options:
• –C - indicates progress
• –V - verbose output
• –N - displays without action
• –t - forces filesystem type
• –a or –p - automatic checks
• –r - interactive check
• –f - forces full filesystem check.

47
Linux Filesystems
CompTIA Linux+ Training

Creating Partitions and Filesystems (cont’d)


• Monitoring disk use
– df [options] [files]
– du [options] [directories]
• Options:
– –a or --all - reports individual files
– –c or --total - adds grand total to end of output
– –h or --human - scales and labels units
– –l or --count-links - counts hard links independently
– --max-depth=n - limits report to n levels
– --summarize – limits report to files & dir specified
– –x or --one-file-system - limits report to current
filesystem

Linux Filesystems
CompTIA Linux+ Training

Mounting and Unmounting Filesystems


• Permanent change - in the /etc/fstab file
• mount [alrsvw] [–t fstype] [–o options] [device] [mountpoint]
• Parameters:
• –a - mounts all filesystems listed in /etc/fstab
• –r - mounts read only
• –v - verbose output
• –w - mounts for both read and write operations
• –t fstype - specifies the filesystem type
• –L and –U - mounts with specified label or UUID
• device - device filename associated with the partition or disk
• mountpoint - directory to which device‟s contents should be
attached

Linux Filesystems
CompTIA Linux+ Training

Mounting and Unmounting Filesystems (cont’d)


• To add filesystem specific options - –o parameter or the
/etc/fstab file
– Options - review mount man page for more details
• defaults • uid=value
• loop • gid=value
• auto or noauto • umask=value
• user or nouser • dmask=value
• users • fmask=value
• owner • conv=code
• remount • norock
• ro • nojoliet
• rw

48
Linux Filesystems
CompTIA Linux+ Training

Mounting and Unmounting Filesystems (cont’d)


• Unmounting
– umount [-afnrv] [-t fstype] [device] [ mountpoint]
• –a - mounts all in /etc/tstab
• –f - forces unmount
• –r - if filesystem can‟t be unmounted, remount in read-
only mode
• –t - mounts specified file type – you must specify device
or mountpoint

Linux Filesystems
CompTIA Linux+ Training

Mounting and Unmounting Filesystems (cont’d)


• Permanent mount - review contents of /etc/fstab

Linux Filesystems
CompTIA Linux+ Training

What We Covered

 Creating Partitions and Filesystems
Tuning Filesystems


 Debugging
Mounting and Unmounting Filesystems

49
Managing User
Resources: Quotas and
Permissions

CompTIA Linux+ Training


Instructor: Veronica Henry

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

In This Lesson:
 Disk Quotas
 File Permissions and Ownership

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

Disk Quotas
• What is a Quota?
– Disk space limitations for Linux users and groups
• Installation
– Kernel 2.6.x and higher
– ext2, ext3, ReiserFS, JFS, and XFS
– rpm –qi quota
– yum install quota (as root)
– /etc/fstab (usrquota,grpquota)
• /dev/sda3 /home ext4 usrquota,grpquota 1 1

50
Managing User Resources: Quotas and Permissions
CompTIA Linux+ Training

Disk Quotas
• Implement quotas
– quotaon
• Enable quotas
– edquota username (–t - filesystem grace period)
• quotacheck
– scans filesystem, verifies & updates quota info
• quota
– –g - groups
– –l - omit NFS
– –q - over limit
• repquota
– Summarizes info about a specified filesystem (–a for all)

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership


• Defining ownership
– Whoever creates a file, owns it
– ls -l
• Change owner
– chown [options] [newowner]:[newgroup] filenames
• –R or --recursive (make change to entire directory tree)
– chown nancy:techdev cfiles.txt
• Change group
– chgrp [options] newgroup filenames

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• The partnership between ownership and permissions
– owner - user that owns the file
– group - group that owns the file
– others - all other users

Permission Symbol Purpose


Read r Users can open and
view a file
Write w Users can open,
modify, and save a file
Execute x Users can run an
executable file

51
Managing User Resources: Quotas and Permissions
CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Permission bits:
– 1st - directory
– 2nd (group of 3) - owner
– 3rd (group of 3) - group
– 4th (group of 3) - others (world)
– Permissions = base 8 number, 3 digits long: owner, group,
other
– Read:4, Write:2, Execute:1 or 4+2, 4+2, 4 = 664

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Permission bits: directory, owner, group, others

Type Code Purpose


- Ordinary data, text, program, graphic, etc.
d Directory
l Symbolic link - contains name of another file or
directory
p Named pipe
S Socket
b Block device
c Character device

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


Type Code Octal Code Purpose
rwxrwxrwx 777 Read, write & execute
for all users
rwxr-xr-x 755 Read & execute for all
plus write for owner
rwxr-x--- 750 Read and execute for
owner and group,
write for owner
rwx------ 700 Read, write & execute
for owner only
rw-rw-rw- 666 Read and write for all
rw-rw-r-- 664 Read and write for
owner and group, r all

52
Managing User Resources: Quotas and Permissions
CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


Type Code Octal Code Purpose
rw-rw---- 660 Read and write for
owner and group
rw-r--r-- 644 Read and write for
owner, read for group
and others
rw-r----- 640 Read and write for
owner, read only for
group
rw------- 600 Read and write for
owner
r-------- 400 Read for owner

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Special permission bits
– Set user ID (SUID)
• Runs program with permission of owner instead of user
• s in owner execute bit
• rwsr-xr-x
– Set group ID (SGID)
• Sets group of the program to group of the file
• s in group execute bit
• rwxr-sr-x
– Sticky bit
• Directory‟s files can only be deleted by owner or root
• t in other (world) execute bit
• rwxr-xr-t

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Changing permissions
– chmod [options] [mode[,mode…]] filename
– chmod o+x myfile.txt

Perm. Set Code Meaning Change type Code Perm. to Modify Code
u Owner + (Add) r - Read
g Group - (Remove) w - Write
o World = (Equal to) x - Execute
a All X - Executes only if
file is a dir or already
has exe. perm
s - SUID or SGID

53
Managing User Resources: Quotas and Permissions
CompTIA Linux+ Training

File Permissions and Ownership (cont’d)

Perm. Set code Meaning Change type Code Perm. to Modify Code
t - Sticky bit
u - Existing owner‟s
permissions
g - Existing group
permissions
O - Existing world
permissions

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Set default mode and group
– umask
– /etc/profile
– newgrp (change default group -l)
– 022 typical default, example:

Files Directories
Default mode: rw-rw-rw- Default mode: rwxrwxrwx
- umask: ----w--w- - umask: ----w--w-
Result: rw-r-r-- Result: rwxr-xr-x

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Set default mode and group
– umask
– /etc/profile
– newgrp (change default group -l)

Umask Created Files Created Directories


000 666 (rw-rw-rw-) 777 (rwxrwxrwx)
002 664 (rw-rw-r--) 775 (rwxrwxr-x)
022 644 (rw-r--r--) 755 (rwxr-xr-x)
027 640 (rw-r-----) 750 (rwxr-x---)
077 600 (rw-------) 700 (rwx------)
277 400 (r------) 500 (r-x------)

54
Managing User Resources: Quotas and Permissions
CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Change file attributes - chattr (-, +, =) filename
• chattr +a myfile.txt

Attribute Abbreviation Purpose


Append only a Disables write access,
except to append data
Compressed c Automatically
compresses data
written to the file and
uncompresses it when
read back
Immutable i Disables write, delete,
rename, or link

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

File Permissions and Ownership (cont’d)


• Change file attributes (cont‟d)

Attribute Abbreviation Purpose


Data journaling j Journals data written
to file
Secure deletion s Zeros data blocks
when file is deleted
No tail-merging t Disables merging of
tail file data
No access time A Doesn‟t update access
updates time stamp with file
access

Managing User Resources: Quotas and Permissions


CompTIA Linux+ Training

What We Covered

 Disk Quotas

 File Permissions and Ownership


55
Linux Links and System
Files

CompTIA Linux+ Training


Instructor: Veronica Henry

Linux Links and System Files


CompTIA Linux+ Training

In This Lesson:
 Understanding Links
 Linux System Files
 Locating Files

Linux Links and System Files


CompTIA Linux+ Training

Understanding Links
• What is a link?
– Shortcut or pointer to a target file or location
• Hard links
– Two directory entries that point to the same file (inode)
– To delete the file, must delete both hard links
– Must exist on a single low-level file system (not multiple
partitions, i.e. /root to /home)
• Soft/Symbolic links
– Separate file whose contents point to the linked-to file
– Can point across filesystems
– ls -l will show linked to file

56
Linux Links and System Files
CompTIA Linux+ Training

Understanding Links (cont’d)


• Creating links
– ln command
• ln [options] source link
– –f or --force - removes existing links
– –i or --interactive - does the same, but queries user
before replacing existing files
– –d, –F, or --directory - attempts to create hard links
to directories
– –s or --symbolic - creates a symbolic link

Linux Links and System Files


CompTIA Linux+ Training

Linux System Files


• FSSTND (Filesystem Standard)
– Developed in 1994 to create standards
– Standardized /bin & /usr/bin programs, /etc for executables,
/usr read only
• FHS (Filesystem Hierarchy Standard)
– Developed in 1995 as replacement for FSSTND
– Made distinction between shareable & unshareable, static &
variable, program executables & user files

Shareable Unshareable
Static /usr, /opt /etc, /boot
Variable /home, /var/mail /var/run, /var/lock

Linux Links and System Files


CompTIA Linux+ Training

Linux System Files (cont’d)


• Linux system directories and contents

Directory Contents
/ Root filesystem or directory - all directories branch off of
root
/boot Contains static and unshareable files related to booting
the computer
/bin Contains critical executable files - most common user
commands like ls, cp, mv, etc.
/sbin Similar to bin, but contains programs run by
administrator, fdisk, etc.
/lib Contains program libraries; /lib/modules contains kernel
modules (drivers)

57
Linux Links and System Files
CompTIA Linux+ Training

Linux System Files (cont’d)


• Linux system directories and contents

Directory Contents
/usr Contains the bulk of systems programs and often splits
to a separate partition; /usr/bin & /usr/lib contains
programs and libraries
/usr/local Contains subdirectories that mirror /usr, like
/usr/local/bin and holds programs admin installs locally
/usr/X11R6 Contains files related to the X, the GUI env
/opt Contains commercial packages
/home Contains user data

Linux Links and System Files


CompTIA Linux+ Training

Linux System Files (cont’d)


• Linux system directories and contents

Directory Contents
/root Home directory for the root user
/var Contains transient files: log files, print queue, mail
/tmp Holds programs temporary files, sometimes on separate
partition
/mnt For removable media devices: cdrom & floppy
/media Optional, but contains subdirectories for media:
/media/cdrom
/dev Contains device files or hardware interfaces
/proc Virtual filesystem that provides hardware info not
accessible from /dev

Linux Links and System Files


CompTIA Linux+ Training

Locating Files
• find [path] [expression]
– brute force approach to file location, slower but reliable

Expression Purpose
-name Finds files that match the specified pattern
-perm mode Finds files that have certain permissions
-size n Finds files with a specific size
-gid Searches for files whose GID is indicated
-uid Searches for files owned by indicated user
-maxdepth Searches limited number of subdirectories

58
Linux Links and System Files
CompTIA Linux+ Training

Locating Files (cont’d)


• whereis - searches by directory
– whereis cp
• which - searches the current path
– which sshd
• type - how command is interpreted: command aliases
– type type
• locate -like find, search initiated from its own database
– locate search-string
• updatedb - updates slocate database
• /etc/updatedb.conf - configuration file for updatedb

Linux Links and System Files


CompTIA Linux+ Training

What We Covered
 Understanding Links
 Linux System Files
 Locating Files

Preparing for Your


CompTIA Linux+
Certification Exam
(LX0-101)
CompTIA Linux+ Training
Instructor: Veronica Henry

59
Preparing for Your CompTIA Linux+ Certification Exam
CompTIA Linux+ Training

In This Lesson:
 Exam Overview
 Where to Take the Exam
 Retake Policy
 Preparation Tips
 After the Exam

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Exam Overview
• Experience
– CompTIA A+, CompTIA Network+ and at least 12 months of
Linux administration experience
– http://www.comptia.org/certifications/testprep/examobjectiv
es.aspx
• LX0-101
Domain % of Examination
101 System Architecture 14%
102 Linux Installation and Package Management 18%
103 GNU and Unix Commands 43%
104 Devices, Linux Filesystems, Filesystem 25%
Hierarchy Standard

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Exam Overview
• 60 questions, 90 minutes to complete
– Multiple choice
– Fill-in the blank
• Scoring
– 500 on a scale of 200-800

60
Preparing for Your CompTIA Linux+ Certification Exam
CompTIA Linux+ Training

Where to Take the Exam


• Pearson Vue
– http://www.pearsonvue.com
– $150 -$168
• Prometric
– http://www.prometric.com/CompTIA/default.htm

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Retake Policy
• 1st retake has no waiting period, but for 3rd and any
subsequent attempts, must wait 14 days.
– If a Candidate has passed an exam, he/she cannot take it
again without prior consent from CompTIA.
– CompTIA beta examinations may only be taken one (1) time
by each candidate.
– A test result found to be in violation of the retake policy will
not be processed, which will result in no credit awarded for
the test taken. Repeat violators will be banned from
participation in the CompTIA Certification Program.

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Exam Preparation Tips


• Man and info pages
– man commandname
– info commandname
• Review the lessons
• Practice
• Save tough questions for last

61
Preparing for Your CompTIA Linux+ Certification Exam
CompTIA Linux+ Training

After The Exam


• Your Linux+ certificate
– https://www.certmetrics.com/comptia/login.aspx
• Linux Professional Institute Certification (LPIC -1)
– Contacting LPI to obtain
• Novell Certified Linux Administrator (CLA)
– http://practicum.novell.com/LPI2CLAForm.php
• Logos for download

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

What We Covered
 Exam Overview
 Where to Take the Exam
 Retake Policy
 Preparation Tips
 After the Exam

Introduction to
CompTIA Linux+
Training -
Exam LX0-102
CompTIA Linux+ Training
Instructor: Veronica Henry

62
Introduction to CompTIA Linux+ Training - Exam LX0-102
CompTIA Linux+ Training

What We Will Be Doing


• The Linux Shell Environment
• Writing and Editing Scripts
• Linux Databases
• X11 Installation and Configuration
• Display Manager and Accessibility Options
• User and Group Accounts and Files
• Job Scheduling

Introduction to CompTIA Linux+ Training - Exam LX0-102


CompTIA Linux+ Training

What We Will Be Doing


• Localization and System Time
• Managing System and Kernel Logs
• Email and Printing
• Internet Protocols
• Network Configuration and Troubleshooting
• Security Administration
• Encryption Options

The Linux Shell


Environment

CompTIA Linux+ Training


Instructor: Veronica Henry

63
The Linux Shell Environment
CompTIA Linux+ Training

In This Lesson:
 Environment Variables
 Shell Configuration Files
 Aliases

The Linux Shell Environment


CompTIA Linux+ Training

Environment Variables
• Used to pass data to shell programs
• Always in uppercase
• Preceded by $
Environment Variable Purpose
USER or USERNAME Holds current username
SHELL Holds path to current command shell
PWD Holds present working directory
HOSTNAME Holds system hostname
PATH Holds a list of directories to be searched
when running command from shell prompt
HOME Holds path to current user‟s home
directory

The Linux Shell Environment


CompTIA Linux+ Training

Environment Variables (cont’d)

Environment Variable Purpose


MAIL Holds path to current user‟s mail spool;
/var/spool/mail/username
LANG Holds language, specified as locale
LD_LIBRARY_PATH Indicates where library files can be found
PS1 Holds default prompt; \u - username, \h
hostname, \W - current working directory
NNTPSERVER Specifies name of news server system
TERM Holds name of terminal type
DISPLAY Specifies X display, :0,0
EDITOR Specifies default text editor

64
The Linux Shell Environment
CompTIA Linux+ Training

Environment Variables (cont’d)


• Environment variables
– env - at the command line
– echo $VAR
– echo $HOME
– echo $PATH
– echo $HOSTNAME
– echo $PS1
• Setting environment variables
– manually: variable=value
• PATH=/var/opt/myprog
• export PATH
• export PATH=/var/opt/myprog

The Linux Shell Environment


CompTIA Linux+ Training

Shell Configuration Files


• Permanent changes
– Using bash startup scripts
– /etc/skel (skeleton files) - files copied to users home
directories at account creation
– Logout script - ~/.bash_logout
– Keyboard configuration - ~/.inputrc

File Type Login File Non-Login File


Global /etc/profile & /etc/bashrc or
/etc/profile.d /etc/bash.bashrc
User (local) ~/.bash_login, ~/.bashrc
~/.profile, or
~/.bash_profile

The Linux Shell Environment


CompTIA Linux+ Training

Aliases
• What are aliases?
– Shortcut to a different file or command
• alias
• alias alias_name=„commands‟

65
The Linux Shell Environment
CompTIA Linux+ Training

What We Covered

 Environment Variables

 Shell Configuration Files

 Aliases

Writing and Editing


Scripts

CompTIA Linux+ Training


Instructor: Veronica Henry

Writing and Editing Scripts


CompTIA Linux+ Training

In This Lesson:
 Shell Script Components
 Shell Script Commands
 Conditional Expressions

66
Writing and Editing Scripts
CompTIA Linux+ Training

Shell Script Components


• script - text file containing commands to be executed by shell
• #!/bin/bash or sh – referred to as shebang, hashbang,
hashpling or pound bang

Writing and Editing Scripts


CompTIA Linux+ Training

Shell Script Components (cont’d)


• Executable
• bash newscript
• chmod a+x newscript
– Path for scripts
• /usr/local/bin
– Sample script:
#!/bin/bash
echo “I Love Linux”
date
– Launching programs with a script
• /usr/bin/mail &

Writing and Editing Scripts


CompTIA Linux+ Training

Shell Script Commands


• File manipulation commands
• ls, mv, cp
• grep - locates files that contain strings
• find - searches based on filenames, ownership, etc
• cut - extracts text files from a file
• mail - send email from within a script
– Variables (parameters)
• placeholder in a script, for value when script runs
• $, 0-9, $0=name of script, $1=first parameter, $2=2nd, etc.
– Test script with copy command and variables:
#!/bin/sh
cp $1 $2

67
Writing and Editing Scripts
CompTIA Linux+ Training

Conditional Expressions
• Couple of rules
– When you assign a value to a variable from the output of a
command, enclose in ` (backticks)
– Variable names should be preceded by a $
– #!/bin/bash or sh – referred to as shebang, hashbang,
hashpling or pound bang
– Make the script executable with
chmod
– Place script in a directory on the path

Writing and Editing Scripts


CompTIA Linux+ Training

Conditional Expressions (cont’d)


• Enables a script to perform action based on a condition
– if/then - executes based on true/false condition
• if condition
then
command
fi
– if/then/else
• if condition
then
command
else
command
fi

Writing and Editing Scripts


CompTIA Linux+ Training

Conditional Expressions (cont’d)


• Enables a script to perform action based on a condition
– case statement - condition evaluated in many different ways
case variable in
pattern1 command(s) ;;
pattern2 commands(s) ;;
esac
– Loop - performs same action until condition met
• for x in „condition‟; do command done
– seq - generates list of numbers from 1st argument to
last
– for x in „seq 1 5‟
• while [condition] do commands done
• until - continues looping until condition is true

68
Writing and Editing Scripts
CompTIA Linux+ Training

Conditional Expressions (cont’d)


– Function () - part of a script that performs a sub-task, and
can be called by name from other parts of the script
• newfunction() {
commands
}
– Example:
#!/bin/bash
function hello() {
echo Howdy!
}
hello

Writing and Editing Scripts


CompTIA Linux+ Training

What We Covered
 Shell Script Components
 Shell Script Commands
 Conditional Expressions

Linux Databases

CompTIA Linux+ Training


Instructor: Veronica Henry

69
Linux Databases
CompTIA Linux+ Training

In This Lesson:
 SQL Overview
 MySQL - Databases and Tables
 MySQL - Storing Data
 MySQL - Retrieving Data
 MySQL - Deleting Data

Linux Databases
CompTIA Linux+ Training

SQL Overview
• Structured Query Language - SQL
• Language used to retrieve data from databases
• SQL Products
• MySQL - included in most Linux distributions
– yum install mysql mysql-server
– /etc/init.d/mysqld start
– mysql_secure_installation
• PostgreSQL - derivative of the Ingres software
• SQLite - a library, not a database

Linux Databases
CompTIA Linux+ Training

SQL Overview (cont’d)


• Relational databases defined
• Stores data in a table
• Row aka tuple = object
• Column aka attribute or field

Transportation:

Car Blue Toyota


Motorcycle Silver Harley
Moped Yellow Mopedcorp
Bicycle Red Schwinn

70
Linux Databases
CompTIA Linux+ Training

SQL Overview (cont’d)


• Data Types

Data Type Purpose


INTEGER (INT) Stores whole number, 4-bytes long from
-2147483648 to 2147483647
SMALLINT Stores whole number, 2-byte integer
DECIMAL Fixed storage of decimal values (no
rounding)
NUMERIC Fixed storage of decimal values
FLOAT Floating point number (rounded)
DOUBLE PRECISION Floating point number stored with twice
the precision of FLOAT

Linux Databases
CompTIA Linux+ Training

SQL Overview (cont’d)


Data Type Purpose
DATETIME Date and time in YYYY-MM-DD HH:MM:SS
format
DATE Date in YYYY-MM-DD format
TIME Time in HH:MM:SS format, time of day or
period of time
CHAR One or more characters
VARCHAR Variable number of characters or string;
can hold 1-255 characters
ENUM Enumerated list like small, medium or
large
SET Data that may have zero or more values

Linux Databases
CompTIA Linux+ Training

MySQL - Databases and Tables


• Launching
• mysql – at command prompt
• /help
• Display databases
• SHOW DATABASES;
• Create databases and tables
• CREATE DATABASE dbname;
• USE dbname;
• SHOW TABLES - displays existing tables
• DESCRIBE tablename - shows the fields
• CREATE TABLE tablename;
– create table employees (name varchar(50), hiredate
date, department varchar (30), salary decimal(10,2));

71
Linux Databases
CompTIA Linux+ Training

MySQL - Storing Data


• Storing data
• INSERT INTO tablename;
– VALUES(„value1‟, „value2‟, „value3, …);
– INSERT INTO employees VALUES(„value1‟, „value2‟,
„value3‟);

• UPDATE tablename;

Linux Databases
CompTIA Linux+ Training

MySQL - Retrieving Data


• SELECT fields(s) FROM table [WHERE conditions] [ORDER BY
field]
– Conditions: =, <, > (letters and numbers), AND & OR, *
– group by (SUM) and order by
– select salary from employees where name=„John Smith‟;
– select salary from employees;
– select name and salary from employees;
– select salary from employees here salary>70000;
• Combining data from multiple tables
– Primary key
– create 2nd table, use select or join

Linux Databases
CompTIA Linux+ Training

MySQL - Deleting Data


• DELETE FROM tablename WHERE conditions;
– DELETE FROM employees WHERE x=„field‟;
• DELETE * from tablename; - removes data
• DROP TABLE tablename; - removes table

72
Linux Databases
CompTIA Linux+ Training

What We Covered

 SQL Overview

 MySQL - Database & Tables

 MySQL - Storing Data

 MySQL - Retrieving Data

 MySQL - Deleting Data

X11 Installation and


Configuration

CompTIA Linux+ Training


Instructor: Veronica Henry

X11 Installation and Configuration


CompTIA Linux+ Training

In This Lesson:
 Understanding the Linux GUI
 X Configuration Tools
 Configuring X
 X Font Configuration

73
X11 Installation and Configuration
CompTIA Linux+ Training

Understanding the Linux GUI


• X - Linux‟s graphical user interface or GUI
• Linux‟s GUI environment
– X Server implementations - responsible for drawing windows on
the screen; handles mouse and keyboard
• XFree86 (4.x) - early system, rare
• X.org.X11 - most common
• Accelerated-X – rare, made by Xi Graphics
– Window Manager
– GUI toolkit - creates X window applications
• GTK+ and Qt
– Desktop environment
• GNOME
• K Desktop Environment (KDE)

X11 Installation and Configuration


CompTIA Linux+ Training

X Configuration Tools
• X server tools
• XFree86 –configure
• Xorg –configure
• Queries hardware and produces configuration files:
– /root/XF86Config.new
– /root/xorg.conf.new
• Distribution tools
– Fedora - Display Settings tool
• system-config-display
• xf86cfg (4.x) or xorgcfg - deprecated
• XFree86 3.x - required by video card
– xf86config, Xconfigurator, XF86Setup

X11 Installation and Configuration


CompTIA Linux+ Training

Configuring X
• X configuration files
– X.org-X11
• xorg.conf
– Stored in /etc or /etc/X11
– XFree86 4.x
• XF86Config-4
– Stored in /etc/X11
• XF86Config
– Stored in /etc or /etc/X11
– XFree86 3.x
• XF86Config
– Stored in /etc r /etc/X11

74
X11 Installation and Configuration
CompTIA Linux+ Training

Configuring X (cont’d)
• Configuration file format
– Sections for each feature
Section “InputDevice”
Identifier “Mouse0”
Driver “…”
Options…
EndSection
• Runlevels
– telinit 3 (Fedora)
– Shut down guid - /etc/init.d/gdm (or xdm) stop
– Start X again – startx
• X server supports configuration directories /etc/X11/xorg.conf.d
and /usr/share/X11/xorg.conf.d

X11 Installation and Configuration


CompTIA Linux+ Training

Configuring X (cont’d)
• Configuration file sections
– Modules - loads X server modules or drivers
• Section “Module”, load
– Keyboard
• Section “InputDevice”, driver & options
– Mouse
• Section “InputDevice”, driver & options
– Monitor
• Section “Monitor”, modelname, horiz & vert sync, refresh,
modelines
– Video Card
• Section “Device”, driver, vendor, ram
• Section “Screen”, device, monitor, depth, display

X11 Installation and Configuration


CompTIA Linux+ Training

Configuring X (cont’d)
• Server layout section
– Section “ServerLayout”
Identifier
Screen
InputDevice
InputDevice
EndSection
– xdypinfo
• Information about current display (X, color, resolution)
• Section “InputDevice”, driver & options
– xwininfo
• Technical information about windows

75
X11 Installation and Configuration
CompTIA Linux+ Training

X Font Configuration
• Configured through X or a font server which delivers fonts using
network protocols
• Font types:
– Bitmap - pixels are either active or inactive
– Outline or scalable fonts - each character is represented as
series of lines and curves
• Adobe PostScript Type 1
• TrueType
• X core fonts
– Require font directory
– Require to add font directory to X‟s font path

X11 Installation and Configuration


CompTIA Linux+ Training

X Font Configuration (cont’d)


• Font directory
– Typical storage: /usr/share/fonts or /usr/share/X11/fonts
– Downloading own fonts: /opt/fonts or /usr/local/fonts
• File types
– Adobe PostScript Type 1 - .pfa or .pfb
– TrueType - .ttf
• Font summary file
– mkfontscale - reads all the fonts in the current directory and
creates a file called fonts.scale
– mkfontdr - combines fonts.scale with fonts.dir

X11 Installation and Configuration


CompTIA Linux+ Training

X Font Configuration (cont’d)


• Programs
– ttmkfdir - true type
– type1inst - type 1
• Modifying the path
– Edit the files section of XF86Config or xorg.conf
• Section “Files”
• FontPath “/usr/local/fonts”

76
X11 Installation and Configuration
CompTIA Linux+ Training

X Font Configuration (cont’d)


• Testing the changes
– Shutdwown and restart X
• xset fp+ /usr/local/fonts
• xset fp rehash
• xfontsel
• Configuring the font server
– Edit font path to point to server
• Xft fonts
– Edit /etc/fonts/local.conf to add new directory
– Run fc-cache as root to create index files

X11 Installation and Configuration


CompTIA Linux+ Training

What We Covered
 Understanding the Linux GUI
 X Configuration Tools
 Configuring X
 X Font Configuration

Display Manager and


Accessibility Options

CompTIA Linux+ Training


Instructor: Veronica Henry

77
Display Manager and Accessibility Options
CompTIA Linux+ Training

In This Lesson:
 The X Login System
 XDMCP Server Configuration
 X and Remote Access
 Accessibility Options

Display Manager and Accessibility Options


CompTIA Linux+ Training

The X Login System


• GUI vs. text logins
– GUI typically used for users, text logins for servers
• X GUI login - X Display Manager Control Protocol (XDMCP)
• X display manager (XDM)
• GNOME display manager (GDM)
• KDE display manager (KDM)
– Launch from /etc/inittab or SysV startup script
• /etc/sysconfig/desktop (Fedora)
• SysV: gdm, kdm, xdm script (Ubuntu)

Display Manager and Accessibility Options


CompTIA Linux+ Training

XDMCP Server Configuration


• XDM server configuration files
– /etc/X11/xdm/xdm-config
– /etc/X11/xdm/Xaccess
– /etc/X11/xdm/Xresources
• KDM server configuration files
– /etc/X11/kdm or /etc/kde/kdm
– [Xdmcp] enable true for network logins
• GDM server configuration files
– /etc/X11/gdm (gdm.conf)
– [xdmcp] yes for network logins

78
Display Manager and Accessibility Options
CompTIA Linux+ Training

X and Remote Access


• Understanding X clients and servers
– Server runs on a computer, clients are programs
– Remote connections server runs on computer and clients run
on a remote system
• The connection
– Login to client and open terminal
– xhost + servername
– Login to server (using secure protocol like ssh)
– On server type: export DISPLAY=client:0.0
– Run progams
– Logoff: xhost -servername

Display Manager and Accessibility Options


CompTIA Linux+ Training

Accessibility Options
• Keyboard and mouse
– Repeat rate
– Sticky keys
– Slow keys
– Bounce/debounce
– Mouse tracking and click
– Simulated mouse clicks
– Mouse emulation/navigation
– Mouse gestures
– gnome onscreen keyboard (gok)

Display Manager and Accessibility Options


CompTIA Linux+ Training

Accessibility Options (cont’d)


• On-Screen Keyboard
– Accessibility
– On-Screen Keyboard
– gok command activates the GUI program
• Screen Setting
– Default fonts
– Contrast
• Speaking
– Orca
– Emacspeak
• Braille Display
– BRLTTY
– Linux kernel 2.6.26

79
Display Manager and Accessibility Options
CompTIA Linux+ Training

What We Covered

 The X Login System

 XDMCP Server Configuration

 X and Remote Access

 Accessibility Options

User and Group


Accounts and Files

CompTIA Linux+ Training


Instructor: Veronica Henry

User and Group Accounts and Files


CompTIA Linux+ Training

In This Lesson:
 Introduction to Linux Users and Groups
 Creating User Accounts
 Changing User Accounts
 Creating Groups
 Changing Groups

80
User and Group Accounts and Files
CompTIA Linux+ Training

Creating User Accounts


• Linux Authentication
– Username and password
– Biometrics
• Username scheme rules
– Passwords
• Case sensitive, ex. vhenry vs. Vhenry
– Usernames
• Must begin with a letter
• Upper & lower case
• Symbols, no spaces
• Userids
– stored in /etc/passwd

User and Group Accounts and Files


CompTIA Linux+ Training

Creating User Accounts (cont’d)


• Adding users
– useradd options username
Option Purpose
–c comment Sets comments - phone, name, etc.
–d home-dir Specifies home directory, default is
/home/username
–e expire-date Sets account disable date YYYY-MM-DD
–f inactive-days Sets number of days before account
becomes completely disabled
-g default-group Sets name or GID of user‟s default group
-G group[…] Sets name or GID of one or more groups
user belongs to

User and Group Accounts and Files


CompTIA Linux+ Training

Creating User Accounts (cont’d)


Option Purpose
–m (default option) (–k Creates user home directory with files
skeleton-dir) from/etc/skel
–p encrypted-password Passes pre-encrypted password to system,
useful in scripts
–s shell Sets user‟s default login shell; bin/bash is
default
–u UID Sets up account with specified UID - 500 &
up; –o allows reuse
–r Creates a system account; No home
directory & /etc/login.defs
–n Disables group creation with same name
as user (Red Hat)

81
User and Group Accounts and Files
CompTIA Linux+ Training

Changing User Accounts


• Setting passwords
– passwd options username

Options Purpose
–k Updates an expired account
–l Locks account; ! added to password
–u Unlocks account; Removes !
–f Forces creation with no password
–d Removes password
–S Displays password info

User and Group Accounts and Files


CompTIA Linux+ Training

Changing User Accounts (cont’d)


• Changing other options associated with user accounts
– usermod options username (user shouldn‟t be logged in)

Options Purpose
–m When used with –d, moves users home
directory files
–l Changes user‟s login name
–L & –U Locks or unlocks user password

User and Group Accounts and Files


CompTIA Linux+ Training

Changing User Accounts (cont’d)


• Changing account expiration options
– chage options username

Options Purpose
–l Displays account expiration info for a user
–m mindays Sets minimum number of days between
password changes
0=multiple times a day
1=once/day
2=every 2 days
–M maxdays Sets maximum number of days between
password changes

82
User and Group Accounts and Files
CompTIA Linux+ Training

Changing User Accounts (cont’d)


• Changing account expiration options

Options Purpose
–d lastday Sets last day a password was changed
–I inactivedays Sets number of days between expiration
and disable
–E expiredate Sets expiration date YYYY/MM/DD
–W warndays Sets number of days before expiration that
system will warn user

User and Group Accounts and Files


CompTIA Linux+ Training

Changing User Accounts (cont’d)


• Modifying changes directly via /etc/passwd file
– tommy:x:505:100:Thomas Smith:/home/tsmith:/bin/bash
– Fields:
• Username
• Password (shadow password indicated by x)
• UID
• GID
• Comment
• Home directory
• Default shell

User and Group Accounts and Files


CompTIA Linux+ Training

Changing User Accounts (cont’d)


• /etc/shadow
– tommy:encryptedpwd:15010:0:-1:7:-1:-1
– Username
– Password
– Last password change
– Days until a change is allowed
– Days before change required
– Warning day before expiration
– Days between expiration and deactivation
– Expiration
– Special flag

83
User and Group Accounts and Files
CompTIA Linux+ Training

Changing User Accounts (cont’d)


• Deleting users
– userdel options username

Option Purpose
–r or --remove Removes all files from user‟s home
directory and mail spool
–f or --force Forces deletion while user logged in
–h or --help Lists of all userdel options

User and Group Accounts and Files


CompTIA Linux+ Training

Creating Groups
• groupadd options groupname

Option Purpose
–g GID Specifies a group id (–o to share)
–r Creates GID less than 500
–f Forces creation of a group with existing
name

User and Group Accounts and Files


CompTIA Linux+ Training

Changing Groups
• groupmod
– groupmod options groupname
• Options
– –g GID, –n newgroupname
– Use usermod to add user to group
• usermod –G developers ajones

84
User and Group Accounts and Files
CompTIA Linux+ Training

Changing Groups (cont’d)


• Setting password and assigning group administrators
– gpasswd options group

Option Purpose
–a user Adds user to group
–d user Removes user from group
–R Disallows new members with newgrp
–A user Specifies group administrators
–M user Adds users to list of group members

User and Group Accounts and Files


CompTIA Linux+ Training

Changing Groups (cont’d)


• Removing groups
– groupdel groupname
– /etc/group

User and Group Accounts and Files


CompTIA Linux+ Training

What We Covered

 Introduction to Linux Users and Groups

 Creating User Accounts

 Changing User Accounts

 Creating Groups

 Changing Groups

85
Job Scheduling

CompTIA Linux+ Training


Instructor: Veronica Henry

Job Scheduling
CompTIA Linux+ Training

In This Lesson:
 Cron Job Overview
 Creating Cron Jobs
 The Anacron Tool
 The At Command

Job Scheduling
CompTIA Linux+ Training

Cron Job Overview


• The cron program is a daemon
– checks files every minute
• /var/spool/cron
• /etc/cron.d
• /etc/crontab
• /etc/cron.hourly, daily, weekly, monthly
• System cron - created by root and used to perform system
maintenance
– Syntax:
• time accountname command

86
Job Scheduling
CompTIA Linux+ Training

Cron Job Overview (cont’d)


• Fields:
– 1st 5 - time: minute (0-59), hour (0-23),
day of the month (1-31), month (1-12),
day of the week (0-7, 0&7=Sun)
• *, all wildcard
• Comma list represents any of values
• Dash indicates a range
• /=stepped values or /10=ever 10 minutes
– Account name
– Command to run

Job Scheduling
CompTIA Linux+ Training

Creating User Cron Jobs


• Crontab utility
– crontab options file
– –u - user
– –l - displays current cron job
– –r - removes current cron job
– –e - edits current cron job
– Create configuration file and pass filename to crontab with
file parameter
• crontab –u username filename
– crontab –u tsmith my-cron
• variable=value

Job Scheduling
CompTIA Linux+ Training

Creating User Cron Jobs (cont’d)


– User cron jobs are stored in these directories:
• /var/spool/cron
• /var/spool/cron/tabs
• /var/spool/cron/crontabs
– Controlling access to cron
• Restrictions: executable permissions
• Use files to allow or disallow access:
– /etc/cron.allow
– /etc/cron.deny

87
Job Scheduling
CompTIA Linux+ Training

The Anacron Tool


• Anacron
– Keeps a record of programs it should execute and how often
– Launched via startup script
• Anacron‟s configuration file is /etc/anacrontab
– Comment lines
– Environment variables
– Job definitions:
• Period - program run frequency in day
• Delay - delay between anacron start and program run
• Identifier - string that identifies the command
• Command - command to be run

Job Scheduling
CompTIA Linux+ Training

The At Command
• The at - runs a single command at some point in the future
– at timeofday
• atd daemon must be running to use the at, stored in /etc/init.d
or /etc/rc.d/init.d
– Time of day HH:MM (noon, midnight, teatime-4:00pm)
– Day (if more than 24 hrs in advance) MMDDYY or DD.MM.YY
– Now +specified period in future
• atq - lists pending at jobs
• atrm - removes an at job from the queue
• batch - executes jobs when system load drops below 0.8
• Control access with files:
– /etc/at.allow
– /etc/at.deny

Job Scheduling
CompTIA Linux+ Training

What We Covered

 Cron Job Overview

 Creating Cron Jobs

 The Anacron Tool

 The At Command

88
Localization and System
Time

CompTIA Linux+ Training


Instructor: Veronica Henry

Localization and System Time


CompTIA Linux+ Training

In This Lesson:
 Time Zone Settings
 Understanding Locales
 Linux System Time
 Network Time Protocol Configuration

Localization and System Time


CompTIA Linux+ Training

Time Zone Settings


• Coordinated Universal Time (UTC) - Greenwich, England time
• To translate between UTC and your actual local time, Linux uses
the /etc/localtime file
• Date
– Friday Dec 31 10:05:55 EDT 2010
• Changing your timezone
– /usr/share/zoneinfo - view subdirectories, US, etc.
– Delete existing localtime file in /etc directory
– Create symbolic link to a new localtime file
• ls –s /usr/share/zoneinfo/US/Los_Angeles
– Type date to view change

89
Localization and System Time
CompTIA Linux+ Training

Understanding Locales
• A locale specifies language, country info
– language=territory.codeset@modifier
• language = en, sp, fr, etc.
• territory = US, SP, JP, etc.
• codeset = ASCII, ISO-8859, UTF8
• modifier = locale specific code
– locale command displays settings; -a shows all available
• Temporary change: set LC_ALL and LANG env variables
• export LANG=code.encoding
• export LC_ALL=code.encoding
• Permanent change, edit: ~/.bashrc or /etc/profile
• LANG=C

Localization and System Time


CompTIA Linux+ Training

Understanding Locales (cont’d)


• Converting between character sets
– iconv –f encoding –t encoding inputfile
• –f - source encoding
• –t - destination encoding
• --list - lists all encodings

Localization and System Time


CompTIA Linux+ Training

Linux System Time


• System clocks
– Hardware clock - which maintains computer time
– Software clock - which is set from the hardware clock when
the system boots
• Setting the software clock manually
– date [–u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
• No options - displays current date
• Passing a time - sets software clock in 24 hour format
– December 1, 2010 at 10:00am = date 1201100010
• -u, --utc, --universal - sets UTC time

90
Localization and System Time
CompTIA Linux+ Training

Linux System Time (cont’d)


• Synchronizing hardware and system clocks
• BIOS
• hwclock options
Option Purpose
-r or --show displays hardware clock
--set and --date=newdate sets hardware clock
--systohc sets hardware clock to software
clock
--hctosys sets software clock to hardware
clock
--utc treats hw clock as storing UTC

Localization and System Time


CompTIA Linux+ Training

Network Time Protocol Configuration


• Network Time Protocol (NTP)
– stratums, 0 - infinite, top level atomic clocks
• Locating a time source
– ISP
– Distribution NTP server lists
– Public NTP server pools
– Public server lists

Localization and System Time


CompTIA Linux+ Training

Network Time Protocol Configuration (cont’d)


• One system functions as NTP server
– ntp, xntp, ntpd, or xntpd
– Configuration file
• /etc/ntp.conf
– server clock.example.com
– server ntp.pangaea.edu
– server time.luna.edu
– Confirm changes with /etc/init.d restart

91
Localization and System Time
CompTIA Linux+ Training

Network Time Protocol Configuration (cont’d)


– Checking the status of ntp
• ntpq
– -p - displays server listing
– refid - shows the server to which each system is
synchronized
– st - shows the stratum
– * - denotes your system‟s synch machine
– + - indicates good times
– x - denotes discarded servers

Localization and System Time


CompTIA Linux+ Training

Network Time Protocol Configuration (cont’d)


• Configure clients to point to ntp server, not outside time server
• Restrict clients from acting as server
– iptables firewall rule
– Restrict default ignore in ntp.conf
– Restart daemon after any updates with /etc/init.d/ntpd
restart
– Verify changes with ntpq to
• Performing one time clock setting
– ntpdate hostname or ip address of ntp server
– ntp myclock.test.com
– ntpd -g

Localization and System Time


CompTIA Linux+ Training

What We Covered
 Time Zone Settings
 Understanding Locales
 Linux System Time
 Network Time Protocol Configuration

92
Managing System and
Kernel Logs

CompTIA Linux+ Training


Instructor: Veronica Henry

Managing System and Kernel Logs


CompTIA Linux+ Training

In This Lesson:
 The Syslog Daemon
 Manual Logging
 Log File Rotation
 Reviewing Log Files

Managing System and Kernel Logs


CompTIA Linux+ Training

The Syslog Daemon


• System logger (syslogd) - provides a centralized method to
handle log files
– Installed from sysklogd
– Works with klogd which handles kernel log messages
• System logger location
– /etc/syslog.conf (rsyslog.conf for Fedora)
• facility.priority action (facility and priority = selector)
– facility - type of program
– priority - code for the importance
– action - location of stored message

93
Managing System and Kernel Logs
CompTIA Linux+ Training

The Syslog Daemon (cont’d)


• facility options:
– auth authpriv, corn, daemon, kern, lpr, mail, mark, news,
security, syslog, user, uucp and local10 - local17
• priority options:
– debug, info, notice, warning, warn, error, err, crit, alert,
emerg, panic
• action options:
– Usually a filename in /var/log (messages, syslog, secure),
other options: console, remote pc, users - * = all

Managing System and Kernel Logs


CompTIA Linux+ Training

Manual Logging
• Tool that manually creates log files
– logger options message

Option Purpose
–i Records the process ID (PID)
–s Echoes data to standard error in addition to log file
–d Uses datagram rather than stream connection to
logger socket
–f file Logs contents of a file
–p pri Sets a priority
–t Removes logger tag in filenames
–u Logs directly to a network socket

Managing System and Kernel Logs


CompTIA Linux+ Training

Log File Rotation


• Meant to control log file size
– logrotate
• /etc/logrotate.conf

94
Managing System and Kernel Logs
CompTIA Linux+ Training

Log File Rotation (cont’d)


• logrotate.d files
– Example
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}

Managing System and Kernel Logs


CompTIA Linux+ Training

Log File Rotation (cont’d)


– Options:
• dateext - uses datecode
• compresscmd - for different compression
• create - for new log file
• time - for interval
• size - sets maximum file size
• x - sets old copies to be maintained
• mail - sets where to email
• nomail - says not to send any email
• prerotate and postrotate - specify scripts to be run (end
with endscripts)

Managing System and Kernel Logs


CompTIA Linux+ Training

Reviewing Log Files


• Tools to review log files
– pager (less)
– grep - to search for a string
– head and tail - used to view 1st 10 and last 10 lines of a file
– tail –f - echo lines on the screen as they are added
– Logcheck (Sentry)

95
Managing System and Kernel Logs
CompTIA Linux+ Training

What We Covered

 The Syslog Daemon

 Manual Logging

 Log File Rotation

 Reviewing Log Files

Email and Printing

CompTIA Linux+ Training


Instructor: Veronica Henry

Email and Printing


CompTIA Linux+ Training

In This Lesson:
 Email Basics
 Email Software
 Managing Your Email
 Email Security
 Printing Basics
 Common Unix Printing System
 Managing The Print Queue

96
Email and Printing
CompTIA Linux+ Training

Email Basics
• Protocol - a communications scheme, essentially a program that
allows dissimilar systems to communicate
• Email protocols
– Simple Mail Transfer Protocol (SMTP)
• SMTP servers aka Mail Transfer Agents (MTA)
– Post Office Protocol (POP)
– Internet Message Access Protocol (IMAP)
– /var/spool/mail
– Mail User Agents (MUA)
• Email client

Email and Printing


CompTIA Linux+ Training

Email Software
• 4 popular email servers:
– Sendmail
– Postfix
– Exim
– Qmail
• Additional software:
– Cyrus IMAP, Dovecot - pull mail servers
– Fetchmail - pulls mail with POP or IMAP and injects it into a
local SMTP mail queue
– Evolution, Kmail, Pine, and Mutt - mail readers (clients)

Email and Printing


CompTIA Linux+ Training

Managing Your Email


• Send and receive
– mail program (command line utility)
• send: mail –v –s subject –c cc-address –b bcc-address to
• read: mail –v –f name –u user
• –a - inserts arbitrary header
– nail – alternative
• –a - attaches a file
Option Purpose
–v Produces more verbose output
–s subject Specifies a subject
–c, –b Specifies carbon and blind copy
–f Reads mail; –u read mail of user)

97
Email and Printing
CompTIA Linux+ Training

Managing Your Email (cont’d)


• mailq - main email que manangement program
– sendmail -bp
– sendmail -q
– Postmail (postqueue) Exim(runq)
• Alias - can allow one address to accept mail for another
– /etc or /etc/mail
• name: addr1,addr2,…
• newaliases
• ~/.forward

Email and Printing


CompTIA Linux+ Training

Email Security
• Bugs - flaws in the program code that can be exploited by
attackers and used to compromise your system
• Configuration errors - related to the administrator
– open relay - relays messages from any computer to another

Email and Printing


CompTIA Linux+ Training

Printing Basics
• Linux and postscript printing
– postscript - default printing standard
– ghostscript - converts to printer friendly format
• Configuration files
– /etc/rc.d
– /etc/init.d
– /etc/rc?.d
– Search for configuration files with grep command

98
Email and Printing
CompTIA Linux+ Training

Common Unix Printing System


• Common Unix Printing System (CUPS)
– cupsd
• Configuration files
– /etc/cups
– /etc/cups/cupsd.conf
• <DefaultPrinter printername>
• Postscript printer definition files (/etc/cups/ppd)
– Directive order – deny and allow
– Default policy options
– Browsing control and access control
– Enable browsing
– Browsing access control

Email and Printing


CompTIA Linux+ Training

Common Unix Printing System (cont’d)


• Web based utility
– Internet Printing Protocol (IPP) - printer list exchange
– http://localhost:631

Email and Printing


CompTIA Linux+ Training

Managing The Print Queue


• Server Message Block (SMB) / Common Internet File System (CIFS)
– smb://username:password@server/share
• Line Printer Daemon (LPD) protocol
– lpd://hostname/queue
• lpr - submits a print job
– –Pqueuename, –r, –h, –J (–C & –T)
– –m username, –#
– mpage (size reduction)
• lprm - removes a print job
• lpq - displays the print queue

99
Email and Printing
CompTIA Linux+ Training

What We Covered

 Email Basics

 Email Software

 Managing Your Email

 Email Security

 Printing Basics

 Common Unix Printing System

 Managing The Print Queue

Internet Protocols

CompTIA Linux+ Training


Instructor: Veronica Henry

Internet Protocols
CompTIA Linux+ Training

In This Lesson:
 Networking and TCP/IP
 TCP/IP Protocol Types
 IP Addressing
 Network Hostnames
 Network Ports

100
Internet Protocols
CompTIA Linux+ Training

Networking and TCP/IP


• Transmission Control Protocol/Internet Protocol (TCP/IP) - type of
network stack; components of a network
• Network hardware
– Network cards, motherboard integration, external interfaces
– Ethernet
• 10Base-T
• 100Base-T
• 1000mbps or gigabit ethernet
– Token Ring, LocalTalk, Fiber Distributed Data Interface (FDDI),
High Performance Parallel Interface (HIPPI), etc.

Internet Protocols
CompTIA Linux+ Training

Networking and TCP/IP (cont’d)


– Wireless networking (Wi-Fi)
• 802.11a - max speed 54 Mbps
• 802.11b - max speed 11 Mbps
• 802.11g - max speed 54 Mbps
• 802.11n - max speed 300 Mbps
– Cabling - cat-5 or cat-5e
– Hubs - half duplex
– Switches - full duplex
– Wireless router - used by Wi-Fi
• Packets - chunks of data (frame in Ethernet)

Internet Protocols
CompTIA Linux+ Training

Networking and TCP/IP (cont’d)


• Protocol stacks - software that encodes and sends data
– TCP/IP, NetBEUI, AppleTalk, IPX/SPX
Client Server
TCP/IP Stack
Application Application

Transport Transport

Internet/ Internet/
Network Network
Data Link Data Link
Reply
Request

101
Internet Protocols
CompTIA Linux+ Training

TCP/IP Protocol Types


• Internet Protocol (IP)
– Network layer protocol (layer 2), best effort packet transfer
• Internet Control Message Protocol (ICMP)
– Network layer protocol (layer 2), commonly used to send
error messages
• User Datagram Protocol (UDP)
– Transport layer protocol (layer 3), fast with no delivery
guarantees
• Transmission Control Protocol (TCP)
– Transport layer protocol (layer 3), full error checking and
correction

Internet Protocols
CompTIA Linux+ Training

IP Addressing
• Network addresses - 6 bytes in length (hex), separated by colons
– Hardware address (Media Access Control (MAC) address)
• ifconfig ethn - discover hardware address
• eth0 Link encap: Ethernet Hwaddr 00:A0:CC:24:BA:02
• IPv4 addresses - 4 bytes in length
– Address Resolution Protocol (ARP) converts between IP &
MAC address
– 4 base-10 numbers (0-255) ex. 192.168.1.1
• IPv6 – 16 bytes in length (hex), separated by colons
– Upgrade to IPv4 - includes more security and more addresses
– Neighbor Discovery Protocol (NDP)
– 8 groups of 4 digit hex numbers
• fe80:0:0:0:200:f8ff:fe21:67cf

Internet Protocols
CompTIA Linux+ Training

IP Addressing (cont’d)
• Network mask (subnet mask or netmask)
– Identifies portion of IP address that a network address and
part that is a computer address, using binary 1 for network
and 0 for computer - 255 or 0 values, 255=network,
0=computer
– Ex. 255.255.255.0 = 1st 3 octets network add, last is node
– Represented by number of network bits in address:
192.168.1.1/24 = netmask 255.255.255.0

102
Internet Protocols
CompTIA Linux+ Training

IP Addressing (cont’d)
• Classless Inter-Domain Routing (CIDR) form
• Broadcast - sent to all computers on network

Class Address Range Reserved Address


A 1.0.0.0-127.255.255.255 10.0.0.0-10.255.255.255
B 128.0.0.0-191.255.255.255 172.16.0.0-
172.31.255.255
C 192.0.0.0-223.255.255.255 192.168.0.0-
192.168.255.255
D 224.0.0.0-239.255.255.255 none
E 240.0.0.0-255.255.255.255 none

Internet Protocols
CompTIA Linux+ Training

Network Hostnames
• Hostname - name of a computer
– Two parts - machine name and domain name
– TCP/IP can link computer names to IP addresses
• Resolving hostnames
– Domain Name System (DNS) - a database of computers that
converts between IP addresses and hostnames
• Manual DNS lookup
– nslookup - deprecated
– host - nslookup replacement
– dig - more complex lookup
– whois – general domain information, –H - omits legal
disclaimers

Internet Protocols
CompTIA Linux+ Training

Network Hostnames (cont’d)


• /etc/hosts - simpler than DNS but only local
– Edit /etc/nsswitch.conf to change lookup order from DNS to
file or vice versa
– Modify the hosts line
• /etc/networks - applies to network addresses (name followed by
IP)

103
Internet Protocols
CompTIA Linux+ Training

Network Ports
• Network ports are program addresses (like web browser)
– servers tie to ports at startup

Port TCP or UDP Purpose Example Server


20 TCP File Transfer Protocol ProFTPd, vsftpd
(FTP) data
21 TCP FTP ProFTPd, vsftpd
22 TCP Secure Shell (SSH) OpenSSH, Dropbear
23 TCP Telnet in.telnetd
25 TCP Simple Mail Transfer Sendmail, Postfix,
Protocol (SMTP) Exim, qmail

Internet Protocols
CompTIA Linux+ Training

Network Ports (cont’d)


Port TCP or UDP Purpose Example Server

53 TCP and UDP Domain Name System Berkeley Internet


(DNS) Name Domain (BIND)
djbdns

67 UDP Dynamic Host Internet Software


Configuration Protocol Consortium (ISC)
(DHCP) DHCP

80 TCP Hypertext Transfer Apache, Roxen, thttpd


Protocol (HTTP)

Internet Protocols
CompTIA Linux+ Training

Network Ports (cont’d)

Port TCP or UDP Purpose Example Server


111 TCP and UDP Portmapper NFS, NIS, RPC
services
113 TCP auth/ident identd
119 TCP Network News InterNetNews (INN),
Transfer Protocol Diablo, Leafnode
(NTTP)
139 TCP NetBIOS Session (Win Samba
sharing)
143 TCP Internet Mail Access Dovecot, Cyrus IMAP,
Protocol (IMAP) UW-IMAP

104
Internet Protocols
CompTIA Linux+ Training

Network Ports (cont’d)


Port TCP or UDP Purpose Example Server
161 UDP Simple Network Mgmt Net-SNMP
Protocol (SNMP)
177 UDP XDMCP XDM, KDM, GDM
389 TCP LDAP OpenLDAP
443 TCP HTTP over SSL Apache, Roxen
(HTTPS)
445 TCP Microsoft Directory Samba
Services (DS)
465 TCP SMTP over SSL; or Sendmail, Postfix,
URL Rendezvous Exim, qmail or
Directory (URD) network routers

Internet Protocols
CompTIA Linux+ Training

Network Ports (cont’d)

Port TCP or UDP Purpose Example Server


631 TCP Internet Printing CUPS
Protocol
993 TCP IMAP over SSL Dovecot, Cyrus IMAP,
UW-IMAP
995 TCP POP-3 over SSL Dovecot, Cyrus IMAP,
UW-IMAP
5900+ TCP Remote Framebuffer VNC, OpenVNC,
(RFB) TightVNC
6000- TCP X Window System X.org-X11, XFree86
6007

Internet Protocols
CompTIA Linux+ Training

What We Covered

 Networking and TCP/IP

 TCP/IP Protocol Types

 IP Addressing

 Network Hostnames

 Network Ports

105
Network Configuration
and Troubleshooting

CompTIA Linux+ Training


Instructor: Veronica Henry

Network Configuration and Troubleshooting


CompTIA Linux+ Training

In This Lesson:
 Dynamic Host Configuration Protocol
 Configuring Static IP Addresses
 Configuring Routing
 Configuring Devices and Hostnames
 Troubleshooting Overview

Network Configuration and Troubleshooting


CompTIA Linux+ Training

Dynamic Host Configuration Protocol


• DHCP allows one computer on the network to manage settings
for others
– Computer sends broadcast, searching for DHCP server
– Server replies using clients MAC address with config
information: IP, netmask, gateway, DNS server address
– DHCP lease
• DHCP clients:
– pump
– dhclient
– dhcpcd
• Startup script: /etc/sysconfig/network-scripts/ifcfg-eth0
– BOOTPROTO=dhcp
– /etc/network/interfaces on Debian (iface eth0 inet dhcp)

106
Network Configuration and Troubleshooting
CompTIA Linux+ Training

Configuring Static IP Addresses


• Manually configuring static IP addresses
– Using command line
– Using configuration files:
• /etc/sysconfig/network-scripts/ifcfg-eth0
• /etc/network/interfaces
• Required settings:
– IP address - set via the ipaddr line
– Netmask - set with the netmask line
– Gateway address - set with the gateway line
– DNS - set in the /etc/resolv.conf file using the keyword
nameserver followed by ip address

Network Configuration and Troubleshooting


CompTIA Linux+ Training

Configuring Static IP Addresses (cont’d)


• Configuring and displaying IP address and netmask
– For local networks
• ifconfig interface up address netmask mask
– For outside networks (ex. routing traffic to the Internet)
• route add default gw ipaddress

Network Configuration and Troubleshooting


CompTIA Linux+ Training

Configuring Routing
• Creating a route entry
– route [add |del] [-net | -host] target [netmask nm] [gw gw]
[reject] [[dev] interface]
• Enable routing
– echo “1” > /proc/sys/net/ipv4/ip_forward
– Permanent change
• Edit /etc/sysctl.conf to include: net.ipv4.ip_forward = 1
• ifup - initializes or brings up an interface
– ifup device
• ifdown - brings the device down
– ifdown device

107
Network Configuration and Troubleshooting
CompTIA Linux+ Training

Configuring Devices and Hostnames


• DNS – adds an entry to the DNS server
– /etc/hosts (alternative, must edit on remote systems)
• Local computer
– hostname myhost
• domainname - sets the domain name as used by network
information system
• dnsdomainname - sets it as used by DNS
• /etc/hostname (/etc/sysconfig/network on Fedora)

Network Configuration and Troubleshooting


CompTIA Linux+ Training

Troubleshooting Overview
• ping - sends icmp echo request packet from the source system to
the destination every second
– –c - sets number of packets
– ping –c 5 linux.com
• traceroute - sends 3 packets to each computer that sits between
your system and a target
– –n - says to show the target computers ip‟s instead of hostname
– traceroute –n 191.168.1.1
• tracepath - similar to traceroute but gives you 1 line of output for
each test packet
– tracepath system

Network Configuration and Troubleshooting


CompTIA Linux+ Training

Troubleshooting Overview (cont’d)


• netstat - checks network status
– --interface or –I - shows information about an adapter
– --route or –r - shows routing table
– --masquerade or –M - gets info about connection
– --program or –p - provides info about programs using network
connections
– --all or –a - used with other options and displays info about
ports
– No options - returns info about open ports and where they
connect

108
Network Configuration and Troubleshooting
CompTIA Linux+ Training

Troubleshooting Overview (cont’d)


• tcpdump - looks at raw traffic
– –A - displays in ascii
– –D - shows interfaces
– –n - displays addresses numerically
– –v - shows additional info
– –w file - writes packets to a file
• telnet – remote login tool, not encrypted
– telnet system
• file transfer protocol (FTP) – remote login tool
– ftp system

Network Configuration and Troubleshooting


CompTIA Linux+ Training

What We Covered

 Dynamic Host Configuration Protocol

 Configuring Static IP Addresses

 Configuring Routing

 Configuring Devices and Hostnames

 Troubleshooting Overview

Security Administration

CompTIA Linux+ Training


Instructor: Veronica Henry

109
Security Administration
CompTIA Linux+ Training

In This Lesson:
 Understanding the Super Server
 Unused Servers and Security
 The Role of Configuration Files
 Host Security

Security Administration
CompTIA Linux+ Training

Understanding the Super Server


• What is a super server?
– Program that listens for network connections on behalf of
another program and then hands off control to the intended
server
• Reduces server memory load
• Enables security checks at super server level
– 2 types of super servers:
• inetd & xinetd

Security Administration
CompTIA Linux+ Training

Understanding the Super Server (cont’d)


• The inetd super server
– First super server
– ps ax | grep inetd
• Adding serves to inetd
– /etc/inetd.conf (or split into several files in /etc/inetd.d)
– 1 line for each server, fields:
• Service name from /etc/services
• Socket type - type of connection, stream, dgram, raw
• Protocol - TCP or UDP
• Wait/no wait - for dgram sets whether server connects to
its clients & frees socket (nowait) or processes all
packets and then times out (wait) nowait for other
socket types

110
Security Administration
CompTIA Linux+ Training

Understanding the Super Server (cont’d)


• User - username used to run the server (root, nobody)
• Server name - server filename
• Parameters - everything after server name
• # hash marks denote comments, remove to activate line
– Restart server with /etc/rc.d/init.d/inetd restart or reload
– kill or killall command - sends SIGHUP signal
• kill –HUP pid
• killall –HUP inetd
– TCP wrappers program - tcpd
• Instead of inetd calling server, calls TCP - checks whether
client is authorized to access server, then calls server
• /etc/hosts.allow and /etc/hosts/deny
– daemonlist : clientlist

Security Administration
CompTIA Linux+ Training

Understanding the Super Server (cont’d)


• The xinetd super server
– Extended super server, includes TCP wrapper functionality
– /etc/xinetd.conf, etc/xinetd.d
– /etc/rc.d/init.d/xinetd restart (or kill, killall)
• bind - listens on only one network interface
• only_from - specifies IP addresses, network or host
names, separated by spaces
• no_access - blacklisted computers or networks
• access_times - sets times during which users can access
server (hour:min-hour:min)

Security Administration
CompTIA Linux+ Training

Unused Servers and Security


• Security best practices dictate disabling unused servers
– netstat - network status tool
• netstat -ap - lists all open ports or network connections
– lsof - lists open files (files include network connections)
• lsof –i or lsof –i :port
– nmap - network scanner (nessus includes check for known
vulnerabilities)
• –sT - scans TCP ports
• –sU - scans UDP ports
• nmap –sT targetsystem

111
Security Administration
CompTIA Linux+ Training

The Role of Configuration Files


• SysV startup scripts
– /etc/rc?.d
– /etc/init.d/rc?.d
– /etc/rc.d/rc?.d (?=default runlevel)
– Edit file to disable unwanted servers
• Super server scripts
– Only used to launch network servers
– /etc/inittab
• getty & mingetty
– /etc/event.d

Security Administration
CompTIA Linux+ Training

The Role of Configuration Files (cont’d)


• Disabling vs. removing
– Disable via script editing -allows you to easily reactivate a
server
– Remove via package manager - reduces risk of accidental
reactivation
– Removing is preferable

Security Administration
CompTIA Linux+ Training

Host Security
• Password rules
– Use strong passwords
• No dictionary words or names
• Include numbers
• Punctuation marks
• Upper/lower case, etc.
– Shadow passwords (/etc/shadow)
– Force periodic password changes
– Educate users (social engineering, phishing, multiple
passwords)
– Use ssh for remote logins
– Consider using password crackers

112
Security Administration
CompTIA Linux+ Training

Host Security (cont’d)


• Password management
– Password aging and expiration (shadow passwords)
• chage
• usermod
• Root account
– Use su command
• su with username acquires that user‟s privileges
• –c, to run a single program with root privileges
– su –c “netstat”
• sudo runs a single command as root
– sudo netstat -ap
– /etc/sudoers (visudo)

Security Administration
CompTIA Linux+ Training

Host Security (cont’d)


• Setting memory limits
– Pluggable Authentication Module (PAM), pam_limits
– /etc/security/limits.conf
• Domain type item value
– Domain - entity to which limit applies
– Type - specifies hard or soft limits
– Item - what type of item being limited
– Value - limit value

Security Administration
CompTIA Linux+ Training

Host Security (cont’d)


– ulimit - only affects bash programs and those launched from
bash
• ulimit [options [limit]] (-a show current settings)
– –c - limits size of core dumps
– –f - limits size of files created by shell
– –n - limits number of open file descriptors
– –u - limits number of processes a user can run
– –t - limits CPU time in seconds
– –v - sets virtual memory available to shell

113
Security Administration
CompTIA Linux+ Training

Host Security (cont’d)


– –s - sets maximum stack size
– –d - limits programs data set size
– –l - sets maximum size that can be locked in memory
– –H, –S - makes other options hard or soft limits
• Other option
– /etc/nologin - only root can log in

Security Administration
CompTIA Linux+ Training

Host Security (cont’d)


• SUID & SGID files
– Runs the program as the file or group owner
– When set to run as root, poses security risk
– Use find to search for and modify if necessary
• find / -perm +6000 -type f

Security Administration
CompTIA Linux+ Training

What We Covered
 Understanding the Super Server
 Unused Servers and Security
 The Role of Configuration Files
 Host Security

114
Encryption Options

CompTIA Linux+ Training


Instructor: Veronica Henry

Encryption Options
CompTIA Linux+ Training

In This Lesson:
 The Secure Shell (SSH) Overview
 SSH Configuration
 SSH Access Control & Logins
 SSH Security
 GNU Privacy Guard
 GNU Encryption

Encryption Options
CompTIA Linux+ Training

The Secure Shell (SSH) Overview


• What is ssh?
– The secure shell (ssh) is a secure end to end remote login
– Advantages:
• Strong encryption
• Tunneling capabilities
• File transfer
– Disadvantages:
• Slower connection = performance degradation
– Servers:
• OpenSSH (launch via super server or SysV startup script)
• /etc/init.d/sshd reload

115
Encryption Options
CompTIA Linux+ Training

SSH Configuration
• /etc/ssh/sshd_config
– Option value
• protocol , 1 or 2 (level 2 recommended)
• PermitRootLogin - set to no for added security
• X11Forwarding - enables tunneling features
• /etc/ssh/ssh_config (can be overridden by local file)
• Encryption keys (/etc/ssh/ssh_host_rsa_key &
ssh_host_dsa_key, .pub for public keys, ssh_host_rsa1_key)
– Private & public keys
– Generate keys with ssh-keygen
– ssh-keygen -q -t rsa1 -f /etc/ssh/ssh_host_key -C „‟ -N „‟
– ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C „‟ -N „‟
– ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C „‟ -N „‟

Encryption Options
CompTIA Linux+ Training

SSH Configuration (cont’d)


• Known hosts file (global cache)
– ~/.ssh/known_hosts in /etc or /etc/ssh
– Create by coping file from an account that has connected to
the hosts you‟d like to include
• cp /home/nancy/.ssh/known_hosts
/etc/ssh/ssh_known_hosts
– Hostname
– IP (or both)
– Key type
– Key

Encryption Options
CompTIA Linux+ Training

SSH Access Control and Logins


• Passwords
• TCP Wrappers - launch openssh to use or /etc/hosts.allow and
deny files to limit access using IP address
• Firewall rules
• /etc/nologin
• Logging in with no password - set up ssh client with keys and
give public key to the server
– Log into client as user who will be performing remote access
– ssh-keygen -q -t rsa -f ~/.ssh/id_rsa -C „‟ -N „‟
– Copy id_rsa.pub to another media under another name
– Log in to ssh server
– cat ~/temp.rsa >> ~/.ssh/authorized_keys
– Log out and log in ( some older clients require ssh -2 option)

116
Encryption Options
CompTIA Linux+ Training

SSH Access Control and Logins (cont’d)


• ssh-agent
– Log into client as user who will be performing remote access
– ssh-keygen -q -t rsa -f ~/.ssh/id_rsa -C
– Copy id_rsa.pub to another media under another name
– Log in to ssh server
– cat ~/temp.rsa >> ~/.ssh/authorized_keys
– Log out and log in
– On client: ssh-agent /bin/bash
– ssh-add ~/.ssh/id_rsa
• Login scripts
– sshrc (/etc or /etc/ssh)

Encryption Options
CompTIA Linux+ Training

SSH Access Control and Logins (cont’d)


• Port tunnels
– /etc/ssh/sshd_config
• AllowTcpForwarding no (change to yes)
– ssh –N –f –L 100:test.ssh.com:143 test.ssh.com
• –N - don‟t execute remote programs
• –f - execute in the backgroud
• –L - specifies local port on which to listen, remote
computer to which to connect, port on the remote
computer you want to connect to
• Copying files
– scp file account:
• scp testfile user@user.com:

Encryption Options
CompTIA Linux+ Training

SSH Security
• Set ssh to:
– Accept only level 2 protocol connections
– Refuse direct root logins
– Disable X forwarding if not needed
– Use TCP Wrappers or firewall to limit access
– Update software
– Protect private keys

117
Encryption Options
CompTIA Linux+ Training

GNU Privacy Guard (GPG)


• GPG is an email encryption tool that allows digital signatures
(Pretty Good Privacy implementation)
– Generate keys (private and public pair)
• gpg --gen-key (~/.gnupg)
– Export public key
• gpg --export emailaddress > gpg.pub
– Import public keys to key ring
• gpg --import filename
– View keys
• gpg --list-keys

Encryption Options
CompTIA Linux+ Training

GNU Encryption
• Encrypt data
– gpg --out encrypted-file --recipient uid --armor --encrypt
original-file
• Decrypt data
– gpg --out decrypted-file --decrypt encrypted-file
• enter passphrase
• Sign messages
– gpg --clearsign file (--sign creates new file with.gpg)
• Verify messages
– gpg --verify file

Encryption Options
CompTIA Linux+ Training

What We Covered

 The Secure Shell (SSH) Overview

 SSH Configuration

 SSH Access Control & Logins

 SSH Security

 GNU Privacy Guard

 GNU Encryption

118
Preparing for Your
CompTIA Linux+
Certification Exam
(LX0-102)
CompTIA Linux+ Training
Instructor: Veronica Henry

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

In This Lesson:
 Exam Overview
 Where to Take the Exam
 Retake Policy
 Exam Preparation Tips
 After the Exam

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Exam Overview
• Experience
– CompTIA A+, CompTIA Network+ and at least 12 months of
Linux administration experience
– http://www.comptia.org/certifications/testprep/examobjectiv
es.aspx
• LX0-102
Domain % of Examination
105 Shells, Scripting and Data Management 17%
106 User Interfaces and Desktops 8%
107 Administrative Tasks 20%
108 Essential System Services 17%
109 Networking Fundamentals 23%
110 Security 15%

119
Preparing for Your CompTIA Linux+ Certification Exam
CompTIA Linux+ Training

Exam Overview
• 60 Questions, 90 minutes to complete
– Multiple choice
– Fill-in the blank
• Scoring
– 500 on a scale of 200-800

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Where to Take the Exam


• Pearson Vue
– http://www.pearsonvue.com
– $150 -$168
• Prometric
– http://www.prometric.com/CompTIA/default.htm

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

Retake Policy
• 1st retake has no waiting period, but for 3rd and any
subsequent attempts, must wait 14 days.
– If a Candidate has passed an exam, he/she cannot take it
again without prior consent from CompTIA.
– CompTIA beta examinations may only be taken one (1) time
by each candidate.
– A test result found to be in violation of the retake policy will
not be processed, which will result in no credit awarded for
the test taken. Repeat violators will be banned from
participation in the CompTIA Certification Program.

120
Preparing for Your CompTIA Linux+ Certification Exam
CompTIA Linux+ Training

Exam Preparation Tips


• Man and info pages
– man commandname
– info commandname
• Review the lessons
• Practice
• Save tough questions for last

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

After The Exam


• Your Linux+ certificate
– https://www.certmetrics.com/comptia/login.aspx
• Linux Professional Institute Certification (LPIC -1)
– Contacting LPI to obtain
• Novell Certified Linux Administrator (CLA)
– http://practicum.novell.com/LPI2CLAForm.php
• Logos for download

Preparing for Your CompTIA Linux+ Certification Exam


CompTIA Linux+ Training

What We Covered
 Exam Overview
 Where to Take the Exam
 Retake Policy
 Exam Preparation Tips
 After the Exam

121
Next Steps

CompTIA Linux+ Training


Instructor: Veronica Henry

Next Steps
CompTIA Linux+ Training

In This Lesson:
 What We Learned
 Follow Up
 What‟s Next

Next Steps
CompTIA Linux+ Training

What We Learned
• System Architecture
• Linux Installation and Package Management
• GNU and Unix Commands
• Devices, Filesystems and Filesystem Hierarchy Standard
• Shells, Scripting and Data Management
• User Interfaces and Desktops
• Administrative Tasks
• Essential System Services
• Networking Fundamentals
• Security

122
Next Steps
CompTIA Linux+ Training

Follow Up
• Preparing for the Linux+ Certification Exams
• Transcender Lessons
• Course Reference Material
• CompTIA Linux+
– http://www.comptia.org/certifications/listed/linux.aspx

Next Steps
CompTIA Linux+ Training

What’s Next
• After passing LX0-101 and LX0-102, you will be Linux+ certified
– Linux Professional Institute LPIC-1
– Novell Certified Linux Administrator (CLA)
• Linux Professional Institute Certification
– Advanced Level Linux Professional LPIC-2
– Senior Level Linux Professional LPIC-3
– http://www.lpi.org/eng/certification/the_lpic_program
• Novell Certifications
– Novell Certified Linux Desktop Administrator
– Novell Certified Linux Engineer
– http://www.novell.com/training/certinfo/

123

You might also like