Linux+ Networking Chapter 6

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Ajeff
A
Ajeff
Community Contributor
Quizzes Created: 39 | Total Attempts: 52,866
Questions: 18 | Attempts: 1,082

SettingsSettingsSettings
Linux+ Networking Chapter 6 - Quiz

Linux+ Networking Chapter 6


Questions and Answers
  • 1. 

    You want to see the filesystems that are presently in use on the system. What command could you use?

    • A.

      Cat /etc/fstab

    • B.

      Ls -l /etc/fstab

    • C.

      Cat /etc/mtab

    • D.

      Ls -l /etc/fstab

    Correct Answer
    C. Cat /etc/mtab
    Explanation
    The command "cat /etc/mtab" can be used to see the filesystems that are presently in use on the system. The "/etc/mtab" file contains a list of all currently mounted filesystems on the system. By using the "cat" command, the contents of the file are displayed, allowing the user to see the filesystems that are currently in use.

    Rate this question:

  • 2. 

    Jim has just purchased two new SCSI hard disk drives and a controller card for them. He properly installs the hardware in his machine. Before he can use them for data storage and retrieval, what must he do? (Choose all that apply.)

    • A.

      Use the vi editor to edit /etc/mtab and create an entry for the controller card and the hard disk drives.

    • B.

      Mount a filesystem to each of the hard disk drives.

    • C.

      Use the fdisk command to create one or more partitions on each of the hard disk drives.

    • D.

      Mount any partitions created on the two hard drives such that they are accessible by the operating system.

    • E.

      Format any partitions created with a valid filesystem recognized by Linux.

    Correct Answer(s)
    C. Use the fdisk command to create one or more partitions on each of the hard disk drives.
    D. Mount any partitions created on the two hard drives such that they are accessible by the operating system.
    E. Format any partitions created with a valid filesystem recognized by Linux.
    Explanation
    Jim must use the fdisk command to create one or more partitions on each of the hard disk drives. This is necessary to divide the disk space into separate sections that can be used for different purposes. He must also mount any partitions created on the two hard drives so that they are accessible by the operating system. This allows the system to recognize and access the partitions as separate storage areas. Finally, Jim must format any partitions created with a valid filesystem recognized by Linux. This prepares the partitions for data storage and retrieval by organizing the disk space and implementing the necessary file structure.

    Rate this question:

  • 3. 

    Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command?LABEL=/        /                     ext3     defaults               1 1 none            /dev/pts            devpts   gid=5,mode=620   1 0 none           /proc                  proc     defaults                0 1 none           /dev/shm            tmpfs    defaults               1 0 /dev/hdc2      swap                swap     defaults              0 1   /dev/cdrom   /mnt/cdrom       iso9660  noauto,owner,kudzu,ro 0 0 /dev/fd0       /mnt/floppy          auto      noauto,owner,kudzu    0 0

    • A.

      None, as fsck must be run manually for each filesystem

    • B.

      /, /dev/pts and /dev/shm

    • C.

      /, /proc and swap

    • D.

      All of them, as fsck is run automatically at boot for all filesystems

    Correct Answer
    C. /, /proc and swap
    Explanation
    The filesystems that will be automatically checked on boot by the fsck command are /, /proc, and swap. This can be determined by looking at the first column of each line in the /etc/fstab output. The filesystems that have a "/" in the first column will be automatically checked on boot. In this case, /, /proc, and swap all have a "/" in the first column, indicating that they will be automatically checked.

    Rate this question:

  • 4. 

    A user mounts a device to a mount point directory and realizes afterward there are files previously found within the mount point directory that are needed. What should this user do?

    • A.

      Nothing; the files are lost and cannot ever be accessed.

    • B.

      Nothing; the files could not have been there as you can only mount to empty directories.

    • C.

      Unmount the device from the directory.

    • D.

      Run the fsck command to recover the file.

    • E.

      Look in the lost+found directory for the file.

    Correct Answer
    C. Unmount the device from the directory.
    Explanation
    If the user realizes that there are files within the mount point directory that are needed, the best course of action would be to unmount the device from the directory. This will disconnect the device from the directory and allow the user to access the files that were previously found within the mount point directory.

    Rate this question:

  • 5. 

    Which command is used to display the amount of free space that exists on a filesystem?

    • A.

      Fsck

    • B.

      Quota

    • C.

      Du

    • D.

      Df

    Correct Answer
    D. Df
    Explanation
    The command "df" is used to display the amount of free space that exists on a filesystem. It provides information about the total disk space, used space, available space, and the percentage of space used on each mounted filesystem. This command is commonly used to check the disk usage and determine if there is enough space available for storing new files or data.

    Rate this question:

  • 6. 

    What must you do to successfully run the fsck command on a filesystem?

    • A.

      Run the fsck command with the -u option to automatically unmount the filesystem first.

    • B.

      Choose yes when warned that running fsck on a mounted filesystem can cause damage.

    • C.

      Unmount the filesystem.

    • D.

      Ensure that the filesystem is mounted.

    Correct Answer
    C. Unmount the filesystem.
    Explanation
    To successfully run the fsck command on a filesystem, it is necessary to unmount the filesystem first. This is because running fsck on a mounted filesystem can cause damage. Therefore, unmounting the filesystem ensures that it is not being accessed or modified during the fsck process, allowing for a safe and accurate check of the filesystem's integrity.

    Rate this question:

  • 7. 

    What does the command dumpe2fs –h do?

    • A.

      Backs up an ext2 filesystem

    • B.

      Displays the number of inodes used and available in an ext2 filesystem

    • C.

      Dumps an ext2 filesystem

    • D.

      Is not a valid command

    Correct Answer
    B. Displays the number of inodes used and available in an ext2 filesystem
    Explanation
    The command "dumpe2fs -h" is used to display the number of inodes used and available in an ext2 filesystem. It provides information about the file system's inode usage, such as the total number of inodes, the number of used inodes, and the number of free inodes. This command is helpful in monitoring the inode usage and determining the available space in the file system.

    Rate this question:

  • 8. 

    The first floppy drive on the system is not responding. You enter the file /dev/fd0 command and receive the following output. What is the problem? [root@server1 root]# file /dev/fd0 /dev/fd0:  ASCII text [root@server1 root]#

    • A.

      The floppy drive cable has come loose.

    • B.

      There is no floppy disk in the drive.

    • C.

      The device file has become corrupt.

    • D.

      The floppy drive is seen as a character device.

    Correct Answer
    C. The device file has become corrupt.
    Explanation
    The output of the command "file /dev/fd0" shows that the device file is identified as "ASCII text" instead of a specific type of device file. This suggests that the device file for the floppy drive has become corrupt, causing it to not respond.

    Rate this question:

  • 9. 

    Which of the following statements are true? (Choose all that apply.)

    • A.

      Quotas can limit both user space and the number of files a user can own.

    • B.

      Quotas can only limit user space.

    • C.

      Hard limits can never be exceeded.

    • D.

      Hard limits allow a user to exceed them for a certain period of time.

    • E.

      Soft limits allow a user to exceed them for a certain period of time.

    Correct Answer(s)
    A. Quotas can limit both user space and the number of files a user can own.
    C. Hard limits can never be exceeded.
    E. Soft limits allow a user to exceed them for a certain period of time.
    Explanation
    Quotas can limit both user space and the number of files a user can own. This means that a user can be restricted in terms of the amount of storage space they can use and the number of files they can have. Hard limits, on the other hand, cannot be exceeded. Once a hard limit is reached, the user will not be able to create any more files or use any more space. Soft limits, however, allow a user to temporarily exceed the set limit for a certain period of time.

    Rate this question:

  • 10. 

    Hard disk drives need to be partitioned even if all space on the entire hard drive will be used and configured with one filesystem. True or False?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Hard disk drives need to be partitioned even if all space on the entire hard drive will be used and configured with one filesystem. This is true because partitioning allows for the organization and management of data on the hard drive. It helps to allocate specific portions of the disk for different purposes, such as separating the operating system files from user data. Even if the entire drive is used for one filesystem, partitioning still provides benefits in terms of data organization and management.

    Rate this question:

  • 11. 

    What happens if you type mount /mnt/floppy?

    • A.

      The system responds with a message prompting for more information.

    • B.

      The system responds with a message that the command failed due to missing parameters.

    • C.

      The command succeeds because a line with the necessary parameters exists in /etc/fstab.

    • D.

      The command succeeds because a line with the necessary parameters exists in /etc/mtab.

    Correct Answer
    C. The command succeeds because a line with the necessary parameters exists in /etc/fstab.
    Explanation
    When you type "mount /mnt/floppy", the command succeeds because a line with the necessary parameters exists in the /etc/fstab file. The /etc/fstab file is a configuration file that contains information about filesystems and their mount points. It specifies the parameters needed to mount a filesystem, including the device name, mount point, file system type, and other options. In this case, there is a line in the /etc/fstab file that specifies the necessary parameters for mounting the floppy disk at the /mnt/floppy mount point. Therefore, the command succeeds.

    Rate this question:

  • 12. 

    Which command is used to format a partition on a hard disk drive?

    • A.

      Format

    • B.

      None, because the hard disk drive and not the partition must be formatted

    • C.

      Mkfs -t type device

    • D.

      MakeFS –type device

    Correct Answer
    C. Mkfs -t type device
    Explanation
    The command "mkfs -t type device" is used to format a partition on a hard disk drive. The "mkfs" command stands for "make file system" and it is used to create a new file system on a device. The "-t" option is used to specify the type of file system to be created, and "type" is replaced with the desired file system type (e.g. ext4, ntfs, etc.). "Device" refers to the specific partition or disk that needs to be formatted.

    Rate this question:

  • 13. 

    Character devices typically transfer data more quickly than block devices. True or False?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    False. This statement is incorrect. Block devices typically transfer data more quickly than character devices. Block devices transfer data in fixed-size blocks, which allows for more efficient and faster data transfer compared to character devices, which transfer data character by character.

    Rate this question:

  • 14. 

    What does the du /var command do?

    • A.

      Shows the users connected to the /var directory

    • B.

      Shows the size of all directories within the /var directory

    • C.

      Dumps the /var directory

    • D.

      Displays the amount of free space in the /var directory

    Correct Answer
    B. Shows the size of all directories within the /var directory
    Explanation
    The du /var command is used to display the size of all directories within the /var directory. It provides information about the disk usage of each directory within /var, allowing the user to see the amount of space each directory is occupying. This can be helpful in identifying large directories and managing disk space efficiently.

    Rate this question:

  • 15. 

    A device file _______________________. (Choose all that apply.)

    • A.

      Has no inode section

    • B.

      Has no data section

    • C.

      Has no size

    • D.

      Displays a major and minor number in place of a file size

    • E.

      Has a fixed size of 300 kilobytes

    Correct Answer(s)
    B. Has no data section
    D. Displays a major and minor number in place of a file size
    Explanation
    A device file has no data section because it is not used to store data like regular files. Instead, it is used to represent devices connected to the system, such as hardware components or virtual devices. It displays a major and minor number in place of a file size because these numbers are used to identify the specific device that the file represents. The major number identifies the device driver, while the minor number identifies a specific device instance.

    Rate this question:

  • 16. 

     If the filesystem type is not specified with the mkfs command, it _________________.

    • A.

      Prompts the user for the filesystem to use

    • B.

      Displays a help screen detailing its usage

    • C.

      Uses the ext3 filesystem by default

    • D.

      Uses the ext2 filesystem by default

    Correct Answer
    D. Uses the ext2 filesystem by default
    Explanation
    If the filesystem type is not specified with the mkfs command, it uses the ext2 filesystem by default.

    Rate this question:

  • 17. 

    Which command mounts all existing filesystems in /etc/fstab?

    • A.

      Mount -f

    • B.

      Mount -a

    • C.

      Mount /etc/fstab

    • D.

      Mount /etc/mtab

    Correct Answer
    B. Mount -a
    Explanation
    The correct answer is "mount -a". This command is used to mount all filesystems listed in the /etc/fstab file. The /etc/fstab file contains information about the filesystems that should be mounted at boot time. By using the "mount -a" command, all the filesystems mentioned in the /etc/fstab file will be mounted.

    Rate this question:

  • 18. 

    A user runs the fsck command with the -a option on a filesystem that is showing signs of corruption. How would that user locate any files the system was unable to repair?

    • A.

      Look in the root of the filesystem.

    • B.

      The system prompts the user for a target location when it comes across a file it cannot repair.

    • C.

      Mount the filesystem and check the lost+found directory underneath the mount point.

    • D.

      View the contents of the directory /lost+found.

    Correct Answer
    C. Mount the filesystem and check the lost+found directory underneath the mount point.
    Explanation
    When running the fsck command with the -a option on a corrupted filesystem, the system will attempt to automatically repair any errors it encounters. However, if it comes across a file that it cannot repair, it will move that file to a special directory called "lost+found". To locate any files that the system was unable to repair, the user needs to mount the filesystem and check the lost+found directory located underneath the mount point. This directory will contain any files that were found to be corrupted or damaged during the fsck process.

    Rate this question:

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.