The following questions will help you measure your understanding of the material presented in this chapter. As no multiple choice questions appear on the Red Hat exams, no multiple choice questions appear in this book. These questions exclusively test your understanding of the chapter. While the topics in this chapter are "prerequisites," it is okay if you have another way of performing a task. Getting results, not memorizing trivia, is what counts on the Red Hat exams. There may be more than one answer to many of these questions.
1. | What fdisk command lists configured partitions from all attached hard drives? _____________________________________________________________ |
|
2. | What command from the parted prompt lists all created partitions? _____________________________________________________________ |
|
3. | If you've just installed a new hard drive and are configuring it in parted, what command do you need to run first? ______________________________________________________________ |
|
4. | After creating a swap partition, what command activates it? ______________________________________________________________ |
|
Answers
1. | The fdisk command that lists configured partitions from all attached hard drives is fdisk -l. |
2. | The command from the parted prompt that lists all created partitions is print all. The print command by itself just prints active partitions. |
3. | If you've just installed a new hard drive and are configuring it in parted, the command you need to run first is mklabel. |
4. | After creating a swap partition, the swapon partitionname activates it; just substitute the device file associated with the partition (such as /dev/sda10 or /dev/VolGroup00/LogVol03) for partitionname. |
5. | What is the primary advantage of a journaling filesystem such as ext3? ______________________________________________________________ |
|
6. | What can you run on /etc/samba/smb.conf to make sure even the administrative user can't delete it just using the rm command? The command must still allow the file to be readable. ______________________________________________________________ |
|
7. | What command formats /dev/sdb3 to the default Red Hat filesystem format? ______________________________________________________________ |
|
Answers
5. | The primary advantage of a journaling filesystem such as ext3 is faster data recovery if power is suddenly cut. |
6. | To make sure even the administrative user can't delete /etc/samba/smb.conf just using the rm command, run chattr +i /etc/samba/smb.conf. Other commands such as chmod 000 /etc/ samba/smb.conf provide some level of protection, but the file would no longer be readable. |
7. | The command that formats /dev/sdb3 to the default Red Hat filesystem format is mkfs.ext3 /dev/sdb3. Since ext3 is atop the list in /etc/filesystems, the mkfs /dev/sdb3 command works as well. |
8. | To change the mount options for a local filesystem, what file would you edit? ______________________________________________________________ |
|
9. | If you've started the autofs daemon and want to read the list of shared NFS directories from the first.example.com computer, what automounter-related command would you use? ______________________________________________________________ |
|
10. | What daemon do you need to activate before using the automounter? ______________________________________________________________ |
|
Answers
8. | To change the mount options for a local filesystem, edit /etc/fstab. |
9. | If you've started the autofs daemon and want to read the list of shared NFS directories from the first.example.com computer, the automounter-related command you'd use to list those directories is /etc/auto.net first.example.com. |
10. | The daemon you need to activate before using the automounter is autofs. |
11. | What setting do you need to add to /etc/fstab to make sure a filesystem is mounted with ACLs the next time you boot Linux? ______________________________________________________________ |
|
12. | What is the default policy associated with SELinux on Red Hat distributions? ______________________________________________________________ |
|
Answers
11. | The setting you need to add to /etc/fstab to make sure a filesystem is mounted with ACLs the next time you boot Linux is acl. For example, if you want to support ACL options, you can add the setting to the desired line in that file. The following would add ACL options to the directory labeled /home:
LABEL=/home /home ext3 defaults,acl 1,2 |
12. | The default policy associated with SELinux on Red Hat distributions is targeted. |