What command is used to run only a single command under the root administrator context quizlet?

Upgrade to remove ads

Only ₩37,125/year

  1. Science
  2. Computer Science

  • Flashcards

  • Learn

  • Test

  • Match

  • Flashcards

  • Learn

  • Test

  • Match

Terms in this set (121)

You want to restore files with the extension .cfg from an archive called configs.cpio. Which command will perform the restore?

cpio -ivd "*.cfg" < /mnt/hdd2/configs.cpio

What command would you enter at the command prompt to list all files and directories in the badams home directory along with a file size and total amount of space taken up by the directory?

du -ac /home/badams

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

Which of the following is the maximum number of logical partitions allowed on an extended partition?

Unlimited

Which of the following is the maximum number of primary partitions that can be created on a single hard disk drive?

4

Tom, a Linux administrator, has installed a new hard disk. He creates two primary partitions, sdb1 and sdb2, and one extended partition, sdb3. He formats sdb1 with ext3 and sdb2 as a swap area. When Tom attempts to format sdb3 as a swap area, he is unable.

Which of the following explains why Tom can't format sdb3?

an extended partition can't be formatted.

Which of the following commands partitions the second hard disk on a Linux system?

fdisk /dev/sdb

Which of the following commands/command sequences can be used to view the partition information on the first hard disk? (Select TWO.)

fdisk -l
fdisk /dev/sda, then press p

Which of the following hexadecimal codes represents an extended partition?

0x85

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

Type 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

What is the file path and name of the directory that contains device files for hard drives, optical drives, and USB devices?

/dev

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 up the GUID disk management utility to create partitions on the /dev/sdb drive?

gdisk /dev/sdb

Which of the following is the maximum number of GUID partitions that can be created using the gdisk utility?

128

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.

What is the name of the primary partition management utility that will both create GUID partitions and create file systems on those partitions?

parted

Which partition management utility can be used to define and change various different GUID partition configurations without committing the configuration to the disk until the w command is used?

gdisk

Which of the following commands initializes a physical volume?

pvcreate

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

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 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

You are using LVM on your Linux system to manage hard disk partitions.

What command do you enter to scan for physical volumes on the system?

pvscan

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 steps must be completed after creating a logical volumes so that the logical volume can be used to store files?

Create file systems on the volumes and mount them.

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

Which of the following utilities is used to manage and monitor software RAID devices?

mdadm

Which of the following is the MOST common Linux file system?

ext4

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 systems support journaling?

ext4

Which of the following commands formats the second partition on the fourth disk drive with the ext3 file system?

mke2fs -j /dev/sdd2

You created a swap area on sda3, but it is not activated.

What command will activate this swap partition?

swapon /dev/sda3

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

Which file system is a FAT32 file system for Linux?

VFAT

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

A technician recently added a new disk drive to a system, and the drive is not available.

Which of the following commands scans the host bus adapter (HBA) and detects the newly added drive?

echo "- - -: > /sys/class/scsi_host0/scan

One of the Linux servers for the accounting departments needs additional memory to fix recent performance issues. You have ordered the memory, but it is back ordered, so you decide to add a swap partition to the server to help 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

You have added several new hard disks to your system. After partitioning and formatting, you have modified a configuration file to mount these new file systems automatically. You want to document the change you made.

Which of the following configuration files would you document?

/etc/fstab

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).

Make sure your current directory is not on the file system and try to unmount again.

Find and close any open files on the file system, and try to unmount again.

You need to mount the CD-ROM device to the /media/cdrom directory. What command should you use?

mount /dev/cdrom /media/cdrom

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, CD-ROMs, and Zip disks?

/media

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

What is the full path and filename of the file that contains the file system table for a Linux system?

/etc/fstab

You have partitioned and formatted a new hard disk, sdc. 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

You are preparing to mount a device local to your system. Which directory holds the device files?

/dev

Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (Choose two.)

umount /dev/sdb2
umount /mnt/temp

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 the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?

mount -a

You want to mount a number of filesystems each time the system is brought up. Which configuration file should hold the configuration information for the filesystems to be mounted?

/etc/fstab

Yesterday you created a new swap area for your system. Today, after rebooting the system, you find 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.

Which file shows the currently mounted volumes?

/etc/mtab

You are requested to help a user who reports that he has no more local storage space. You got to his system and log in as the root user.

Which of the following commands will display the available disk space on all partitions? (Select TWO).

df -h
df

You have an xfs file system in your Linux system represented by /dev/sdb1. You need to copy all the filenames on the drive to the /reviewxfs file. You must be able to read the filenames in the /reviewxfs file.

Which of the following commands should you use?

xfs_metadump -o /dev/sdb1 /reviewxfs

Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility. Which debugfs option should you use to examine the file system?

-c

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

You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files.

Which of the following commands will show you the amount of free space?

df /sales

You are asked to help a user who is 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.

Which of the following commands allows you to use an alternative superblock when the primary superblock has been corrupted?

e2fsck -b 16385 /dev/sda1

You need to convert the file system of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive. What command and option should you enter at the command prompt?

tune2fs -j /dev/sdb3

