Changes

Jump to: navigation, search

Review Questions for Test 1

5,608 bytes added, 22:48, 15 October 2008
The easiest way to recover the root password for GNU/LINUX in case we lost it, is
* /etc/grub/grub.conf
* /root/grub.conf
* '''/boot/grubetc/grub.conf'''
* /boot/grub.conf
* '''to allow a permitted user to execute a command as the superuser or another user'''
* to switch to the root user
 
=== What command would you use to set the maximum mount count of the file system to 100?===
 
* '''tune2fs /dev/sda7 -c 100'''
* tune2fs /dev/sda2 -m 100
* resize2fs /dev/sda3 -c 100
* resize2fs /dev/sda5 -m 100
 
=== There is one line "#chkconfig: 3 92 08" in your script file. Its name is carpal and it is saved in /etc/init.d/ directory. When you execute the command "chkconfig --add carpal", What will happen? ===
 
* to produce links: "/etc/rc5.d/S92carpal" and "/etc/rc3.d/K08carpal"
* to produce links: "/etc/rc5.d/S92carpal" and "/etc/rc0.d/K08carpal"
* to produce links: "/etc/rc3.d/S92carpal" and "/etc/rc0.d/S08carpal"
* '''to produce links: "/etc/rc3.d/S92carpal" and "/etc/rc0.d/K08carpal"'''
 
=== Different Linux distributions uses different tools to install a package. Which one of following statements is true ?===
 
* '''Ubuntu uses apt-get, Opensuse uses zypper and Fedora uses yum or pkcon'''
* Ubuntu uses pkcon or zypper, Opensuse uses yum and Fedora apt-get
* Ubuntu uses zypper, Opensuse uses apt-get and Fedora uses yum or pkcon
* Ubuntu uses yum, Opensuse uses pkcon and Fedora uses yum or apt-get
 
=== How to unpack the file "linux-2.6.26.tar.bz2"?===
 
* tar cvjf linux-2.6.26.tar.bz2
* '''tar xvjf linux-2.6.26.tar.bz2'''
* tar tvjf linux-2.6.26.tar.bz2
* gunzip linux-2.6.26.tar.bz2|tar cvf -
 
=== How to compile kernel and modules?===
 
* make oldconfig
* '''make'''
*'''make modules'''
* rpmdev-setuptree
* make modules_install
 
=== How to create a initial ram disk image?===
 
* initrd (hd1,0)/initrd-2.6.26.5-45.fc9.i686.img
* initrd /initrd-2.6.26.5-45.fc9.i686.img
* '''mkinitrd -k vmlinuz-2.6.26 -i initrd-2.6.26'''
* mkinitrd (hd1,0)/initrd-2.6.26.5-45.fc9.i686.img
 
=== What is a daemon?===
 
* Just a process to stop another program
* '''A software process that runs in the background and provides the service to client upon request'''
* A process that runs one time. Once done it will stop
* A process that prevents multiple occurances from running at one time
 
=== What's the default run-level in Fedora ? ===
 
* 1
* 2
* 3
* 4
* '''5'''
* 7
 
=== Which command can reboot the system?===
 
* init 0
* init 2
* init 4
* '''init 6'''
*'''telinit 6'''
*'''reboot'''
 
=== Circle one, which is true for findfs command ? ===
 
* '''find a filesystem by label <u>or</u> UUID'''
* find a filesystem by label <u>and</u> UUID
* find a filesystem by UUID
* none of the above
 
=== Arrange them in proper order, going first process to last process ===
 
* A) kernel loads the needed kernel modules
* B) init program
* C) GRUB
* D) ROM BIOS loads loader from MBR
* E) loader finds and loads linux kernel and initial ram disk
 
<u>'''D'''</u> <u>'''C'''</u> <u>'''E'''</u> <u>'''A'''</u> <u>'''B'''</u>
 
 
=== The file system structure in GNU/Linux is like a inverted tree. The top of this inverted tree is started from ===
 
* /root
* '''/'''
* /etc/root
* /boot
 
option two (2) / is correct
 
=== What is the command to label as "videogames" the filesystem in the device /dev/bdisk ?===
 
* resize2fs /dev/bdisk videogames
* fdisk /dev/bdisk videogames
* e2label /dev/bdisk "videogames"
* resize2fs /dev/bdisk videogames
*'''e2label /dev/bdisk videogames'''
 
=== What is the device represented in the file grub.conf as (hd0,0) ?===
 
* /dev/hda3
* /dev/sdc2
* /dev/hda2
*''' /dev/sda1'''
* /dev/sdd2
* /dev/sda2
* /dev/sdb1
 
=== What is the device represented in the file grub.conf as (hd1,0) ?===
* /dev/hda3
* /dev/sdd2
* /dev/hda2
* /dev/sdc2
* /dev/sda1
* /dev/sda2
*''' /dev/sdb1'''
 
=== What is the device represented in the file grub.conf as (hd1,1) ?===
*''' /dev/sdb2'''
* /dev/hda2
* /dev/sdd2
* /dev/sda1
* /dev/sdc2
* /dev/sda2
* /dev/sdb1
 
=== What is the device represented in the file grub.conf as (hd0,2) ?===
* /dev/hda3
* /dev/hda2
* /dev/sda2
*''' /dev/sda3'''
* /dev/sdb1
* /dev/sdc2
* /dev/sdd2
 
=== pvcreate command is used for ? ===
* '''Initialize a disk or partition for use by LVM'''
* Creating a LVM
* Scanning a LVM
* none of above
 
=== _____ command is used to scan all the disks for volume groups and rebuild caches ===
* vgchange
* lvcreate
* '''vgscan'''
* lvm
 
=== When is a good time to use the "partprobe" command ? ===
* '''After creating, deleting or modifying partitions'''
* After reboot the system
* Sometimes
* In a sunny day
 
=== What does the command "partprobe" do ? ===
* Query a database
* Query the kernel version
* '''Look for modifications in the partitions of the system and then if something was modified, load the new informations in to the kernel'''
* Look for new partitions
 
=== Which command can be used to fill your hard drive with 0s ?===
*'''dd if=/dev/zero of=/dev/sda bs=1M'''
* ff
* e2fs
* fdisk
 
=== Which linux command can be used to make a image ?'''===
*'''dd'''
* mkisofs
* dd if=/dev/random of=/dev/device
* mkimage
 
=== What does the command losetup do ?===
*'''It associates a file to a device (Ex:losetup /dev/loop0 fakedisk)
* nothing
* reboot the computer
* It erases the setup (lose setup)
 
=== The Operating system on our computers, we usually call it Linux. But Linux is actually a name for ===
 
* Operating System
* '''Kernel '''
* boot loader
* none of above
 
=== The easiest way to recover the root password for GNU/LINUX in case we lost it, is ===
 
* open the /etc/passwd file in vi editor & look for root password
* boot the computer form CD/DVD in run level 5 and run the passwd command
* boot the computer with MS-Linux Xp/Vista Live CD then click Start->Control Panel->Change MSlinux Password option.
* '''boot the system in single user mode & change the root password with /usr/bin/passwd command '''
1
edit

Navigation menu