Olete.in
Articles
Mock Tests
๐งช RedHat MCQ Quiz Hub
Red Hat Linux Mcq
Choose a topic to test your knowledge and improve your RedHat skills
1. Where do the manual (man) pages for all commands reside in the File System Hierarchy (FSH)?
/usr/share/man
/usr/share/info/man
/usr/share/locale/man
/usr/man/share/locale
2. Which (free) linux distro is derived from RHEL
Mint
Ubuntu
Debian
CentOS
3. Which is not a valid priority in syslogd.conf?
notice
news
debug
alert
4. To configure networking via a console GUI you can use:
system-config-network
system-config
network-config
networking config
5. How to show currently loaded kernel modules?
kernshow
lsmodules
modprobe
lsmod
6. To find the version of redhat in use you can:
uname -a
none will work
cat /etc/redhat-release
either will work
7. Which statements are true about a source RPM?
Source RPM does not contain information about how to install the software.
Source RPMs can be compiled and installed directly.
Source RPM cannot be used to build a binary rpm.
None of These
8. what does the following command do? "watch -n 1 du -hs /tmp/file"
waits till the file /tmp/file gets created befor checking the size
It runs the command du -hs /tmp/file every second and updates the output
none
all of the above
9. What does the "tcpdump" command do?
Captures traffic on a network
Lists All TCP and UDP connections.
Lists All TCP connections.
Terminates all TCP connections on the target host.
10. Using cat command, which option is used to print the line number?
cat -A filename
cat -n filename
cat count number filename
cat -number filename
11. Using cat command, which option is used to print the line number?
cat -A filename
cat -n filename
cat count number filename
cat -number filename
12. How to find out memory usage:
vmstat
cat /proc/meminfo
top
All of the mentioned
13. To verify what state (run level) you are currently running in, you use:
runlevel
init
telinit
chkstate
14. You use samba to:
share resources (like printers) between a Windows and Linux machines
mount Windows filesystems on Linux machines
none are correct
both are correct
15. What is pNFS means?
Parallel Network File System
peripheral Network File System
both (a) and (b)
None of These
16. The following entry appears in the /etc/crontab as follows: 30 4 * * 1 /bin/sh /home/Tom/rmcore 2>&1 /dev/null
"rmcore" will execute on the first day of every month
"rmcore" will execute every Monday at 4:30 a.m.
"rmcore" will execute on April 30th for one hour
None of these
17. Using scp to copy a file "test_file" from your machine to the remote machine "test_machine" to the /tmp directory, using the account "test_user" on the remote machine, you do:
scp test_file:test_user@test_machine:/tmp
scp test_file test_machine@test_user:/tmp
scp -f test_file -u test_user -m test_machine -d /tmp
scp test_file test_user@test_machine:/tmp
18. How would you find out the dependencies of RPM package?
#rpm -UVH
#rpm -ivh
#rpm -icv
#rpm -qR
19. Larry, working as root, needs to change the ownership of the file "myfile" from "james" to "mary." He should:
chown mary myfile
chown myfile james:mary
chown james:mary myfile
changeowner mary myfile
20. Which Standard does pNFS Stands for..
NFS 4
NFS 3
NFS 4.1
None of these
21. If you set your /etc/inittab file to have the default init entry to be 'init:3:default:', then your system default runlevel is:
administrative single-user mode; denies other users access to the system, but allows root access to the entire multiuser file system. Startup scripts are not run
multiuser, without networking (i.e., you don't have access to network services like NFS, xinetd, and NIS)
full multiuser mode with login to command-line interface; allows remote file sharing with other systems on your network. Also referred to as the text mode state
full multiuser mode that starts up in an X session, initiating a graphical login; allows remote file sharing with other systems on your network
22. What is the tee command?
send errors to a file
create marks on a file
translate characters in a file
split standard output to a file
23. xhost +' is a security problem because:
this command does not pose any security risks
any user with access to the system could connect to your X display
any user on remote machines could open a remote connection to your system with rsh or ssh
any host on the network could assume your IP system address
24. You configure an OpenSSH server in the file:
/etc/ssh/sshd_config
/etc/sshd/sshd.config
/etc/sshd_config
/etc/ssh/sshd.conf
25. Which mode provides load balancing and fault tolerance in ethernet bonding ?
Round Robin
802.3ad
balance-tlb
balance-alb
26. The user smith issued the egrep "^[[: upper:]]" words.txt command. What does this command do?
displays all lines in the words.txt file that begins with an uppercase letter
displays all lines in the words.txt file after translating uppercase letters to lowercase
displays all lines in the words.txt file that contains an uppercase letter
displays all lines in the words.txt file after translating lowercase letters to uppercase
27. What is the purpose of the file /etc/updatedb.conf?
configuration file for software updates
configuration file for driver updates
configuration file for kudzu
configuration file for mlocate package
28. Identify the true statement about configure script
It creates the required directories and subdirectories on the system.
It creates the necessary Makefiles based on the user information.
It depends on make to create the Makefiles.
It does not depend on the autoconf tool for the package installation. It creates the necessary Makefiles based on the user information.โ It creates the required directories and subdirectories on the
29. If umask is 0022, what is the by default permission of a file?
755
777
644
655
30. For all filesystems listed in /etc/mtab, to display the total space allowed for a user or group, you use the command:
quota
du
usage
df
31. Which of the following are valid iptable chains?
Through, In,
Forward, Input, Output
both (a) and (b)
None of These
32. Which of the following are valid iptable chains?
Through, In,
Forward, Input, Output
both (a) and (b)
None of These
33. Which command is used to kill a process gracefully?
pkill -9 <PID>
kill -9 <PID>
kill -g <PID>
kill -15 <PID>
34. Which of the following options is true of the entry below? /dev/cdrom /cd iso9660 ro,user,noauto 0 0
This is an "fstab" entry which lets any user mount the CD-ROM.
This is an "fstab" entry which mounts a CD-ROM as a read-only device at boot time.
This is an "mtab" entry which mounts a CD-ROM as a read-only device at boot time.
None of These
35. What command will free the page cache?
echo 2 > /proc/sys/vm/drop_caches
echo 1 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/mem/drop_caches
echo 0 > /proc/sys/vm/drop_caches
36. What is the default maximum number of open files a user can have by default?
1024
4096
8192
unlimited
37. You use the SUSPEND character to suspend an already running process. Which signal does it send to the process?
SIGINT
SIGHUP
SIGSTOP
SIGTERM
38. System-wide values used by user and group creation utilities such as useradd and usergroup are kept in the file:
/etc/user.def
/sbin/passwd.defs
/etc/usergrp
/etc/login.def
39. When mounting a volume listed in "fstab",
it suffices to give only the mount point
both the device and mount point must be given on the command line.
both (a) and (b)
None of these
40. What file is used for 'HOSTNAME' configuration?
/etc/sysconfig/network
/etc/resolv.conf
/etc/sysconfig/networking
/etc/hosts
41. What file is used for 'HOSTNAME' configuration?
/etc/sysconfig/network
/etc/resolv.conf
/etc/sysconfig/networking
/etc/hosts
42. What file is used for 'HOSTNAME' configuration?
/etc/sysconfig/network
/etc/resolv.conf
/etc/sysconfig/networking
/etc/hosts
43. How to find out what packages are currently installed?
rpm -q
yum list installed
yum list --installed
rpm -a
44. Which statement is true about the files and directories created inside the /project directory that have 2777 permissions?
All files and directories will have the default group set to the primary group of the user who creates them in /project directory.
All executables inside the /project directory will run with the effective group ID (EGID) of the group of the /project directory.
All files inside the /project directory will have permissions set to 2644 and the subdirectories will have them set to 2755.
All files and directories will have the same group as that of the /project directory.
45. The /projects directory is being shared by server1 with the share name datashare through samba. To access the shared directory as bob you issue the following command: smbclient //server1/datashare -U 'bob%foouser' What happens when you execute the command?
The share will be accessed with the credentials of bob without being prompted for a password.
All the samba shares on server1 will be displayed.
bob will be prompted for a password to access the share.
All the shares on server1 accessible to bob will be displayed.
46. The /projects directory is being shared by server1 with the share name datashare through samba. To access the shared directory as bob you issue the following command: smbclient //server1/datashare -U 'bob%foouser' What happens when you execute the command?
The share will be accessed with the credentials of bob without being prompted for a password.
All the samba shares on server1 will be displayed.
bob will be prompted for a password to access the share.
All the shares on server1 accessible to bob will be displayed.
47. The /projects directory is being shared by server1 with the share name datashare through samba. To access the shared directory as bob you issue the following command: smbclient //server1/datashare -U 'bob%foouser' What happens when you execute the command?
The share will be accessed with the credentials of bob without being prompted for a password.
All the samba shares on server1 will be displayed.
bob will be prompted for a password to access the share.
All the shares on server1 accessible to bob will be displayed.
48. The /projects directory is being shared by server1 with the share name datashare through samba. To access the shared directory as bob you issue the following command: smbclient //server1/datashare -U 'bob%foouser' What happens when you execute the command?
The share will be accessed with the credentials of bob without being prompted for a password.
All the samba shares on server1 will be displayed.
bob will be prompted for a password to access the share.
All the shares on server1 accessible to bob will be displayed.
49. Which service lets you edit qcow2 images in Linux ?
guestfish
none of them
virt-manager
both virsh & virt-manager
50. The line '0 2 * * 1-5 tar cf /home/backp /home/projects' in a crontab will:
back up the projects directory at 2:00 A.M. from Sunday to Thursday
back up the projects directory at 2:00 A.M. every weekday
back up the projects directory at 2:00 P.M. from Sunday to Thursday
back up the projects directory at 2:00 P.M. every weekday
51. The line '0 2 * * 1-5 tar cf /home/backp /home/projects' in a crontab will:
back up the projects directory at 2:00 A.M. from Sunday to Thursday
back up the projects directory at 2:00 A.M. every weekday
back up the projects directory at 2:00 P.M. from Sunday to Thursday
back up the projects directory at 2:00 P.M. every weekday
52. Which kernel parameter is used to reset root password in RHEL7
both 1 & single
rd.break
single
1
53. To change the system runlevels, you use:
runlevel
setinit
telinit
initd
54. To change the system runlevels, you use:
runlevel
setinit
telinit
initd
55. How to kill user session?
kill -9 -u username
pkill -9 -u username
pskill username
kill username
Submit