The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
/dev/hda15 swap swap defaults 0 0
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
user : allow a user to mount
Owner : allow device owner to mount
Pamconsole : allow a user at the console to mount
Rate this question:
4.
What is the proper option to put in /etc/fstab to enable user quotas for particular partition?
A.
Usrquoata
B.
Userquota
C.
Userquoatas
D.
Usrquotas
Correct Answer
A. Usrquoata
Explanation Usrquota enables the user quota accounting and limits according to the policy of
administrator.
Example:
LABEL=/home /home ext3 defaults,usrquota 1 1
Rate this question:
5.
What command (with parameter[s]) would you type to mount all partitionsspecified in the /etc/fstab?
Correct Answer
Explanation mount command displays all mounted filesystem and mount -a mount
all filesystem written /etc/fstab.
Rate this question:
6.
You have just added a CD-ROM drive (/dev/hdd) to your system and have added itto your fstab. Typically you can use which of the following commands to mountmedia in that drive to /mnt/cdrom?
A.
Mount /dev/cdrom /mnt/cdrom
B.
Mount /dev/cdrom
C.
Mount -t cdrom /dev/cdrom /mnt/cdrom
D.
Mount /mnt/cdrom
E.
Automount /mnt/hdd /mnt/cdrom
Correct Answer
D. Mount /mnt/cdrom
Explanation /mnt/cdrom or /media/cdrom is the mount point for cdrom specified in /etc/fstab.
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
So we need to mount just typing mount /media/cdrom command.
Rate this question:
7.
You wish to copy the entire contents of the /dev/hda1 to /dev/hdb1 block by block.Type in the simplest command that would do this?
Correct Answer dd if=/dev/hda1 of=/dev/hdb1
Explanation dd command , which creates the disk image, the above command
cratest the image of /dev/hda1 and transfer into /dev/hdb1.
Similarly dd if=diskboot.img of=/dev/sda1 : Which creates the image of diskboot.img
and writes into /dev/sda1.
Rate this question:
8.
You have a floppy image called boot.img in your current working directory andwish to transfer this image to a floppy device /dev/fd0. Type in the simplestcommand that would do this?
Correct Answer
Explanation dd command creates the disk image, the above command creates the
image of boot.img and writes the image into /dev/fd0.
Rate this question:
9.
You are building a server that will have many hardware and operating systemupgrades. The server is the file server for all users on your 100 user network. Whichdirectory should have its own mountpoint and/or hard drive?
Correct Answer
Explanation /home is the user's base directory where users home directory will
create. According to QUESTION that there are more than 100 users so /home needs to
mount on separate partition.
Rate this question:
10.
On boot you see an error message indicating that line 18 of /etc/fstabis bad. Looking at it shows:/dev/fdO /mnt/ floppy auto auto, user 0 0Why is there an error?
A.
Auto is not allowed in the third field for rernoveable media.
B.
Auto in the fourth field cannot be used for removeable media.
C.
The fifth field must be 1 for removeable media.
D.
The sixth field must be 1 for removeable media
Correct Answer
B. Auto in the fourth field cannot be used for removeable media.
Explanation Here is the line of /etc/fstab
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
auto filesystem is used for removable media so it can't use in mounting option. So
Answer B is correct.
Rate this question:
11.
What does the command mount -a do?
A.
It mounts the floppy disk for all users.
B.
It shows all mounted file systems.
C.
It opens /etc/fstab to edit.
D.
It mounts all file systems listed in /etc/fstab.
Correct Answer
D. It mounts all file systems listed in /etc/fstab.
Explanation mount command lists all mounted file system. -a option is used to
mount all file system written in /etc/fstab.
Rate this question:
12.
To allow a regular user account to mount and unmount a filesystem (for instance, acdrom or floppy), which option will need to be added to the corresponding line in /etc/fstab?
A.
Nouidchk
B.
Alluser
C.
User
D.
Auto
Correct Answer
C. User
Explanation Answer C is correct. user options is used to allow an ordinary user to
mount the file system. The name of the mounting user is written to mtab so that
user can unmount the file system again.
Rate this question:
13.
Which file contains information about filesystems and their respective mount points?
A.
/etc/mount
B.
/etc/fs_mount
C.
/etc/fstab
D.
/proc/fstab
Correct Answer
C. /etc/fstab
Explanation Usually to mount the filesystem we use the mount command but that is
only for the current session. To mount the filesystem at boot time automatically we
use /etc/fstab.
Pattern of /etc/fstab
Device mount point filesystem mount options dump fsck
Example
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
none /proc proc defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var1 /var ext3 defaults 1 2
LABEL=SWAP-hda7 swap swap defaults
Rate this question:
14.
Which option must be listed in /etc/fstab to activate user quotas automatically?
A.
Quota
B.
User
C.
Quotaon
D.
Usrquota
Correct Answer
D. Usrquota
Explanation To implement quota in partitions, we should mount with usrquota for
user quota, grpquota for group quota.
Example of mounting /home using usrquota and grpquota options.
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
Rate this question:
15.
How can you generate a report on the disk usage and quotas for all filesystem whichare defined in /etc/mtab to be read-write with quotas?
A.
Quotarep -a
B.
Repquota /dev/hd*
C.
Repquota -a
D.
Quotarep /dev/hd*
Correct Answer
C. Repquota -a
Explanation repquota prints a summary of the disk usage and quota for the
specified filesystem. For each user the current number of files and amount of space
is printed along with any quotas created with edquota.
Example: repquota /home : whch prints the quota information on /home.
Rate this question:
16.
What must be added to the following to enable group quotas for /usr?/dev/hda2 /usr ext2 defaults 1 1
Correct Answer grpquota
Explanation grpquota enables the group quota accounting and limits according to
the policy of administrator.
Example:
LABEL=/home /home ext3 defaults,grpquota 1 1
Rate this question:
17.
Two directories require different quota for file system usage. The /var/maildirectory needs a 20MB quota, and the /home directories require a 40MB quota.What must be true about these directories?
A.
They must exist on Ext3 partitions
B.
They must be on different drives
C.
They must be on different partitions
D.
They must be mounted by the root user
Correct Answer
C. They must be on different partitions
Explanation We can apply the quota policy on per paritions basis. If different
quota policy is required then needs to create the different partitions.
Rate this question:
18.
You want to configure user quotas for the /home filesystem. You've installed thequota packages. What else needs to be done to enable the filesystem's quotas?Choose all that apply.
A.
Add usrquota to the /etc/fstab options column
B.
Run the quotaon command
C.
Run the quotacheck -avug command
D.
Edit the user's quota settings
E.
Remount the file system
Correct Answer(s)
A. Add usrquota to the /etc/fstab options column B. Run the quotaon command C. Run the quotacheck -avug command D. Edit the user's quota settings E. Remount the file system
Explanation Steps of configure the quota
1. mount the partition using usrquota , grpquota option eg
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 1 in fstab then reboot or
remount the filesystem
#mount -o remount /home
2. Create the quota Information file
#touch /home/aquota.user
#touch /home/aquota.group
3. Initialize the quota database
#quotacheck -ug /home
4. Enable the quota
#quotaon -ug /home
5. Apply the quota policy
#edquota -u user1 /home
6. Monitor the quota
#quota username
#repquota /home
Rate this question:
19.
Where is the quota information for users of volume /home stored?
A.
/etc/sysconfig/quota/quota.home.user
B.
/etc/quota/quota.home.user
C.
/home/quota.home.user
D.
/home/quota.user
E.
/home/quota.home.group
Correct Answer
D. /home/quota.user
Explanation Steps of configure the quota
7. mount the partition using usrquota , grpquota option eg
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 1 in fstab then reboot or
remount the filesystem
#mount -o remount /home
8. Create the quota Information file
#touch /home/aquota.user
#touch /home/aquota.group
9. Initialize the quota database
#quotacheck -ug /home
10. Enable the quota
#quotaon -ug /home
11. Apply the quota policy
#edquota -u user1 /home
12. Monitor the quota
#quota username
#repquota /home
aquota.user is the quota information file as well as aquota.group is the group quota
information file.
Rate this question:
20.
What file must be put in the root of a filesystem for quotas to be enabled for users?
Correct Answer quota.user aquota.user
Explanation aquota.user is the quota information file as well as aquota.group is the
group quota information file, which files required to create in root filesystem.
Rate this question:
21.
You are the root user of a system, and need to gather quota information about allusers on the system. Type the command along with any options and arguments toaccomplish this.
Correct Answer repquota -a
Explanation repquota command displays the quota report of particular filesystem.
#repquota /home : Which reports the information of quota on /home
Rate this question:
22.
You are building that what will be a busy email and web server. You have plenty ofspace on a hardware RAID device. You are concerned about heavy log activitycausing problems. Which directory should you give its own partition?
Correct Answer /var
Explanation /var/spool/mail is the user's mail spooling directory and /var/www is
the directory used by the http service. So /var/ shoul in different partitions.
Rate this question:
23.
To prevent users from being able to fill up the / partition, the _________ directoryshould be on a separate partition if possible because it is world writeable.
Correct Answer /var
Explanation If you haven't mounted the /var in different partition, it uses the space
from / parititions and /var has the world writable permission means others also can
write the files in /var/ so whenever others creates files it occupied space from /.
Rate this question:
24.
Which of the following commands is run last during boot on a systemWith quotas enabled?
A.
Fsck
B.
Mount
C.
Quotacheck
D.
Quotaon
Correct Answer
D. Quotaon
Explanation quotaon announces to the system that disk quotas should be enabled
on one or more filesystems. The filesystem quota files must be present in the root
directory of the specified filesystem and be named either aquota.user (for version 2
user quota), quota.user (for version 1 user quota), aquota.group (for version 2
group quota), or quota.group (for version 1 group quota).
Rate this question:
25.
You are using quota on your system. How can you see disk quota details?
A.
Repquota
B.
Quota -l
C.
Quota
D.
Quotachech
E.
Quota -list
Correct Answer
A. Repquota
Explanation repquota prints a summary of the disk usage and quotas for the
specified file systems. For each user the current number of files and amount of
space (in kilobytes) is printed, along with any quotas created with edquota.
Example : repquota /home à prints the summary of disk usage and other information of
all users.
Rate this question:
26.
Which of the following commands will list the quota for the user foobar?
A.
Repquota foobar
B.
Quota foobar
C.
Lsquota foobar
D.
Printquota foobar
Correct Answer
B. Quota foobar
Explanation quota - display disk usage and limits. Quota displays user's disk usage
and limits. By default only the user quotas are printed.
Either quota -u username
Or
quota username
To display group quota:
quota -g groupname
Rate this question:
27.
On a standard Linux system as a normal user, what umask value will cause your fileto be created with the following permissions ?drwxr-x--- 2 username group 512 Mar 6 11:16 dir1-rw-r----- 1 username group 0 Mar 6 11:16 file1
Correct Answer 027 0027
Explanation In terms of umask, you need to look at things backwards... When you
see a umask of 027 it's the same as a pattern of ----x-xxx, right? Now, since it's a
umask you need to INVERT that to figure out how it turns into an actual
permission string. That makes it xxxx-x---.
Rate this question:
28.
A user named Certkiller needs to execute a system script file. What rights do theuser need to execute a script file?
A.
Read, Write and Execute for all
B.
Execute only for user
C.
Read-only for user, Execute for group
D.
Read and Execute in the same permission set
Correct Answer
D. Read and Execute in the same permission set
Explanation rwx for everyone is a bit overkill, execute only will not be enough as
you can't access the file in that case. Read only for user will prohibit you from
executing it. So in the end you need both Read and Execute permission in the same
permission set.
Rate this question:
29.
Your unmask is set to 002. If you create a new file, what will the permission of thenew file be?
A.
-rw-rw-r--
B.
Rwxrwx-w-
C.
------w-
D.
Rwxrwxr-x
Correct Answer
A. -rw-rw-r--
Explanation The given correct answer is "-rw-rw-r--". In UNIX/Linux systems, file permissions are represented by a 10-character string. The first character represents the file type, in this case, a regular file denoted by "-". The next three characters "rw-" indicate that the owner of the file has read and write permissions. The following three characters "rw-" indicate that the group members have read and write permissions. The last three characters "r--" indicate that others have only read permission. Therefore, if the unmask is set to 002, the new file will have permissions -rw-rw-r--.
Rate this question:
30.
Before you start creating directories on a newly created file system, what should you do?
A.
Check the base system's umask setting
B.
Check the base system's CMOS setting
C.
Check the base system's init stage setting
D.
Check the base system's process ID setting
Correct Answer
A. Check the base system's umask setting
Explanation According to the technical information available at Linux From
Scratch Ver 3.0, Before we start creating directories, we need to check the base
system's umask setting. To do this, we run umask. The result should be 022. If it
isn't, then run the following command to ensure that the directories will be created
with the correct permissions:
umask 022
Rate this question:
31.
Type the command and argument that would cause the default permissions onnewly created files to be set as:rw- r-- r--
Correct Answer umask 022 umask 0022
Explanation umask is the command which display as well as set the default
permission.
First examine the given permission:
rw- for owner user : 6
r-- : for owner group member :4
r-- : for others: 4
It means total permission is 644
Now to set 644 default permission into file needs to subtract from 666
666
644
022
#umask 022
Rate this question:
32.
If you set the umask to 022, by default what permissions will your files have?
A.
0220
B.
0557
C.
0644
D.
0755
Correct Answer
C. 0644
Explanation umask is the command which display as well as set the default
permission.
When set the umask 022 then permission on files :
666
022
644
It means rw-r--r-- permission will set on files and
777
022
755
rwxr-xr-x permission will set on directory.
Rate this question:
33.
A base Linux system's umask setting should be default to:
A.
022
B.
066
C.
077
D.
211
Correct Answer
A. 022
Explanation There are two different default umask value one for root user and
another is for non-root user.
022 umask is for root user and 002 for the non-root user. It is defined globally in
/etc/bashrc file.
Rate this question:
34.
In which file are you likely to find the global setting for the umask and ulimit?
A.
/etc/profile
B.
/etc/bashrc
C.
/etc/bash_profile
D.
~/.bashrc
E.
~/.bash_profile
Correct Answer
B. /etc/bashrc
Explanation Default umask is specified in /etc/bashrc file for root user and
non-root user. For root user 022 is the default umask and 002 is for the non-root
user.
Rate this question:
35.
What is the purpose of setting the SUID? Choose all that apply.
A.
Allows any user to run a executable program with the permissions of the owner of the program
B.
Allows any user to run a program with the permissions of the group of the program
C.
Everyone can edit the files that are created but only root and owner can delete them.
D.
To keep programs that are needed constantly in non-swappable RAM
E.
To cause a program opened in one X virtual pane to follow the user's focus to other panes
Correct Answer(s)
A. Allows any user to run a executable program with the permissions of the owner of the program D. To keep programs that are needed constantly in non-swappable RAM
Explanation Like files or directories, process also runs under the some ownership.
By default process start under the ownership of executer. Means who is going to
execute the command, process start under the ownership or security context of that
user or group. When SUID or SGID bit is set the executable file, process starts
under the security context of file owner then executer.
#chmod u+s file : which sets SUID bit on file
#chmod u+g file : Which sets SGID bit on file.
Rate this question:
36.
What TWO permissions must a user have in order to run a shell script?
A.
Read
B.
Write
C.
Execute
D.
Browse on the directory
E.
Users cannot run shell scripts
Correct Answer(s)
A. Read C. Execute
Explanation To execute the shell scripts required permission is read and execute.
#chmod a+x test.sh : Which sets the execute permission on test.sh file.
Rate this question:
37.
When you create a new directory, you see the permissions are set to 600. Whatumask value would cause this to happen?
A.
177
B.
066
C.
244
D.
155
E.
333
Correct Answer
A. 177
Explanation The new permission is 600, to set this permission umask should set:
777
-600
177
# umask 177
When umask set 177 the permission on directory will be 600.
Rate this question:
38.
When you create a new file, the permissions show as 654. What value is the umasklikely set at?
A.
012
B.
002
C.
123
D.
022
Correct Answer
A. 012
Explanation The new permission is 654 to set this permission umask should set:
666
654
012
#umask 012
When set the umask 012 the permission will be 654 on file.
Rate this question:
39.
What are the default permissions for the Red Hat /etc/passwd file?
A.
644
B.
640
C.
400
D.
641
E.
440
Correct Answer
A. 644
Explanation Default permission of /etc/passwd file in redhat enterprise linux is 644.
-rw-r--r-1 root root 3530 Aug 29 12:43 /etc/passwd
Rate this question:
40.
What are the default permissions on the Red Hat /etc/shadow file?
A.
644
B.
600
C.
400
D.
444
E.
640
Correct Answer
C. 400
Explanation The default permission of /etc/shadow file in Redhat Enterprise Linux
is 400 means only the root user can read the file.
-r--------1 root root 3530 Aug 29 12:43 /etc/passwd
Rate this question:
41.
After creating a new file, you notice that the permissions of the newfile are -rw-rw-rw-. From this, you know that the value of the umask iswhat?
A.
023
B.
000
C.
112
D.
111
E.
223
Correct Answer
B. 000
Explanation Files umask value is 6 because normal file created using the text editor
do not have execute permission.
Maximum Permission to file 666
Applied Permission to file 666
Unmask value is -----
000
Rate this question:
42.
You want the default permissions for your files to be -rw-r----- .HOW must you set umask?
A.
037
B.
640
C.
038
D.
027
Correct Answer
A. 037
Explanation Total Permission 777
New Permission to set 740
Total Difference 037
umask 037 should set.
Rate this question:
43.
You changed umask to prevent access to your files by others. Nowyou realize that another user has read a document that you wrote 2weeks ago. Which of the following statements is correct?
A.
You forgot a umask option
B.
You had to delete all older files.
C.
You forgot to use chmod.
D.
You have to reboot.
Correct Answer
C. You forgot to use chmod.
Explanation umask command is used to set the default permission to new file or
directory. It will not change the permission of already created files/directories.
To change the Permission of already created files/directories, should chmod command.
Rate this question:
44.
What umask will set the file permissions on a newly created file to -rw-r--r-- (644)?
A.
0002
B.
0022
C.
0224
D.
0246
Correct Answer
B. 0022
Explanation umask command is used to display and set the default permissions.
Here in #######*******QUESTION asking for the umask value of newly created file having
permission
644. If any permission is not changed then special permission i.e SUID, SGID and
sticky bits are not set.
Then in for have total permission for file is:
7666
-7644
0022
Rate this question:
45.
Which command will print out the attributes of the file foobar?
A.
Ls --attr foobar
B.
Lsattr foobar
C.
Printattr foobar
D.
Fileattr foobar
Correct Answer
B. Lsattr foobar
Explanation lsattr - list file attributes on a Linux second extended file system
Rate this question:
46.
You work as network administrator at Certkiller .com. A user moved to anotherdepartment within Certkiller .com. Which command would you use to change the groupownership of her files and directories? (fill in the blank - only the command withoutarguments or options):
Correct Answer chown chgrp
Explanation chown command change user and group ownership on file or
directory. Similalrly you can change the group ownership using the chgrp
command.
#chown userowner.groupowner file
#chown -R userowner.groupowner directory : This method is called recursively, it
changes the ownership of directory as well as all the conetents of directory.
#chgrp groupowner filename/directory
Rate this question:
47.
You need to alter the permissions on the directory /home/mrbill and all it'scontents to match the following permissions. drwxr--r--Which of these commands with options and arguments will accomplish this? Choosetwo.
A.
Chmod 0744 /home/mrbill -R
B.
Chmod 744 /home/mrbill/*
C.
Chmod -R u=rwx,g=r,o=r /home/mrbill
D.
Chmod u+rwx,g+r,o+r /home/mrbill
Correct Answer(s)
A. Chmod 0744 /home/mrbill -R C. Chmod -R u=rwx,g=r,o=r /home/mrbill
Explanation We can change the permission of file or directory using the chmod
command either using sumbolic method or numeric method.
Permission categories
u : Owner user
g : Owner Group
o : others
a : all
Permission types:
r : Read only : Numeric Value 4
w : Write : Numeric Value 2
x : Execute : Numeric Value 1
#chmod g+rwx filename : Which sets the read, write and execute permission to owner
group member on file.
#chmod 777 filename : Which sets the read, write and execute permission to all
-R option is called recursive, when you use this option in directory it changes the
permission to all the contents of directory.
Rate this question:
48.
How can you set the SGID on a file called Certkiller examinator?
A.
Chmod u+s Certkiller examinator
B.
Chmod g+s Certkiller examinator
C.
Chmod o+s Certkiller examinator
D.
Chmod u+t Certkiller examinator
Correct Answer
B. Chmod g+s Certkiller examinator
Explanation Like files or directories, process also runs under the some ownership.
By default process start under the ownership of executer. Means who is going to
execute the command, process start under the ownership or security context of that
user or group. When SUID or SGID bit is set the executable file, process starts
under the security context of file owner then executer.
#chmod u+s file : which sets SUID bit on file
#chmod u+g file : Which sets SGID bit on file.
Rate this question:
49.
Which of the following commands makes /bin/foo executable by everyone but onlywritable by its owner?
You have the following file: -rwxrwxr-x 1 foo root 0 Feb 23 07:48 /bin/fooWhich of the following commands will change the owner of the file /bin/foo from thefoo user to the bar user without affecting group ownership?