An organisation development specialistLinked In

Linux Fundamentals

Duration 2-3 days

This course gives an introduction to the Linux and Unix operating systems and to the Bash shell. Although based on Redhat (CentOS) Linux, the commands and principles learnt may also be applied to all other versions of both Linux and Unix.

The course takes the format of a workshop, with a mix of lecture, working examples and practical exercises. Although the content may be customised, at least 2 days are normally needed to cover the core elements.

Full course notes are provided along with sample script files and free software tools for use in accessing a Linux/Unix server.

This course is suitable for those who have some knowledge of Linux/Unix as well as those who are using the operating system for the first time. Previous experience with an interactive computer system is desirable but not essential.

A natural follow-up to this introductory course would be the Introduction to Linux/Unix Shell Scripts.

On-site Requirements
There should be no more than 12 delegates on the course and all delegates should meet the above pre-requisites. Each delegate should have access to a PC running Microsoft Windows with at least 1GB of memory, 20GB of free disc space and a DVD drive. The course uses the free software ORACLE Virtual Box, which may be installed before the course starts if preferred, and a supplied image file. For the trainer, a whiteboard, flipchart and pens are required and an overhead
projector that can link to a laptop would be a great help.

Course Content

Overview, Aims and Objectives, Sample Data, Schedule, Introductions, Pre-requisites, Getting Value, Responsibilities, Self Study Sections, Contents

Accessing The System
Objectives, What are UNIX and Linux?, Logging On, Command Syntax, Command Alone, Command With Options, Command With Filename, uname - Where Am I?, id - Who Am I?, who - Who is Logged On?, date - What is the Date/Time?, cal - Days and Months, echo - Displaying a Message, figlet, banner - Displaying a Message, man - Getting Help, exit - Leaving the System, Important Keys, stty - Showing Keys, passwd - Changing the Password, History of UNIX, History of Linux, Advantages, Disadvantages, Basic Structure, ps - Which Shell Am I Using, Bourne Shell, C Shell, Korn Shell, Bash Shell, Which Shell to Use?, Handouts

Commands And Concepts
Objectives, Processes and Files, Process Execution, System Directories, Listing Directories, cat, more, less - Displaying Files, wc - Counting lines in Files, nl -Numbering Files, file - Displaying File Types, Piping - using | symbol, Redirection - using > symbol, cat - Concatenating Output, Redirection - using >> symbol, tail - End of File Display, head - Start of File Display, Part of File Display, tee - Combining Redirection and Piping, Protecting Files - noclobber, Two Commands at Once - ;, Multi-line Command , Script - Saving the Session, su – Switching Users, sudo - Commands as Root, Piping and Redirection

Directory Commands
Objectives, Home Directory - HOME, Working Directory - pwd, cd – Changing Directories, Command Prompt - PS1, Secondary Prompt - >, Files or Directories?, Aliases, Using Aliases, Customising the Shell, . - dot Command, type - Type of command, Command History, Line Completion, mkdir - Make Directory, Special Files - . and .., rmdir - Remove Directory, Using Path Names, Self Study, Changing Directories - Pushd And Popd

File Commands
Objectives, cp - Copying Files, Interactive Copy - cp -i, mv - Moving Files, Interactive Move - mv -i, Copying Directories, Moving Directories, touch - Creating Files, rm - Removing Files, Interactive Remove - rm -i, Removing Unusual Files, Read Only Files - rm -f, Removing Directories - rm -r, Wild Cards - File Name Generation, Wild Cards - using *, Wild Cards with cp, Wild Cards with rm, Wild Card Examples, Wild Cards - using ?, Wild Cards - using [ ], Word count - wc, Echo with Commands, Workshop, Workshop Answers

Finding Files And Job Control
Objectives, find - Finding Files, More on Redirection, Redirecting Errors, Using /dev/null, Redirecting to the Same File, Foreground Jobs, Background Jobs - &, kill - Stopping Jobs, jobs - Job Control, at - Scheduling a Job, crontab – Schedule a Job, crontab Options, find - Finding Multiple Files, find - Find and Execute Command, find - Examples, ln - Linking Files, Linking Directories - ln -s, ln - Examples, write - Sending a Message, mesg - Setting Permissions, mailx, mail - Mailing Users, Redirecting Input - using < symbol, Brace Expansion - { }, Piping into Commands, Self Study, Print System, pr - Format Files, lpstat, lp, cancel - Printing Files, lpq, lpr, lprm - Printing Files, nohup Command, nice Command,
Redirecting Input - using << symbol

The Vi And Vim Editors
Objectives, What is vi?, What is vim?, Using vi, vi Command Mode - Moving the Cursor, vi Input Mode - Inserting and Changing Text, vi Deleting Text, Exiting from vi, vi Setting Options, vi Regular Expressions, vi Global Search Commands, vi Cut and Paste Text - delete and put, vi Copying Text - yank and put, Comparing Files - cmp, diff, sdiff, vimdiff, vi Line Addresses, vi Global Substitution, Why use vi?, Features of vim, vim Highlighting

Finding Text And Sorting
Objectives, grep - Finding Text in Files, grep - Using Regular Expressions, egrep - Expression grep, fgrep - Fast grep, Using Filters, sort - Sorting Files, sort - Redirection, Sort - Using Fields, Sort - Field Separator, uniq – Removing Duplicates, cut - Cropping Text, cut - Using Delimiters, tr - Translate File, Sort - Using Characters, Self Study, awk - Displaying Columns, grep – Searching Sub-directories, xargs - Passing Filenames, More Regular Expressions, Regular Expression Examples Backup Commands Objectives, tar - Backing Up Files, tar - Viewing the Archive, tar - Restoring a File, tar - Restoring a File using Wildcards, gzip - Compress an Archive, gunzip - Uncompress an Archive, Self Study, Backup Script, cpio - Backing Up Files, cpio - Viewing the Archive, cpio - Restoring a File

File Permissions
Objectives, Permissions - File and Directory, Permissions - Evaluating, chmod - Changing Permissions, chmod - More on Changing Permissions, Sticky Bit, SUID Bit, umask - Default File Permissions, umask - Changing Default Permissions, New Group - newgrp, Change Group - chgrp, Change Ownership - chown

Appendix A - Scripting
Creating Shell Scripts, Testing the Command, Creating the Script File, Testing the Script, Adding Execute Permissions, The PATH Variable, EXPORT PATH=$PATH:., Login Files, . - dot Command, Passing Parameters, read Command, read in Scripts, Tidying The Output, Choosing the Shell

Command Sheet by Description, Command Sheet by Command, vi Prompt