Exercises

advertisement
INTRODUCTION TO LINUX
Exercises & Discussions
This covers basic skills that are common to major distributions of Linux.



Linux Installation and Package Management
GNU and Unix Commands
Devices, Linux Filesystems, Filesystem Hierarchy Standard
Install at least 1 Linux distribution
(preferably Ubuntu)
Description:
Candidates should be able to install a working linux distribution of
choice.
GNU and Unix Commands
Work on the command line
Description:
Candidates should be able to interact with shells and commands using the
command line. The objective assumes the bash shell.
Key Knowledge Areas
1. Use single shell commands and one line command sequences to perform
basic tasks on the command line.
2. Use and modify the shell environment including defining, referencing
and exporting environment variables.
3. Use and edit command history.
4. Invoke commands inside and outside the defined path.
Terms and Utilities










bash
echo
env
exec
export
pwd
set
unset
man
uname
INTRODUCTION TO LINUX

history
Perform basic file management
Description: Candidates should be able to use the basic Linux commands to
manage files and directories.
Key Knowledge Areas
1.
2.
3.
4.
5.
6.
Copy, move and remove files and directories individually.
Copy multiple files and directories recursively.
Remove files and directories recursively.
Use simple and advanced wildcard specifications in commands.
Using find to locate and act on files based on type, size, or time.
Usage of tar, cpio and dd.
Terms and Utilities

















cp
find
mkdir
mv
ls
rm
rmdir
touch
tar
cpio
dd
file
gzip
gunzip
bzip2
file
globbing
Perform basic file editing operations using
nano
Description:
Candidates should be able to edit text files using nano. This objective
includes nano navigation, basic, inserting, editing, deleting, copying and
finding text.
INTRODUCTION TO LINUX
Key Knowledge Areas
1. Navigate a document using nano.
2. Insert, edit, delete, copy and find text.
Manage file permissions and ownership
Description:
Candidates should be able to control file access through the proper use of
permissions and ownerships.
Key Knowledge Areas
1. Manage access permissions on regular and special files as well as
directories.
2. Use access modes such as suid, sgid and the sticky bit to maintain
security.
3. Know how to change the file creation mask.
4. Use the group field to grant file access to group members.
Terms and Utilities
chmod
umask chown
chgrp
Manage user and group accounts and related
system files
add a user temba to the system with useradd,
create a home directory with -m
set user password with passwd
adduser to group with usermod
run id temba to see if user is member of the group
add a group called finance with groupadd
make temba a group administrator with gpasswd -A
su to temba and see if you can add yourself as a member of a
group with gpasswd -a
run id and see that temba is not a member of the group
finance
less /etc/group and see that temba is an administrator of the
group, by looking at the ::
exit the su context
create a directory /finance and copy some file to it.
change the group on /finance with chgrp -r /finance - this
will make all files owned by the finance group
change the permissions on the directory and files so they are
only accessible by the owner and group.
INTRODUCTION TO LINUX
i.e chmod -R 660 /finance/* and change the directory to chmod
770 /finance
su to temba and observe that you cannot list the /finance
directory or any file in it.
use the gpwasswd -a temba command to make temba a member of
the group finance
observer that temba can enter the /finance directory and read
files and create new ones
exit su
run groupdel finance. and do a ls -l /. Notice that the group
id is displayed and not the group name.
this is because deleting a group does not change ownership of
files owned by that group.
remove the /finance directory
ls /home to see temba's home director
delete temba with userdel -r, observe that the user home
directory is also deleted.
Download