ch 8 linux +
gdisk -s
sorts the list of partitions
Save the details of the new array to a file for configuration at boot:
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
You have created a swap area on sda3, but it is not activated. What command will activate this swap partition?
swapon /dev/sda3
You need to back up Jane's files in the /home/user/jane directory. Which command will create a standard archive of these files in the /root directory? (Select two.)
tar -cvf /root/jane.tar /home/user/jane tar -czvf /root/jane.tgz /home/user/jane
Listen to exam instructions You need to restore a file, yearend.xls, from the archive 013004.tar.gz in the backup directory. The file needs to be restored to /home/accounting. Which of the following commands will perform the restore?
tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls
mdadm
this command is a tool used to manage software-based RAID (Redundant array of independent disks) arrays; it enables you to create, manage, and monitor RAID arrays.
lvreduce
to reduce the size of a logical volume.
vgreduce
to remove a physical volume from an existing volume group.
You recently upgraded your computer and added an extra 512 MB of RAM. Consequently, you want to increase your swap space by adding a new swap area. The second hard disk has an unused partition (/dev/sdb2) that you want to format for the swap area. Complete this lab from the Terminal. In this lab, your task is to: Create a swap partition on /dev/sdb2. Activate the swap partition.
type mkswap /dev/sdb2 and press Enter. Activate the swap partition. At the prompt, type swapon /dev/sdb2 and press Enter.
Which of the following commands restricts all-new file permissions by applying a filter to prevent specific permissions from being assigned to the file?
umask
You want to change your default umask to give yourself and members of the groups to which you belong full permissions to the files and directories you create. You want to deny permissions for everyone else. You are logged on as wadams. Complete this lab from the Terminal. You cannot create a file with execute permissions. You can only create a directory with execute permissions. After a file is created, its permissions can be changed to include execute. In this lab, your task is to: Change your default umask value to give yourself and members of the groups to which you belong full permissions to the files and directories that you create.
umask Question 1. 0022 umask 007
You want to display the current umask setting with a symbolic representation of the mask (such as u=rwx,g=rx,o=rx). Enter the command you would use to display the symbolic representation.
umask -S
An employee calls the help desk. Each time the employee creates a new text file, permissions of 640 are applied to the file, and the employee must use chmod to set them to 644. What command should you enter in the employee's profile to set the default permission for newly created files to 644?
umask 0022
Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which of the following commands can you use to unmount the partition? (Select two.)
umount /dev/sdb2 umount /mnt/temp
FUSE
used for creating virtual file systems for apps
gdisk -v
verifies a storage device
Which of the following commands creates a volume group named backup and initializes it by adding the third disk in a Linux system to the volume group?
vgcreate backup /dev/sdc
Volume group
volume group consists of all the space available on the physical volumes grouped together. The storage space within a volume group can come from many different physical volumes on many different storage devices. Additional hard disks or additional partitions can be added to the volume group at any time.
You've installed a new hard drive and created a partition on the drive. You now need to format the partition before you can save data on the new hard drive. Complete this lab from the Terminal. In this lab, your task is to: Format the /dev/sdb1 partition with the ext3 file system.
, type one of the following commands: mke2fs -j /dev/sdb1 and press Enter (the -j switch enables journaling). mkfs -t ext3 /dev/sdb1 and press Enter. mkfs.ext3 /dev/sdb1 and press Enter.
You are inspecting the superblocks and block information on your file system. You need dumpe2fs to display only the blocks that are reserved as bad in the file system. Which of the following options should you use?
-b
Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility. Which of the following debugfs options should you use to examine the file system?
-c
Which of the following options can you use with the getfacl command to display the default access control lists?
-d
You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during the file compression?
-j
You have a critical file called yearend.xls. You have set the file permissions so that only the owner of the file can modify it, and only group owners can read it. Which of the following file listings show that you have set the permissions correctly?
-rw-r----- 1 george acctg 26256 June 1 04:16 yearend.xls
You have an application whose owner is root, but you want all users to execute the application with root user permissions. Which of the following shows the correct usage of the SUID flag?
-rwsr--r-- 3 root sys 73748 Nov 2 2005 /usr/bin/applicationx
What is the file path and name of the directory that contains device files for hard drives, optical drives, and USB devices?
/dev
You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?
/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto
Enter the full device file name for the second partition on the hard drive with the lowest ID number.
/dev/sda2
Type the full device file name for the first partition on the hard drive with the third lowest ID number.
/dev/sdc1
You need to implement disk quotas on your Linux system for the / directory. What is the full path and name of the file that must be edited to implement quotas for users and groups?
/etc/fstab Ex: You must edit the /etc/fstab file to add the mount options for the file system so it can implement quotas. Add the following mount options for each applicable file system: usrquota implements quotas for users. grpquota implements quotas for groups.
What file shows the currently mounted volumes?
/etc/mtab
Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, and CD-ROMs? Answer /
/media
What is the typical default umask value?
0022
Which of the following is the maximum number of primary partitions that can be created on a single hard disk drive?
4
Listen to exam instructions Which of the following sets of octal permissions would allow everyone to execute the following file as if they were the root user? -rwxr-xr-x 1 root root 8045 July 24 2018 myscript
4755
gdisk -w
writes changes to the partition table of the strage device and exits gdisk
You have just entered the umask u=rwx,g=rx,o=x command. What is the binary result of entering this command?
751
Which of the following statements best describes the function of the repquota /home -vu command?
A summary of disk usage and quotas is displayed for the users who have files within /home.
RAID 5
A technique that stripes data across three or more drives and uses parity checking, so that if one drive fails, the other drives can re-create the data stored on the failed drive. RAID 5 drives increase performance and provide fault tolerance. Windows calls these drives RAID-5 volumes.
Gloria, a Linux administrator, used the gdisk utility to create eight partitions on a new hard drive. Which of the following BEST describes the partitions Gloria has created?
All eight partitions are the same. They are simply partitions. There are no primary, extended, or logical partitions.
RAID 0
An option for combining storages for optimal performance
RAID 2
Bit-level striping with dedicated Hamming-code parity. OBSOLETE.
RAID 4
Block-level striping with dedicated parity. Not often used, replaced with RAID 5.
RAID 3
Byte-level striping with dedicated parity. OBSOLETE, replaced with RAID 5.
lvchange
Change the attributes of logical volumes
8.8.8 To prevent users from using too much disk space, you have implemented hard and soft quotas on the root directory (/). Today, you noticed that the quotas are turned off. Complete this lab from the Terminal. In this lab, your task is to: Re-enable quotas for users and groups on the root directory (/).
Complete this lab as follows: Re-enable quotas for users and groups on the root directory (/).From the Favorites bar, select Terminal.At the prompt, type quotaon / and then press Enter to enable quotas for the root directory.
Which of the following describes the effects of using the tune2fs -j /dev/sdb1 command?
Converts the /dev/sdb1 device to ext3.
Which of the following steps must be completed after creating a logical volume so that the logical volume can be used to store files?
Create file systems on the volumes and mount them.
vgextend
Creates a new logical volume from the space available in a volume group. Below are some options for this command. -L specifies the size. Use the following size suffixes: K for kilobytes M for megabytes G for gigabytes T for terabytes P for petabytes E for exabytes -n specifies the name.
Which of the following impacts all the files in a folder?
Default ACLs
Which of the following Linux backup types copies all of the files that have been updated but only against the last full backup?
Differential
Yesterday, you created a new swap area for your system. Today, after rebooting the system, you find that the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots?
Edit /etc/fstab and add the swap partition.
lvextend
Extends the size of a logical volume (The -L option specifies the new volume size.)
What is the standard used by Linux distributions to determine the layout of files and folders in the Linux system?
Filesystem Hierarchy Standard (FHS)
You attempt to unmount a volume using the umount /dev/sdd3 command, but you receive a device is busy error message. Which of the following strategies will be MOST likely to allow you to unmount the file system? (Select two.)
Find and close any open files on the file system, and try to unmount again. Ensure your current working directory is not on the file system, and try to unmount again.
Which of the following represents typical Linux backup types? (Select three.)
Full Correct Answer: Differential Correct Answer: Incremental
Which of the following measures how many input/output operations can be performed in a second?
IOPS
pvcreate
Initializes the physical volume for later use by the LVM
You've been using a hard drive on your Linux server for document and graphics storage. Recently you've noticed that the performance of the hard drive has significantly slowed. Which of the following are recommended steps for increasing the performance of your hard drive? (Select two.)
Maintain a healthy amount of free disk space on the drive. Keep the disk defragmented.
The RAID configuration you are using to combine several hard drives into a single logical volume includes the following benefits and requirements: Provides fault tolerance for a single disk failure. Provides redundancy and performance. Uses 50% of the total raw capacity of the drives due to mirroring. Requires a minimum of four disks. What is the RAID level you are using for your logical volume?
RAID 10
lvresize
Resize a logical volume
You are booting Windows on a laptop computer, and suddenly, a black screen of death (BSOD) is displayed. You try rebooting the laptop but still, receive the BSOD. What else can you do that would be MOST effective in resolving the issue? (Select two.)
Rollback or update drivers. Attempt to revert the system to a previous state.
pvscan
Scans all disks for physical volumes and displays all found physical volumes on the system and their associated volume groups.
vgscan
Search for all volume groups. The vgs command does nearly the identical thing and is frequently used in place of vgscan.
Setting the SUID flag is a powerful and useful feature. It can also have weaknesses associated with its use. Which of the following statements identifies a weakness?
Setting the SUID flag for an application or process owned by the root user is a potential security hole.
mkfs -t
Specifies the type of file system to build
Which of the following special permissions prevents a file's deletion by anyone except the file's owner?
Sticky bit
Which of the following are types of remotely connected devices?
Storage Area Network (SAN) Network Attached Storage (NAS)
You receive a call from an employee in your company who is trying to use their laptop to display a presentation in a client's conference room. The presentation is on a DVD disk. When the employee boots their laptop, they receive an error message that the operating system cannot be found. Earlier in the day, the laptop worked properly for the employee. Which of the following is the MOST likely issue with the operating system not being found?
The BIOS/UEFI is configured to boot from the optical drive first.
When using the parted command instead of the gdisk utility, which of the following is important to remember?
The parted command writes partition changes to disk immediately.
You need to create a large number of files, and you would like to ensure that you, the user owner, are the only person that has read and write permissions to the files. The files will be located in a number of different directories that already contain other files you don't want modified. How could you BEST create these files with the correct permissions using the LEAST amount of effort?
Type umask 0066 to change your umask.
Which file system is a FAT32 file system for Linux?
VAT
You are the IT administrator for this Linux system. Your manager has asked you to verify the ownership of a few files and directories. Complete this lab from the Terminal. In this lab, your task is to: View the ownership for the /sales/orders file.Answer Question 1. View the ownership for the /projects/darkhorse file.Answer Question 2. View the ownership for the /projects directory.Answer Question 3. View the ownership for the /hr directory.Answer Question 4.
Who owns the /sales/orders file?:bcassini Q2Who is the group owner of the /projects/darkhorse file?proj Q3Who owns /projects directory?bcassini Q4Who is the group owner of the /hr directory?sales EXPLANATION Complete this lab as follows: View the /sales/orders file information.From the Favorites bar, select Terminal.From the prompt, type ls -l /sales/orders and press Enter.From the top right, select Answer Questions.Answer Question 1. View the /projects/darkhorse file information.From the prompt, type ls -l /projects/darkhorse and press Enter.Answer Question 2. View the directory information.From the prompt, type ls -l / and press Enter.Answer Questions 3-4.
Which command should you enter at the command prompt to display the current user's quota limits and disk usage?
You can use the quota command to display the current user's quota limits and disk usage. The quota command includes the following options: -u shows the quota for a user. -g shows the quota for a group. -v shows the current usage, hard quota, and soft quota for blocks and inodes.
A umask can be represented and changed using a symbolic (letter) representation of the mask. Which of the following letters is equivalent to all the mask symbols?
a
gdisk -b
backs up the gpt info to a file
gdisk -t
changes a paritions type code
The following are the permissions currently assigned to the customer_list file: -rwxr-xr-x 1 mfoote finance 8045 July 24 2022 customer_listYou want to add the write permission for the finance group and remove all permissions for others. Which of the following commands would accomplish this task?
chmod g+w,o-r,o-x customer_list
The Human Resources director for your company has been given an expanded role that covers internal training courses for the company. All the internal training course files are located in the /training/int directory. The director (pmadison) has requested ownership of all these files. Which of the following commands would you use to make pmadison the owner of all the files and directories in the /training/int directory?
chown -R pmadison /training/int
Which of the following commands make sales the group owner of the /sales/report file? (Select two.)
chown .sales /sales/report chown :sales /sales/report
You use ls -l /home/sales/sales_projection_q2 and receive the following information: drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2 Which of the following commands will change the user owner to jyoung and the group owner to sales?
chown jyoung:sales /home/sales/sales_projection_q2
You want to restore files with the extension .cfg from an archive called configs.cpio. Which of the following commands will perform the restore?
cpio -ivd "*.cfg" < /mnt/hdd2/configs.cpio
gdisk -o
creates a new GUid partition table
parted utility
creates and deletes gpt partitions modifies GPT partitions
What utility allows you to make an exact copy of a file?
dd
Which of the following I/O schedulers uses the I/O request time stamp to push I/O requests that have reached their deadline to the highest priority for processing?
deadline
gdisk -d
deletes a partition
8.8.4 Determine Disk Free Space lab
df -h 2.9G 1.1G 52%
When creating an ext2 or ext3 file system, a fixed number of inodes is assigned. Which of the following commands shows the number of inodes, number of free inodes, and number of used inodes?
df -i
You need to see who has permissions to the promotions_annual file. You use ls -l promotions_annual and receive the following information: drwxr-xr-x 22 dmartinez hr 4096 Jun 19 15:01 promotions_annual Which user owns this file? (Your answer is case-sensitive.)
dmartinez hr
8.8.5 You are logged on as Will Adams (wadams), and your working directory is /home/wadams. You need to know some information about the disk usage for Will's home directory. Complete this lab from the Terminal. In this lab, your task is to: Use the applicable command to view the disk usage for the /home/wadams directory. Answer the questions.
du 100K ./.config
What command would you enter at the command prompt to list all files and directories in the badams home directory, along with file size and the total amount of space taken up by the directory?
du -ac /home/badams
Which of the following commands allows you to use an alternative superblock when the primary superblock has been corrupted?
e2fsck -b 16385 /dev/sda1
Which of the following commands will open the quota file for a specific user?
edquota -u You can use edquota -u to open and edit the quota file for a specific user. quota -u displays the user's quota. repquota displays a summary of the disk usage and quotas for the specified file systems, including the specific number of files and used space. quotaon enables quotas for the mounted file system; however, it does not a have a -u option.
Which command should you enter at the command prompt to change the quota settings for the gshant user?
edquota -u gshant ex: -u changes the user's quota. -g changes a group's quota. -t changes the grace period.
An employee in another department recently provided several important files for your current assignment. The files are compressed in a tar file. You need to extract each file so you can begin to use them. Complete this lab from the Terminal. In this lab, your task is to: Extract the files in /proj_files.tar.gz into the /projects directory. Answer the question.
evals, history, records, temps EXPLANATION At the prompt, type tar -xzf /proj_files.tar.gz -C /projects and press Enter to extract the files from the tar file and place them in the /projects directory. Determine which files were extracted.At the prompt, type ls -l /projects
The system requirements for a new Linux computer show that the system will primarily be used to store documents of small size. Which of the following file systems would be the MOST efficient at storing these documents on a Linux system?
ext4
Which of the following Linux file systems support journaling?
ext4
Which of the following is the MOST common Linux file system?
ext4
The wadams user needs access to a file in the /sales folder on your system, but does not belong to the sales group. In this lab, your task is to use ACL utilities to: Check the permissions on the /sales/forecast.txt file. Grant full rights for the /sales/forecast.txt file to wadams.
getfacl /sales/forecast.txt setfacl -m u:wadams:rwx /sales/forecast.txt getfacl /sales/forecast.txt
You have entered a command at the shell prompt to view the following information: # file: testout-acl/ # owner: root # group: root user::rwx user:carol:rwx group::r-x group:marketing:rw- mask::rwx other::r-x Which of the following commands did you enter?
getfacl /testout_acl/
gpt
globally unique identifier partition table Uses only one type of partition. There are no primary, extended, or logical partitions. Supports extremely large storage devices and partitions. Allows up to 128 partitions on a storage device. Stores a copy of the partition table in the first and last sectors of the storage device. If one copy gets corrupted, the redundant copy can be used instead. Verifies the partition table's integrity by using a cyclic redundancy check (CRC). Assigns unique IDs to each storage device and partition.
8.7.4 Use iostat You suspect that one of the storage devices on your system has failed. Your need to identify which device it is. In this lab, your task is to: Find out if a device has failed. Use the appropriate command to list devices and their utilization. Answer the question.
iostat All of the devices appear to be working properly
gdisk -l
lists partition type codes
Which of the following commands displays the information you need to determine the permission settings for a file?
ls -l
how to list the devices that are storage disks
ls /dev/sd*
You've installed a third hard drive (sdc) and created two partitions on the drive. Now you need to format both partitions. Complete this lab from the Terminal. In this lab, your task is to: Format the two partitions with the ext4 file system.
ls /dev/sd* Type one of the following commands and press Enter to format the first partition on the third drive: mke2fs -t ext4 /dev/sdc1 mkfs -t ext4 /dev/sdc1 mkfs.ext4 /dev/sdc1 Type one of the following commands and press Enter to format the other partition: mke2fs -t ext4 /dev/sdc2 mkfs -t ext4 /dev/sdc2 mkfs.ext4 /dev/sdc2
You want to archive some configuration files to a USB device. You are using the cpio utility. Which of the following commands will create the archive on the device?
ls /etc/*.conf | cpio -ovd > /dev/sdb1
Which of the following commands creates a logical volume named video from the home volume group and configures it with 2 TB of disk space?
lvcreate -L 2T -n video home
Which of the following commands extends the graphics logical volume to a total of 20 Gigabytes?
lvextend -L 20G graphics
The setfacl command lets you set the access control list (ACL) for files and directories and includes several options.
m modifies the ACL of a file or directory. x removes ACL entries. d applies all operations to the Default ACL. R applies operations to all files and directories recursively. v prints the version of setfacl and exits. b removes all extended ACL entries. k removes the Default ACL.
Which of the following utilities is used to manage and monitor software RAID devices?
mdadm
Listen to simulation instructions The CEO of the company wants to make sure that the employees' personal information, as stored in the /hr/personnel file, is protected. The CEO has asked that you make sure that the human resources (HR) department is the owner of that file. Complete this lab from the Terminal. In this lab, your task is to: Find the current owner of the /hr/personnel file. Answer the question. Change the group ownership of the /hr/personnel file to the hr group. Verify the ownership change.
mgmt1 ls -l /hr chgrp hr /hr/personnel chown .hr /hr/personnel chown :hr /hr/personnel ls -l /hr
You recently installed and formatted a new hard drive in your system. Its device file name is /dev/sdb1. Now you want to mount the volume. Complete this lab from the Terminal. In this lab, your task is to: Create the /mnt/disk directory. Mount /dev/sdb1 to the /mnt/disk directory with the ext3 file system. Use the mount command to verify that the volume is mounted correctly.
mkdir /mnt/disk Mount the volume and verify that the volume is mounted correctly. Type mount -t ext3 /dev/sdb1 /mnt/disk and press Enter. Type mount and press Enter to verify that the volume is mounted correctly.
Which of the following commands formats the second partition on the fourth disk drive with the ext3 file system?
mke2fs -j /dev/sdd2
You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you enter at the command prompt?
mkfs.ext4 /dev/sdb1
One of the Linux servers for the accounting department needs additional memory to fix recent performance issues. You have ordered the memory, but it is backordered, so you decide to add a swap partition to the server to help with the performance issues immediately. Which of the following commands will add a swap partition to the first partition on the third hard drive?
mkswap /dev/sdc1
A user is trying to access a file system mounted at /mnt/sdb1, but receives an error that states No such file or directory. Which commands can you use to see the current mount points? (Select two.)
mount df
A number of new file systems have been added to a Linux server and you want to activate them. You also do not want to bring the server down. What command will activate the file systems without bringing the server down?
mount -a
You need to mount the CD-ROM device to the /media/cdrom directory. What command should you enter at the command prompt?
mount /dev/cdrom /media/cdrom
You have partitioned and formatted a new sdc hard drive. You want to mount the first partition on sdc to directory /mnt/newdisk. Which command will perform the mount correctly?
mount /dev/sdc1 /mnt/newdisk
mount -t
mount option used to specify the filesystem type to mount. This is typically not necessary because the mount command can determine the filesystem type by probing the partition
What is the name of the partition management utility that will create both GUID partitions and file systems on those partitions?
parted
You want to create a standard Linux partition on your new hard drive that starts at 1 GB and ends at 21 GB. Which of the following commands should you enter to create the new partition?
parted mkpart Linux 1024 21504
Marco recently made some partition changes, and the kernel is not recognizing the partitions. Which of the following commands should Marco use to resolve the problem?
partprobe
gdisk -p
prints the partition table
Which of the following commands initializes a physical volume?
pvcreate
You have added a third hard disk to your Linux system. What command would you use to initialize a physical volume on this disk for later use by the Logical Volume Manager?
pvcreate /dev/sdc
You are using LVM on your Linux system to manage hard disk partitions. What command can you enter to scan for physical volumes on the system?
pvscan
gdisk -q
quits gdisk without saving changes
What is the name of the package that must be installed if you want to use disk quotas on your Linux system?
quota If the quota package is not installed on your Linux system, you can install it with the dnf install command. quotaon.service is used to enable quotas on a given file system.
You are logged on as the root user. Will Adams (wadams) has forgotten the system quotas that you configured for him. He has asked that you remind him. Complete this lab from the Terminal. In this lab, your task is to: Use the applicable quota command to view Will's quotas. Answer the questions.
quota -u wadams command to find Will's quotas Q1What is the blocks quota?Your answer: Correct answer: 18432 Q2What is the blocks limit?Your answer: Correct answer: 20480 Q3What is the files quota?Your answer: Correct answer: 500 Q4What is the files limit?Your answer: Correct answer: 550
Which of the following commands creates the aquota.user and aquota.group files in your file system after creating the quota entries in /etc/fstab?
quotacheck -mavug The quotacheck -mavug command creates the aquota.user and aquota.group files in your file system. The quotacheck -a command updates the quota database. The quotacheck -v command runs the command in verbose mode. The quotacheck -ug command runs the database updates for users and groups.
8.8.9 The system is running hard disk quotas for users and groups. Complete this lab from the Terminal. In this lab, your task is to: Disable the quotas on the root directory (/).
quotaoff /
Which of the following tools can assist you with backing up data using an off-site or off-system storage solution? (Select three.)
rsync can copy local files from/to a remote host using a remote shell - SSH - or a remote rsync daemon. SFTP is packaged with SSH and works over a secure connection. SCP copies files and directories between remote hosts without starting an FTP session or even logging into the remote systems. MD5 and SHA are hash algorithms that produce a "fingerprint" of a downloaded file to check the integrity of the file. DNS (Domain Name Service) converts domain names into IP addresses, which browsers can then use to load internet pages. DHCP automatically provides and assigns IP addresses, default gateways, and other network parameters to client devices.
You have entered the umask 0033 command to change the default umask setting for files and directories. What are the default file permissions assigned to a new file? What are the default permissions assigned to a new directory?
rw-r--r-- (644) rwxr--r-- (744)
From the drop-down list below, select an example of a permission string with the sticky bit enabled.
rwxrw-rwt
Run parted at the shell prompt. The following commands can be used within parted:
select device_name identifies which storage device to edit. mkpart partition_type start_point end_point creates a new partition. For example: To create a standard Linux partition, specify Linux as the partition type. To create a partition that starts at 1 GB and ends at 21 GB, specify a starting point of 1024 and an end point of 21504. print displays a list of partitions on the device. name partition_name renames a partition. move partition start_point end_point moves a partition to a different location on the storage device. resize partition start_point end_point resizes a partition. rm partition deletes a partition.
You need to see who has permissions to the sales_projection_q2 file. You use ls -l sales_projection_q2 and receive the following information: drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2 Which user owns this file? (Your answer is case-sensitive.)
pclark acct
You have a Linux system with two activated swap partitions, sda3 and sdb2. Which of the following commands can you use to deactivate only the sda3 swap partition?
swapoff /dev/sda3
You need to view the files within /home/gshant/expfile.bz2, but you want to leave the compressed file unchanged. Which bzip2 option should you use?
-k Use bzip2 with the -k option to leave the compressed file unchanged.
On the left is a list of options for the setfacl command. list them
-m modifies or adds an ACL. -d changes the default ACLs. -x removes an ACL. -b removes all ACLs except the owner and the group owner.
You want to set an ACL for the customer_list file so that the employees in the sales group have read and write access to the file. From the drop-down list, select the command you would use to accomplish this task.
setfacl -m g:sales:rw- customer_list
You've been using an SSD drive on your Linux server for the operating system and associated files. Recently you've noticed that the performance of the hard drive has significantly slowed. Which of the following are recommended steps for increasing the performance of your SSD drive? (Select two.)
Check the speed of the SATA connection. Enable features such as TRIM support in the operating system (OS).
You have just inserted a thumb drive into your Linux server and now want to view the contents of the thumb drive. Where is the MOST likely place you can find the mounted thumb drive in the Linux file system?
/run/media/<username>
Which of the following hexadecimal codes represents an extended partition?
0x85
Which of the following is the maximum number of GUID partitions that can be created using the gdisk utility?
128
RAID 1
Also called mirroring, this RAID array type provides fault tolerance because all the data is written identically to the two drives in the mirrored set. (2)
You are using RAID to combine several hard disks on a Linux server into a single logical storage unit. You have configured the RAID volume to combines disk striping across multiple disks with parity for data redundancy. The parity information is stored on each disk. If a single disk fails, its data can be recovered using the parity information stored on the remaining disks. Which of the following RAID levels are you using?
RAID 5
Which of the following is the maximum number of logical partitions allowed on an extended partition?
Unlimited
You are considering adding an additional hard disk to your system. Before doing so, you need to find out what block devices are connected to your Linux system. Complete this lab from the Terminal. In this lab, your task is to: Use the appropriate tool to list the block devices on your system. Answer the questions.
Use lsblk to list the block devices Q1 : 2 Q2: sda3
gdisk -n
adds a new partition
The most common way to monitor a RAID array on Linux is to read the status of a file in the /proc directory:
cat /proc/mdstat
gdisk -c
changes a partitions name
gdisk -t
changes a partitions type code
network file systems
data can be written to remote locations two types multipathing storage RAID on Linux
gdisk -i
displays detailed partition information
gdisk -?
displays help screen
how do you view the partition information on the system?
fdisk
You are thinking about adding another disk to your system. To help you make your decision, you want to view the current setup. Complete this lab from the Terminal. In this lab, your task is to: View the disk information for your system. Answer the questions.
fdisk -l
Which of the following commands partitions the second hard disk on a Linux system?
fdisk /dev/sdb
storage types
file storage - used by NFS, SMB/CIFS to store over network, or locally attached storage. block storage - oldest, data is placed in length blocks, u.f hosting os, apps, and dbs, and local data storage object storage - newest, data is available in their og form, in the form of a url
Which partition management utility can be used to define and change various GUID partition configurations without committing the configuration to the disk until the w command is used?
gdisk The fdisk utility allows you to do the same thing, but only with MBR partitions. The parted utility writes the configuration to disk immediately as you define it. The lsblk utility is used to list block devices.
Creates a new GUID partiton table.
gdisk -o
vgcreate
Creates a new volume group
You have an application whose group is sys, but you want all users, whether or not they are members of the sysadmin group, to execute the application with sysadmin group permissions. Which of the following examples shows the correct usage of the SGID flag?
-rwxr-sr-- 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx
For Linux files, the default permission is 666, and the default umask is 022. When a new file is created, it will be assigned 644 (rw-r--r--) permissions. If the umask is set to 027, what permissions will be assigned for newly created files?
640 (rw-r-----)
Which of the following MOST accurately describes Redundant Array of Independent Disks (RAID)?
A disk subsystem that combines multiple physical disks into a single logical storage unit.
Which of the following are the advantages of using GPT instead of MBR for partitioning a storage device? (Select two.)
Allows up to 128 partitions on a storage device. Uses only one type of partition.
As a Linux administrator, you have installed a new hard disk. You create two primary partitions, sdb1 and sdb2, and one extended partition, sdb3. You format sdb1 with ext3 and sdb2 as a swap area. When you attempt to format sdb3 as a swap area, you are unable to do so. Which of the following explains why you can't format sdb3?
An extended partition can't be formatted.
Listen to simulation instructions Brenda Cassini (bcassini) is taking over payroll documentation for Will Adams (wadams). In this lab, your task is to give the bcassini user ownership of the /hr/payroll file. Use the ls -l command to verify the ownership changes.
At the prompt, type ls -l /hr and press Enter to view the current ownership of the /hr/payroll file. At the prompt, type chown bcassini /hr/payroll and press Enter to give bcassini ownership of the /hr/payroll file. Type ls -l /hr and press Enter to verify the change in ownership.
You are asked to help a user complaining that file system errors are being reported during boot-up. When you reboot the user's system, you see errors on sda2. Which of the following strategies will check the file system on sda2 and fix the errors?
Change to single-user mode and run fsck /dev/sda2.
gdisk
Creates and deletes GPT partitions Displays information about a partition Changes the partition name and type Verifies a hard disk Backs up and restores a disk's partition table Converts an MBR partition table to a GPT partition table.
You are running the sandboxed AppImages application on your Linux system, which keeps the application from compromising your Linux filesystem by leaving kernel access to a separate kernel module. Which of the following technologies provides this type of security for the AppImages application?
Filesystem in USErspace (FUSE)
You've recently discovered that your Linux operating system cannot find your hardware RAID array. You've tried installing the latest driver for the RAID board, but the operating system still cannot find the RAID array. You decide that the issue is caused by a failed RAID controller board. From the list below, drag and drop the steps (in order) for fixing the failed RAID controller board.
Install a new RAID controller board. Step 2 Rebuild the array. Step 3 Restore the data from backup.
Which of the following BEST describes a file ACL?
It extends the standard permission assignments for users and groups.
What is the impact to the customer_list file by entering the setfacl -m u:gsmith:r customer_list at the command prompt?
It grants the user gsmith read access to the customer_list file.
Listen to exam instructions You have entered the following command at the shell prompt: setfacl -x carol /trip_to_florida/ What does the command do?
It removes the ACL for the carol user on the trip_to_florida file.
Which of the following are the PRIMARY tasks you can perform with the mount command? (Select two.)
List all file systems that are currently mounted. Mount a file system on a storage device somewhere in the root file system tree.
A file system inode indicates where a file's data physically exists on a disk. What other information does an inode contain? (Select two.
Modification, access, and creation times Permissions
One of the drives in your Linux server RAID 5 array has failed. What should you do to fix the issue?
Replace the failed disk and wait for the data to be automatically restored
lvscan
Scans all known volume groups in the system for logical volumes and displays the results. The lvs command does nearly the identical thing and is frequently used in place of lvscan.
You have just installed a new program that all users will use on the computer. After installation, you log in as a regular user and try to run the program. The program stops and displays the following error: Error: not running as root What should you do so that all users can run this program?
Set the SUID on the program.
Which of the following limits the lifespan of an SSD drive?
The SSD has finite read/write counts.
Which of the following is a requirement for ALL configurations of RAID?
The amount of disk space used on each disk must be of equal size.
You are called into the office of a newly hired manager. The manager has copied a file from his old place of work onto his new workstation but is now receiving an error message that access is denied each time they try to access the file. The manager is not the owner of the file or a member of the group the file is associated with. Which of the following represents the LEAST set of file permissions needed for the manager to be able to read and write to the file?
The correct answer is 666. Because he is not a member of the group or the owner of the file, the only set of permissions applying to the manager is the last number. The ability to read the file has a value of 4, while the ability to write to the file has a value of 2. Adding the two together, the needed permission for the user is 6.
Roberto, a help desk technician, receives a call from an employee who is not able to change to a directory that they own. The following is the output from the commands that the employee entered: [sally@linux ~]$ ls -al drw-rw-rw-. 2 sally sally 6 Mar 14 16:08 Reports [sally@linux ~]$ cd Reports/ bash: cd: Reports/: Permission denied [sally@linux -]$ Based on the output, which of the following describes the problem?
The employee does not have the eXecute permission as owner of the directory.
You have used the ls -l command to view the permissions of a marketing_figures.txt file: -rwxrw-r--+ 1 jmace employees 27 Oct 3 19:19 marketing_figures.txt Which of the following indicates that the ACLs are being used with the file?
The plus sign (+) at the end of the permissions list
You have just purchased a laptop with an HDD and an SSD drive. The operating system is on the SSD drive, while you plan on using the HDD drive to store data files. When you boot the laptop into the operating system, the HDD is not displayed. Which of the following are common reasons for the HDD drive not being recognized? (Select two.)
The power connector is unplugged. The SATA cable is unplugged.
After creating the aquota.user and aquota.group files in the /home directory, what command should you enter to enable quotas for the /home directory?
The quotaon /home command enables quotas for the /home directory. Use quotaon to enable quotas for the mounted file system. -a enables all mounted file systems listed in /etc/mtab. -v runs the command in verbose mode.
Which of the following repquota options will give you quota limits and disk usage for all file systems listed in /etc/mtab?
The repquota -a command gives you quota limits and disk usage information for all file systems listed in /etc/mtab. The following are other common repquota options: -v reports all quotas, even if there is no usage. -n does not resolve user and group names to speed printing time. -u and -g report on users and groups, respectively.
Listen to exam instructions You have entered the following command at the shell prompt: setfacl -m u:diana:rwx -m g:sales:rw sales_results_1st_quarter/ Answer the following questions by selecting the correct answer from the drop-down list. What ACL permissions were given to the user? Which group was given rw ACL permissions?
The rwx ACL permissions were given to the diana user, and the sales group was given rw ACL permissions. rwx sales
While reading about file system permissions in Linux, you discover that the default permissions assigned to new files when they are created are rw-rw-rw- (666 octal), and new directories are rwxrwxrwx (777 octal). However, when you create a new file in a directory called /data, the permissions assigned are rw-r--r--. Which of the following BEST explains the results you are seeing?
The umask must be set to 0022 and, therefore, block the write permission for the group owner and everyone else.
8.8.7 You are an IT administrator for your company's Linux system. You need to generate a quota report for your supervisor regarding the quota usage for the system. Complete this lab from the Terminal. In this lab, your task is to: Use the applicable command to generate a quota report for all filesystems. Answer the questions.
Use the repquota -a command to view disc usage and quotas for all filesystems Q1 root Q2 10240 Q3 9216 Q4 20480 Q5 wadams
RAID 10
a combination of RaID 1 and RaID 0 that requires at least four disks to work as an array of drives and provides the best redundancy and performance.Provides fault tolerance for a single disk failure. Provides redundancy and performance. Uses 50% of the total raw capacity of the drives due to mirroring. Requires a minimum of four disks.
The getfacl command lets you display the filename, owner, group, and access control list (ACL) for a file and includes several options.
a displays the file access control list. d displays the default access control list. s skips files that only have the base ACL entries (owner, group, others). R lists the ACLs of all files and directories recursively. n lists numeric user and group IDs. v prints the version of getfacl and exits. e prints all effective rights comments.`
Physical volumes
are physical block devices or other disk-like devices that are used by the LVM as the building blocks for volume groups. Physical volumes can be: Regular storages devices, such as a whole hard disk. Partitions on a hard disk. Devices created by the device mapper, like a RAID array.
Which of the following commands displays the filename, owner, group, and access control list for the mynotes file?
getfacl mynotes
One of the HDD drives on your Windows server is failing, and you suspect that the master boot record (MBR) is corrupt. To fix the issue, you decide to boot from the installation disk, enter the recovery environment, select Command Prompt, and use the bootrec command to start by rebuilding the boot configuration data. Which of the following commands would you use to perform this task?
bootrec /rebuildbcd
Logical volume
can be divided up into any number of logical volumes. Logical volumes are the primary component that users and applications interact with. Logical volumes are functionally equivalent to a partitions on a physical disk. Logical volumes can be formatted to accommodate a file system. Logical volumes can be resized and moved while they are still mounted and running. Logical volumes may be identified by using descriptive names (e.g., Research or Marketing) instead of physical disk names such as SDA and SDB.
You have entered the cat /sys/block/sdb/queue/scheduler command to find out which I/O scheduler is currently being used by your Linux system. The following is displayed: noop [cfq] deadline Which I/O scheduler is currently being used by your Linux system? What I/O schedulers are available on your Linux system?
cfq noop, cfq, deadline
What would you enter at the command prompt to change the group ownership to finance for the report01.png file in the /sales/reports directory?
chgrp finance /sales/reports/report01.png or chown :finance /sales/reports/report01.png chown .finance /sales/reports/report01.png
What would you enter at the command prompt to change the group ownership for the devstyle.txt file to rand in the present working directory?
chgrp rand devstyle.txt You would enter chgrp rand devstyle.txt to change the group ownership for the devstyle.txt file to rand. The chgrp command changes the group owner of a file or directory. chown can also change the group ownership. The following chown commands change the group ownership as required in the scenario: chown :rand devstyle.txt chown .rand devstyle.txt
Which of the following tools can you use to assign special permissions? (Select two.)
chmod
You are the team lead for a marketing project. Only the members of the team3 group should have read/write permissions to a document called project_data.doc. You want to ensure that no one on the team will delete the document by accident. Your user name is bsmith.The following is a long listing of the file: -rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc Which of the following commands will accomplish this task?
chmod 1664 project_data.doc
You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this task?
chmod 4777 rider
The human resources team uses the /hr directory to keep important employee documents. Over time, you notice that permissions set on each file have become inconsistent. You want to make sure that all files in the /hr directory have the same permissions settings. You must modify the file permissions to be -rw-rw---- (the octal equivalent of 110 110 000 = 660). Complete this lab from the Terminal. In this lab, your task is to: Configure permissions on all files in the /hr directory as follows:User and group owners should have Read and Write permissions to the files.All other users should have no permissions on any file. Use the ls command to verify your changes.
chmod 660 /hr/* ls -la /hr
You need to change ownership of a script called myscript so that only the user owner has read/write access to it and only the user owner and group owner have execute permissions. Which of the following commands will accomplish this task?
chmod 750 myscript
A file named acctg needs to have the SGID permission set on it while keeping all other permissions at their present value. Which of the following commands will accomplish this task?
chmod g+s acctg
A change in company policy requires users in the hr group to make changes to the files in the /hr directory. Complete this lab from the terminal. In this lab, your task is to: Give the Write group permission to the files in the /hr directory in addition to any existing permissions. Use the ls command to verify the changes.
chmod g+w /hr/* ls -la /hr
The Sales team uses the /sales directory to store documents related to sales, contacts, and orders. Currently, permissions on the directory only allow the user and group owners to view the contents of the directory. Users who are not part of the group owner are unable to list the contents of the directory. As part of a new company policy to increase teamwork, you want to allow all users to be able to see the /sales directory and list its contents. You also want to let all users open any document inside that directory, but you do not want them to make changes to the documents. Complete this lab from the Terminal. In this lab, your task is to: Allow the group other to browse the /sales directory. Modify permissions on all files in the /sales directory to allow members of the other group to view the files, but prohibit them from changing them.
chmod o+rx /sales chmod o+r /sales/*
You have a Linux workstation, which you use at home for browsing the internet, playing music, and writing letters. When you run your MP3 player, it sometimes pauses in playback. You have heard that you might be able to alleviate the problem by raising the priority of the program. You decide to set the SUID bit to automatically run the program as root and, thereby, raise its priority. Complete this lab from the Terminal. In this lab, your task is to: Set the SUID bit for the /usr/bin/xmms program. Do not change any other permissions on the file.
chmod u+s /usr/bin/xmms chmod 4755 /usr/bin/xmms
You have a Linux workstation that you use at home. You are the only person that uses this computer. You want to improve security by removing the SUID and SGID from some files. Complete this lab from the Terminal. In this lab, your task is to: Remove the SUID from the following files:/usr/bin/gpasswd/usr/bin/newgrp Remove the SGID from the following files:/usr/bin/wall/usr/bin/write Leave permissions on the files as they are.
chmod u-s /usr/bin/gpasswd chmod u-s /usr/bin/newgrp chmod g-s /usr/bin/wall chmod g-s /usr/bin/write
During a random security audit, you found that the user and group ownership for the /hr directory is set to Will Adams (wadams). For security reasons, you need to change the ownership. You want to give ownership to Brenda Cassini (bcassini), the office manager, and you want to give group ownership to the hr group for all the files in the directory. After you do this, you need to reset group ownership on the /hr/personnel file to mgmt1. Complete this lab from the Terminal. In this lab, your task is to: Give bcassini ownership of the /hr directory and all of its contents. Give the hr group ownership of the /hr directory and all of its contents. Return group ownership of the /hr/personnel file to mgmt1.
chown -R bcassini:hr /hr -R chgrp mgmt1 /hr/personnel
Listen to exam instructions Which of the following commands would you use to make nstevens the owner of all of the files and directories in the /docs directory?
chown -R nstevens /docs
The packaging department for your import/export company has recently been moved to the shipping department. In addition, all the packaging department employees have been moved to the shipping group. You would now like to make shipping the owner of the /packaging/personnel.png file. Which of the following commands could you enter to perform this task? (Select two.)
chown .shipping /packaging/personnel.png chown :shipping /packaging/personnel.png
Users have complained that the seven-day default grace period for soft limits is too short. Complete this lab from the Terminal. In this lab, your task is to: Increase the block and file (inode) grace period for users from 7 to 30 days. Generate a quota report to confirm the changes.
edquota -u -t and press Enter to open the user soft quota grace period file. Press 1 and press Enter to open the editor. Move the cursor under Block grace period and delete the 7. Type 30. Move the cursor under Inode grace period and delete the 7. Type 30. Press Ctrl + x to exit the editor. Press the y key to save your changes. Press Enter. Generate a quota report to confirm the changes.Type repquota -a and press Enter to generate the report and confirm the changes.
Sam Chan (schan) has reached his user quota limit, and he wants more space. Your manager has approved an increase in his quota limit. Complete this lab from the Terminal. In this lab, your task is to: Increase the hard and soft block limits on the schan user account to 1048576 KB (1 GB). Generate a quota report to confirm the changes.
edquota -u schan Press 1 and Enter to open the editor. Move the cursor under soft and delete 9216. Type 1048576 (use the Delete key to take out any extra spaces caused by the insertion). Move the cursor under hard and delete 10240. Type 1048576 (use the Delete key to take out any extra spaces caused by the insertion). Save the changes.Press Ctrl + x to exit the editor.Press the y key to save your changes.Press Enter. Generate a quota report to confirm the changes.Type repquota -a and press Enter to generate the report and confirm the changes.
Which of the following commands/command sequences can you use to view the partition information on the first hard disk? (Select two.)
fdisk /dev/sda, then press p fdisk -l
You want to change the name of a partition on the sdc storage device. You have already entered gdisk /dev/sdc to begin the editing process. Which of the following gdisk options can you enter to change the partition name?
gdisk -c
You have installed a new blank hard drive on your Linux system. This is the second drive on the system, so it is represented in the file system by the /dev/sdb file. You need to create GUID partitions on this drive. What command do you use to start the GUID disk management utility to create partitions on the /dev/sdb drive?
gdisk /dev/sdb there is a space between gdisk and /dev/sbd
what command opens gdisk and edits the partition table on the third storage dev in the system
gdisk/dev/sdc
You are using LVM on your Linux system to manage the existing volumes. What command do you enter to scan for logical volumes on the system?
lvscan
An assistant administrator has been modifying permissions on the /hr directory. You want to quickly change the permissions on /hr to match the permission settings documented in your company's security policy. You must modify the directory permissions to be drwxr-xr-x (the octal equivalent of 111 101 101 = 755). Complete this lab from the Terminal. In this lab, your task is to: Determine the current permissions for the /hr directory. Answer the question. Modify the permissions on the /hr directory as follows:User: Read, Write, ExecuteGroup: Read, ExecuteOther: Read, Execute
q1 rwxr--r-- ls -la /hr chmod 755 /hr ls -l /hr
Which of the following commands displays the disk usage and quota limits for the development group?
quota -g development Ex: You can use quota -g development to display the disk usage and quota limits for the development group. By default, the quota command displays the current user's quota usage, but the -g option specifies a group. repquota displays the disk usage and quota limits for groups if the -g option is present. quotacheck creates the aquota.user and aquota.group files in the file system. Use edquota to open and edit a user's quota, edit a group's quota, or change the grace period.
Which of the following sets of permissions represent the minimal permissions required to allow a user to list the contents of a directory?
r-x
Create a new raid array. In this case, two storage devices are associated with the /dev/md0 RAID array device:
sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sdb /dev/sdc
You want to save the details of the new array to a file for configuration at boot. Which of the following commands would you use?
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
You need to create a backup copy of the /sales directory. You have decided to use tar to create the backup. Complete this lab from the Terminal. In this lab, your task is to: Create a compressed archive of the /sales directory and all of its contents.Name the file /salesbkp.tar.gz and save it in the root directory (/).
tar -zcf /salesbkp.tar.gz /sales
vgremove
to delete a volume group.
pvmove
to move the data from one physical volume to another physical volume.
lvremove
to remove a logical volume from the system.
pvremove
to remove the LVM label from a device so that it will no longer be recognized as a physical volume.
On your Linux system, you have installed a second hard drive and created one partition on the drive. You have also installed a third hard drive and created two partitions on that drive. You now want to create a logical volume using the first partition on each new drive. Complete this lab from the Terminal. In this lab, your task is to: Use pvcreate to initialize the partitions for use with LVM. Use vgcreate to create a volume group named data using these two partitions. Use lvcreate to create a 1-terabyte logical volume named art from the data volume group. Create a directory named product where you can mount the new logical volume. Format the new logical volume with ext4. Mount the logical volume to the product directory. Change to the product directory and create a file named newproduct. Verify the creation of the file and amount of disk space available on this new volume.
type ls /dev/sd* Type pvcreate /dev/sdb1 /dev/sdc1 and press Enter to initialize the first two partitions on each drive for use with LVM. Create a volume group named data using the two partitions. Type vgcreate data /dev/sdb1 /dev/sdc1 and press Enter to create the volume group. Type vgs and press Enter to verify the creation of the new volume group. Create a 1-terabyte logical volume named art from the data volume group. Type lvcreate --size 1t -n art data and press Enter to create the new volume. Create a directory named product and format it with ext4. Type mkdir product and press Enter to create a new folder to mount the logical volume in. Type mkfs.ext4 /dev/data/art and press Enter to create the file system. Mount the logical volume to the product directory. Type mount -t ext4 /dev/data/art product and press Enter to mount the volume in the product folder. Change to the product directory and create a file named newproduct. Type cd product and press Enter to change into the product folder. Type touch newproduct and press Enter to create a file. Verify the creation of the file and amount of disk space available on this new volume. Type ls and press Enter to view the new file. Type df -h and press Enter to view the logical volume.
Unmount a volume lab: In this lab, your task is to: Unmount /dev/sdb2 from /root/newdrive. Mount /dev/sdb2 to /mnt/drive2. Use the mount command to verify that the volume is mounted correctly.
umount /root/newdrive and press Enter to unmount the volume from the mount point directory. Mount /dev/sdb2 to /mnt/drive2. Type mount /dev/sdb2 /mnt/drive2 and press Enter to mount the volume. Type mount and press Enter to verify that the volume is mounted correctly.
You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, what command should you use to add it to the backup volume group?
vgextend backup /dev/sdd
You have an XFS file system in your Linux computer. You need to display the XFS file system parameters, such as the block size and inode data structures. Which of the following commands can you use to display the file system parameters? (Select two.)
xfs_growfs -n xfs_info