LINUX STUDY GUIDE FOR CCTC EXAM
QUESTIONS WITH COMPLETE
SOLUTIONS
Linux boot process (up to kernel) - ANSWER-1. BIOS: searches for, loads and
executes boot loader program
2. MBR: 1st sector of bootable disk; includes: Bootstrap Code, Partition Table, Boot
Signature
3. GRUB: loads kernel image; has knowledge of the filesystem; can boot multiple OS
and kernels
4. Kernel: mounts the root file system; executes /sbin/init/; initrd is used by kernel as
a temp root filesystem until the real root file system is mounted
post kernel linux boot process - ANSWER-5. Init: identifies default initlevel; decides
Linux run runlevel
0- halt (shutdown)
1- single user
2- multiuser safemode
3- multiuser w/ networking
4- unused
5- multiuser w/ GUI
6- reboot
6: Runlevel: runlevel programs exexutes the programs from /etc/rc#.d/ where # = run
level
differences in boot processes across linux variants - ANSWER-SysV Init vs Systemd
SysV Init has PID = 1; starts at startup and runs till shutdown; if it can't start the
systems enters Kernel panic mode. SystemD also had PID=1 buts runs in
background and initiates parallel daemons so boot up is shorter.
UEFI vs MBR:
UEFI uses GPT so you can have unlimited paritions and is filesystem aware
what is a partition - ANSWER-logically divides a hard disk; standard is 4
components of the boot configuration file - ANSWER-/boot/
boot.0300 backup mbr
boot.b basic boot sector
chain.b for non linux os
config-[kernel-version] installed kernel configuration
os2_d.b boot the OS/2
system.map location of the kernel
vmlinux symbolic link to the kernel
initrd.img temporary file system
, grub GRUB config files
device.map maps devices in /dev to those used by grub
grub.conf GRUB conf file
messages welcome message
splash/xpm.gz boot-up background image
efi uefi bootloader
making changes to the boot config file - ANSWER-sudo update-grub
3.2 Describe the file system ownership properties - ANSWER-- use su to use root
password for complete access
- files are automatically owned by the person that created them
- for specifying the owner you use -u
ls -l = this tell you information about the file
3.3 Describe the file system permissions - ANSWER-ls -l [fileName]
- read (r), write (w), execute (x)
file system timestamps - ANSWER-- Access: last time file was read
- Modify: last time file content was modified
- Change: last time meta data of the file was changed (i.e. permissions)
file system attributes - ANSWER-use +[attr] to set and -[attr] to clear:
a append only
c compressed
d not backed up to a dump
h blocksize storing
i immutable
j journaling
s blocks are zeroed
t no tail merging
u undeletion
v version
A no atime record
D changes writing to disk
E file using extent format
I indexed directory
S contents written synchronously
T top of directory hierarchy
X raw contents of compressed file
Z indicates a compressed dirty file
commands for searching file system - ANSWER-$find [path] -[options] [expression]
Use grep to add search for content:
find [path] -[options] | grep "somestring"
-B before the expression
-A after the expression
QUESTIONS WITH COMPLETE
SOLUTIONS
Linux boot process (up to kernel) - ANSWER-1. BIOS: searches for, loads and
executes boot loader program
2. MBR: 1st sector of bootable disk; includes: Bootstrap Code, Partition Table, Boot
Signature
3. GRUB: loads kernel image; has knowledge of the filesystem; can boot multiple OS
and kernels
4. Kernel: mounts the root file system; executes /sbin/init/; initrd is used by kernel as
a temp root filesystem until the real root file system is mounted
post kernel linux boot process - ANSWER-5. Init: identifies default initlevel; decides
Linux run runlevel
0- halt (shutdown)
1- single user
2- multiuser safemode
3- multiuser w/ networking
4- unused
5- multiuser w/ GUI
6- reboot
6: Runlevel: runlevel programs exexutes the programs from /etc/rc#.d/ where # = run
level
differences in boot processes across linux variants - ANSWER-SysV Init vs Systemd
SysV Init has PID = 1; starts at startup and runs till shutdown; if it can't start the
systems enters Kernel panic mode. SystemD also had PID=1 buts runs in
background and initiates parallel daemons so boot up is shorter.
UEFI vs MBR:
UEFI uses GPT so you can have unlimited paritions and is filesystem aware
what is a partition - ANSWER-logically divides a hard disk; standard is 4
components of the boot configuration file - ANSWER-/boot/
boot.0300 backup mbr
boot.b basic boot sector
chain.b for non linux os
config-[kernel-version] installed kernel configuration
os2_d.b boot the OS/2
system.map location of the kernel
vmlinux symbolic link to the kernel
initrd.img temporary file system
, grub GRUB config files
device.map maps devices in /dev to those used by grub
grub.conf GRUB conf file
messages welcome message
splash/xpm.gz boot-up background image
efi uefi bootloader
making changes to the boot config file - ANSWER-sudo update-grub
3.2 Describe the file system ownership properties - ANSWER-- use su to use root
password for complete access
- files are automatically owned by the person that created them
- for specifying the owner you use -u
ls -l = this tell you information about the file
3.3 Describe the file system permissions - ANSWER-ls -l [fileName]
- read (r), write (w), execute (x)
file system timestamps - ANSWER-- Access: last time file was read
- Modify: last time file content was modified
- Change: last time meta data of the file was changed (i.e. permissions)
file system attributes - ANSWER-use +[attr] to set and -[attr] to clear:
a append only
c compressed
d not backed up to a dump
h blocksize storing
i immutable
j journaling
s blocks are zeroed
t no tail merging
u undeletion
v version
A no atime record
D changes writing to disk
E file using extent format
I indexed directory
S contents written synchronously
T top of directory hierarchy
X raw contents of compressed file
Z indicates a compressed dirty file
commands for searching file system - ANSWER-$find [path] -[options] [expression]
Use grep to add search for content:
find [path] -[options] | grep "somestring"
-B before the expression
-A after the expression