CompTIA Linux+ - Chapter 5 Homework

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

You want to see the filesystems that are in use on the system. What command could you use? (Choose all that apply.) a. ls /sys/block b. cat /etc/fstab c. df -hT d. cat /etc/mtab

b. cat /etc/fstab d. cat /etc/mtab Explanation: /etc/mtab shows currently mounted filesystems; /etc/fstab lists configured filesystems. ls /sys/block just shows block devices.

Question 14 A device file _____. (Choose all that apply.) a. has a fixed size of 300 KB b. has no data section c. displays a major and minor number in place of a file size d. has no inode section

b. has no data section c. displays a major and minor number in place of a file size Explanation: Device files don't contain traditional data; they use major/minor numbers for device mapping.

Which command mounts all existing filesystems in /etc/fstab? a. mount /etc/mtab b. mount -a c. mount /etc/fstab d. mount -f

b. mount -a Explanation: The -a option tells mount to mount all filesystems mentioned in /etc/fstab.

Jaime has just installed two new SAS SSDs in his system. 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. Mount the two SSDs so they are accessible by the operating system. b. Use the vi editor to edit /etc/mtab and create an entry for the SSDs. c. Format any partitions created on the SSDs with a valid filesystem recognized by Linux. d. Mount any partitions created on the two SSDs such that they are accessible by the operating system. e. Create one or more partitions on each of the SSDs. f. Mount a filesystem to each of the SSDs.

c. Format any partitions created on the SSDs with a valid filesystem recognized by Linux. d. Mount any partitions created on the two SSDs such that they are accessible by the operating system. e. Create one or more partitions on each of the SSDs. Explanation: You must partition, format, and then mount the partitions to use the drives. Editing /etc/mtab manually is incorrect.

Which command is used to format a partition on a hard disk drive with the ext4 filesystem? a. e2mkfs -t ext4 device b. format_ext4 device c. ext4mkfs device d. makeext4FS device

a. e2mkfs -t ext4 device Explanation: e2mkfs (or mkfs.ext4) formats a partition using the ext4 filesystem.

You plug a USB flash drive into a system that has two SATA hard disk drives. How will the partition on this USB flash drive be identified by Linux? a. /dev/sdb1 b. /dev/sdc1 c. /dev/sda2 d. /dev/sda1

b. /dev/sdc1 Explanation: With two SATA drives as /dev/sda and /dev/sdb, the next detected device (USB) becomes /dev/sdc.

Character devices typically transfer data more quickly than block devices. a. True b. False

b. False Explanation: Block devices are usually faster than character devices because they buffer data in blocks.

Which command is used to display the amount of free space that exists on a filesystem? a. df b. du c. quota d. fsck

Answer: a. df Explanation: df shows disk space usage, including free space on mounted filesystems.

Which command can be used to repair an XFS filesystem? a. fsck -t xfs /dev/sdb1 b. xfs_repair /dev/sdb1 c. e2fsck /dev/sdb1 d. fsck.xfs /dev/sdb1

Answer: b. xfs_repair /dev/sdb1 Explanation: XFS filesystems require the xfs_repair tool for consistency checks and repair.

Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? /dev/sda1 /boot ext4 defaults 1 1 /dev/sda2 swap swap defaults 1 0 /dev/sda3 / ext4 defaults 0 1 /dev/sda4 /var ext4 defaults 1 0 /dev/sda1 /home ext4 defaults 0 1 /dev/sr0 /media/dvd iso9660 noauto,ro 0 0 a. /, swap, and /var b. all of them, as fsck is run automatically at boot for all filesystems c. none, as fsck must be run manually for each filesystem d. /, /boot, and /home

Answer: d. /, /boot, and /home Explanation: Filesystems with a nonzero sixth field in /etc/fstab are checked by fsck. The root (/) has highest priority if marked as 1.