You suspect your /dev/sda3 partition is in need of repair.

Which of the following e2fsck options will repair the errors without any interaction from you?

-p

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 should you use?

xfs_info
xfs_growfs -n

Which of the following describes the effects of the tune2fs -j /dev/sdb1 command?

Converts the /dev/sdb1 device to ext3.

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

Anna is attempting to unmount the mount point /mnt/daata. The umount command failed and displayed error message stating that the device is busy. Anna suspects there may be an open file causing the issue. Which of the following commands will show Anna a list of open files?

lsof

You are requested to help a user who reports that he has no more local storage space. You go to his system and log in as the root user.

Which of the following commands will display the available disk space on all partitions? (Select TWO).

df
df -h

You have an XFS file system in your Linux system represented by /deb/sdb1. You need to copy all the filenames on the drive to the /reviewxfs file. You must able to read the filenames in the /reviexfs file.

Which of the following commands should you use?

xfs_metadump -o /dev/sdb1 /reviewxfs

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

What command would you enter at the command prompt to list all files and directories in the badams home directory along with a file size and a total amount of space taken up by the directory?

du -ac /home/badams

You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files.

df /sales

You are asked to help a user who is 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.

Which of the following commands allow you to use an alternative superblock when the primary superblock has been corrupted?

e2fsck -b 16385 /dev/sda1

You need to convert the file system of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive. What command and option should you enter at the command prompt?

tune2fs -j /dev/sdb3

You suspect your /dev/sda3 partition is in need of repair.

Which of the following e2fsck options will repair the errors without any interaction from you?

-p

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 should you use? (Select TWO). (Each answer is an independent solution.)

xfs_growfs -n
xfs_info

Which of the following describes the effects of the tune2fs -j /dev/sdb1 command?

Converts the /dev/sdb1 device to ext3.

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

Anna is attempting to unmount the mount point /mnt/data. The umount command failed and displayed error message stating that the device is busy. Anna suspects there may be an open file causing the issue.

Which of the following commands will show Anna a list of open files?

lsof

Which command should you enter at the command prompt to change the quota settings for the gshant user?

edquota -u gshant

What is the name of the package that must be installed if you want to use disk quotas on your Linux system?

quota

Which of the following commands will open the quota file for a specific user?

edquota -u

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.

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?

quotaon /home

Which command should you enter at the command prompt to display the current user's quota limits and disk usage?

quota

Which of the following repquota options will give quota limits and disk usage for all file systems listed in /etc/mtab?

-a

You need to implement disk quotas on your Linux system. You need the quotas on 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

Which of the following commands displays the disk usage and quota limits for the development group?

quota -g development

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

Which of the following commands make sales the group owner of the /sales/report file? (Select TWO. Each answer is an independent solution.)

chown .sales /sales/report
chown :sales /sales/report

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?

Which group owns this file?

Which user owns this file?
pclark

Which group owns this file?
acct

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 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

Roberto, a help desk technician, received a call from Sally. She was not able to change to a directory that she owns. The following is the output from the commands that Sally entered:
...
...

Based on the output, which of the following describes the problem?

Sally does not have the eXecute permission as owner of the directory.

You must 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 would accomplish this?

chmod 750 myscript

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

There is a directory called projects owned by the user cmarcela and the group rd. cmarcela has left the company. You need to give ownership of the projects directory, its files, and its subdirectories to the user ebates, who is a member of the mgmt group.

Which of the following commands should you use to change the user ownership?

chown -R ebates projects

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

You have a critical file called yearend.xls. You want to set file permissions so that only the owner of the file can modify it and only group owners can read it. Which permission listed below will accomplish that?

-rw-r----- 1 george acctg 26256 June 1 04:16 yearend.xls

You are called into the office of a newly hired manager. He 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 he tries to access the file. He 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 him to be able to read and write to the file?

666

A service account is created by the system or an application and cannot be used to log in to the system.

Which of the following methods can be used to verify that a service account cannot login to the system?

View the entry for the service account in /etc/passswd and look for /sbin/nologin.

A user calls the help desk. Each time he creates a new text file, permissions of 640 are applied to the file, and he use chmod to set them to 644.

What command should you enter in the user's profile to set the default permission for newly created files to 644?

umask 0022

While reading about file system permissions in your 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 ar 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.

You need to create a large number of files, and you would like to ensure that youm 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 within the correct permissions using the LEAST amount of effort?

type umask 0066 to change your umask.

What is the typical default umask value?

022

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-----)

You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?

chmod 4777 rider

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?

cjmod g+s acctg

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 examples shows correct usage of the SUID flag?

-rwsr--r-- 3 root sys 73748 Nov 2 2005 /usr/bin/applicationx

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 correct usage of the SGID flag?

-rwxr-sr-- 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx

Setting the SUID flag is a powerful and useful feature. It can 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.

Which of the following special permissions prevents a file's deletion by anyone except the file's owner?

Sticky bit

You have just installed a new program that will be used by all users on the computer. After installation, you log in as a regular user, and you 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.

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, however, you want to ensure that no one on the team will delete the document by accident.

Your user name is bsmith.
A long listing of the file is as follows:

-rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc

Which of the following commands would accomplish this?

chmod 1664 project_data.doc

You have a tape archive mounted in /dev/rmt12. You need to get a list of the file contents. Which command will list the contents?

tar -tf /dev/rmt12

You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?

tar -vcf /dev/st0 /var/oracle

You need to back up Jane's files in her /home/user/jane directory.

Which command will create an archive of these files in the /root directory? (Select TWO).

tar -czvf /root/jane.tgz /home/user/jane
tar -cvf /root/jane.tar /home/user/jane

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 command will perform the restore?

tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls

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 need to view the files within /home/gshant/expfile.bz2, but you want to leave the compressed file unchanged. What bzip2 option should you use?

-k

You want to archive some configuration files to the floppy drive. You are using the cpio utility. Which line will create the archive on the floppy?

ls /etc/*.conf | cpio -ovd > /dev/rfd0

Which utility allows you to make an exact copy of a file?

dd

Which of the following is the BEST command to use when creating a disk image?

dd

Which of the following represent a typical Linux backup type? (Choose FIVE.)

Incremental
Differential
Snapshot
Full
Image

Sets with similar terms

Linux Part 1 - Configuring Hardware (Quiz 3)

34 terms

mamoreno89

Linux-Module 7

67 terms

mwillard20

Unit 07- Disk and File System Management

100 terms

jrliverman16

Final For CNCPTS

80 terms

Alyssa_Ward95

Sets found in the same folder

LabSim Linux+ 7.3

15 terms

momscookies

Linux 1.1

31 terms

nerdyhippy

CompTIA Linux + Chap 2 Managing Software

109 terms

Michael_Kyaw

LINUX PRO SECTION 1.1.2 SHELL FACTS

16 terms

Trese2018PLUS

Other sets by this creator

Linux Pro Chapter 6

57 terms

xXanonXx

Testout Linux Pro Chapter 5

21 terms

xXanonXx

Verified questions

COMPUTER SCIENCE

Compare the throughput achieved by a RAID level 5 organization with that achieved by a RAID level 1 organization for the following: a. Read operations on single blocks b. Read operations on multiple contiguous blocks

Verified answer

COMPUTER SCIENCE

Answer each part for the following context-free grammar G. $$ \begin{array}{l}{R \rightarrow X R X | S} \\ {S \rightarrow \mathrm{a} T \mathrm{b} | \mathrm{b} T \mathrm{a}} \\ {T \rightarrow X T X|X| \varepsilon} \\ {X \rightarrow \mathrm{a} | \mathrm{b}}\end{array} $$ a. What are the variables of G? b. What are the terminals of G? c. Which is the start variable of G? d. Give three strings in L(G). e. Give three strings not in L(G). f. True or False: $T \Rightarrow \mathrm{aba}$. g. True or False: $T \stackrel{*}{\Rightarrow} \text { aba. }$. h. True or False: $T \Rightarrow T$. i. True or False: $T \stackrel{*}{\Rightarrow} T$. j. True or False: $X X X \stackrel{*}{\Rightarrow} \text { aba. }$. k. True or False: $X \stackrel{*}{\Rightarrow} \text { aba }$. l. True or False: $T \stackrel{*}{\Rightarrow} X X$. m. True or False: $T \stackrel{*}{\Rightarrow} X X X$. n. True or False: $S \stackrel{*}{\Rightarrow} \varepsilon$. o. Give a description in English of L(G).

Verified answer

COMPUTER SCIENCE

Write a program that has an array of at least 20 integers. It should call a function that uses the linear search algorithm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program then should call a function that uses the binary search algorithm to locate the same value. It should also keep count of the number of comparisons it makes. Display these values on the screen.

Verified answer

COMPUTER SCIENCE

Assume that a file containing a series of integers is named numbers.txt and exists on the computer’s disk. Write a program that reads all of the numbers stored in the file and calculates their total.

Verified answer

Other Quizlet sets

pmg202C CHAP 1

87 terms

quizlette8641384PLUS

Powerplant Section M: Fuel Metering Systems

17 terms

LockonDan

Psych Test 4 Final

52 terms

Celina_Brinker

(1) Strategic Management and Strategic Competitive…

11 terms

tkatsma

Related questions

QUESTION

Which colonial trend from the 17th and 18th centuries is best illustrated by the image above?George Whitefield Preaching, 18th century

8 answers

QUESTION

(T or F) Debits increase asset and expense accounts

8 answers

QUESTION

Who was the first U.S school nurse & what did school nurses find out?

15 answers

QUESTION

What happens when you combine a strong acid and a strong base

7 answers

What does the command sudo do quizlet?

The sudo command enables an authorized user to issue individual commands as the root (or other user), limiting potential damage to the system.

Which command can you issue to find out which user account you're currently using?

Description : The who command is used to get information about currently logged in user on to system.

What is the advantage of using the switch in the context of the Userdel command quizlet?

It has a history function that can also be used to remember commands entered in previously.

Which command is primarily used to display the details of users who are currently logged into a system and their transactions?

You need to use who command to display users who are currently logged in your server. This command is useful to find out the following information: Time of last system boot.