A user mounts a device to a mount point directory and realizes afterward they need files previously found within the mount point directory. What should this user do? a. Nothing; the files could not have been there because you can only mount to empty directories. b. Nothing; the files are lost and cannot ever be accessed. c. Look in the lost+found directory for the files. d. Run the fsck command to recover the files. e. Unmount the device from the directory.

Answer: e. Unmount the device from the directory. Explanation: The files are hidden while the mount point is in use. Unmounting the device reveals them.

A user runs the fsck command with the -f option on an ext4 filesystem that is showing signs of corruption. How would that user locate any files the system was unable to repair? a. View the contents of the directory /lost+found. b. The system prompts the user for a target location when it comes across a file it cannot repair. c. Look in the root of the filesystem. d. Mount the filesystem and check the lost+found directory underneath the mount point.

d. Mount the filesystem and check the lost+found directory underneath the mount point. Explanation: fsck places unlinked or damaged files it couldn't fully restore into the lost+found directory.

What does the command df -i do? a. nothing; it is not a valid command b. displays mounted filesystems interactively, line by line c. displays mounted filesystems using human-readable size formats d. displays the number of used and available inodes on each mounted filesystem

d. displays the number of used and available inodes on each mounted filesystem Explanation: The -i option shows inode usage instead of block usage.

What does the du -hs /var command do? a. shows the size of all directories within the /var directory b. dumps the /var directory c. shows the users connected to the /var directory d. displays the total size of the /var directory

d. displays the total size of the /var directory Explanation: du -hs summarizes the total disk usage of /var in human-readable format.

Which of the following statements are true? (Choose all that apply.) a. Hard limits allow a user to exceed them for a certain period of time. b. Soft limits can never be exceeded. c. Quotas can only limit the number of files a user can own. d. Either a hard limit or a soft limit can be set, but not both concurrently. e. Hard limits can never be exceeded. f. Quotas can only limit user space. g. Soft limits allow a user to exceed them for a certain period of time. h. Quotas can limit both user space and the number of files a user can own.

e. Hard limits can never be exceeded. g. Soft limits allow a user to exceed them for a certain period of time. h. Quotas can limit both user space and the number of files a user can own. Explanation: Soft limits can be exceeded temporarily; hard limits are absolute. Quotas can apply to both space and file count.

The lvextend command can be used to add unused space within a volume group to an existing logical volume. a. True b. False

a. True Explanation: lvextend expands a logical volume using available space in the volume group.

What must you do to successfully run the fsck command on a filesystem? a. Unmount the filesystem. b. Choose yes when warned that running fsck on a mounted filesystem can cause damage. c. Ensure that the filesystem is mounted. d. Run the fsck command with the -u option to automatically unmount the filesystem first.

a. Unmount the filesystem. Explanation: Running fsck on a mounted filesystem can corrupt data; it must be unmounted first.

Which of the following statements regarding LVM structure is correct? a. VGs are comprised of one or more PVs. b. PVs use the space within LVs to create VGs. c. PVs are collections of VGs. d. LVs are created from the free space available within PVs.

a. VGs are comprised of one or more PVs. Explanation: LVM hierarchy: PVs (physical volumes) → VGs (volume groups) → LVs (logical volumes).

Which of the following commands can only be used to create partitions on a GPT storage device? a. gdisk b. parted c. fdisk d. cfdisk

a. gdisk Explanation: The gdisk utility is specifically designed for GPT partitioning, unlike fdisk and cfdisk which are primarily for MBR.

After a partition on a storage device is formatted with a filesystem, all partitions on that storage device must use the same filesystem. a. True b. False

b. False Explanation: Partitions on a single device can each use different filesystems; there's no requirement for uniformity.


Ensembles d'études connexes

PSY 314 Exam 2 Pt. 1 (Drugs of Abuse + Emotions + Hunger)

View Set

Child and Adolescent psychiatric Disorders

View Set

Introduction to Sociology Chapters 5 and 7

View Set

Chp 7 Portable Fire Extinguishers

View Set

FINC 318 Ch 12: The Cost of Capital SmartBook 2.0

View Set

Lý thuyết xác suất thống kê toán

View Set