RedHat/Red Hat Linux Mcq Sample Test,Sample questions

Question:
For all filesystems listed in /etc/mtab, to display the total space allowed for a user or group, you use the command:

1.quota

2.du

3.usage

4.df

Posted Date:-2022-10-01 04:19:55


Question:
How to find out memory usage:

1.vmstat

2.cat /proc/meminfo

3.top

4.All of the mentioned

Posted Date:-2022-10-01 01:23:34


Question:
How to find out what packages are currently installed?

1.rpm -q

2.yum list installed

3.yum list --installed

4.rpm -a

Posted Date:-2022-10-01 04:45:39


Question:
How to kill user session?

1.kill -9 -u username

2.pkill -9 -u username

3.pskill username

4.kill username

Posted Date:-2022-10-01 05:38:48


Question:
How to show currently loaded kernel modules?

1.kernshow

2.lsmodules

3.modprobe

4.lsmod

Posted Date:-2022-09-30 22:11:03


Question:
How would you find out the dependencies of RPM package?

1.#rpm -UVH

2.#rpm -ivh

3.#rpm -icv

4.#rpm -qR

Posted Date:-2022-10-01 02:07:38


Question:
Identify the true statement about configure script

1.It creates the required directories and subdirectories on the system.

2.It creates the necessary Makefiles based on the user information.

3.It depends on make to create the Makefiles.

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

Posted Date:-2022-10-01 04:16:58


Question:
If umask is 0022, what is the by default permission of a file?

1.755

2.777

3.644

4.655

Posted Date:-2022-10-01 04:17:39


Question:
If you set your /etc/inittab file to have the default init entry to be 'init:3:default:', then your system default runlevel is:

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

2.multiuser, without networking (i.e., you don't have access to network services like NFS, xinetd, and NIS)

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

4.full multiuser mode that starts up in an X session, initiating a graphical login; allows remote file sharing with other systems on your network

Posted Date:-2022-10-01 03:57:10


Question:
Larry, working as root, needs to change the ownership of the file "myfile" from "james" to "mary." He should:

1.chown mary myfile

2.chown myfile james:mary

3.chown james:mary myfile

4.changeowner mary myfile

Posted Date:-2022-10-01 03:46:41


Question:
System-wide values used by user and group creation utilities such as useradd and usergroup are kept in the file:



1./etc/user.def

2./sbin/passwd.defs

3./etc/usergrp

4./etc/login.def

Posted Date:-2022-10-01 04:36:25


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:54:33


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:54:50


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:54:50


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:54:50


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:54:50


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:54:51


Question:
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?

1.The share will be accessed with the credentials of bob without being prompted for a password.

2.All the samba shares on server1 will be displayed.

3.bob will be prompted for a password to access the share.

4.All the shares on server1 accessible to bob will be displayed.

Posted Date:-2022-10-01 04:55:26


Question:
The following entry appears in the /etc/crontab as follows: 30 4 * * 1 /bin/sh /home/Tom/rmcore 2>&1 /dev/null


1."rmcore" will execute on the first day of every month

2."rmcore" will execute every Monday at 4:30 a.m.

3."rmcore" will execute on April 30th for one hour

4.None of these

Posted Date:-2022-10-01 01:54:59


Question:
The line '0 2 * * 1-5 tar cf /home/backp /home/projects' in a crontab will:

1.back up the projects directory at 2:00 A.M. from Sunday to Thursday

2.back up the projects directory at 2:00 A.M. every weekday

3.back up the projects directory at 2:00 P.M. from Sunday to Thursday

4.back up the projects directory at 2:00 P.M. every weekday

Posted Date:-2022-10-01 05:05:45


Question:
The line '0 2 * * 1-5 tar cf /home/backp /home/projects' in a crontab will:

1.back up the projects directory at 2:00 A.M. from Sunday to Thursday

2.back up the projects directory at 2:00 A.M. every weekday

3.back up the projects directory at 2:00 P.M. from Sunday to Thursday

4.back up the projects directory at 2:00 P.M. every weekday

Posted Date:-2022-10-01 05:05:46


Question:
The user smith issued the egrep "^[[: upper:]]" words.txt command. What does this command do?

1.displays all lines in the words.txt file that begins with an uppercase letter

2.displays all lines in the words.txt file after translating uppercase letters to lowercase

3.displays all lines in the words.txt file that contains an uppercase letter

4.displays all lines in the words.txt file after translating lowercase letters to uppercase

Posted Date:-2022-10-01 04:11:56


Question:
To change the system runlevels, you use:

1. runlevel

2.setinit

3.telinit

4.initd

Posted Date:-2022-10-01 05:09:49


Question:
To change the system runlevels, you use:

1. runlevel

2.setinit

3.telinit

4.initd

Posted Date:-2022-10-01 05:10:13


Question:
To configure networking via a console GUI you can use:

1.system-config-network

2.system-config

3.network-config

4.networking config

Posted Date:-2022-09-30 22:09:55


Question:
To find the version of redhat in use you can:

1.uname -a

2.none will work

3.cat /etc/redhat-release

4.either will work

Posted Date:-2022-09-30 22:12:40


Question:
To verify what state (run level) you are currently running in, you use:

1.runlevel

2.init

3.telinit

4.chkstate

Posted Date:-2022-10-01 01:25:09


Question:
Using cat command, which option is used to print the line number?

1.cat -A filename

2.cat -n filename

3.cat count number filename

4.cat -number filename

Posted Date:-2022-10-01 01:21:30


Question:
Using cat command, which option is used to print the line number?

1.cat -A filename

2.cat -n filename

3.cat count number filename

4.cat -number filename

Posted Date:-2022-10-01 01:22:01


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

1.scp test_file:test_user@test_machine:/tmp

2.scp test_file test_machine@test_user:/tmp

3.scp -f test_file -u test_user -m test_machine -d /tmp

4.scp test_file test_user@test_machine:/tmp

Posted Date:-2022-10-01 02:01:37


Question:
What command will free the page cache?

1.echo 2 > /proc/sys/vm/drop_caches

2.echo 1 > /proc/sys/vm/drop_caches

3.echo 3 > /proc/sys/mem/drop_caches

4.echo 0 > /proc/sys/vm/drop_caches

Posted Date:-2022-10-01 04:29:33


Question:
What does the "tcpdump" command do?

1.Captures traffic on a network

2.Lists All TCP and UDP connections.

3.Lists All TCP connections.

4.Terminates all TCP connections on the target host.

Posted Date:-2022-09-30 22:23:16


Question:
what does the following command do? "watch -n 1 du -hs /tmp/file"

1.waits till the file /tmp/file gets created befor checking the size

2.It runs the command du -hs /tmp/file every second and updates the output

3.none

4.all of the above

Posted Date:-2022-09-30 22:22:03


Question:
What file is used for 'HOSTNAME' configuration?

1./etc/sysconfig/network

2. /etc/resolv.conf

3./etc/sysconfig/networking

4. /etc/hosts

Posted Date:-2022-10-01 04:43:57


Question:
What file is used for 'HOSTNAME' configuration?

1./etc/sysconfig/network

2. /etc/resolv.conf

3./etc/sysconfig/networking

4. /etc/hosts

Posted Date:-2022-10-01 04:44:48


Question:
What file is used for 'HOSTNAME' configuration?

1./etc/sysconfig/network

2. /etc/resolv.conf

3./etc/sysconfig/networking

4. /etc/hosts

Posted Date:-2022-10-01 04:44:50


Question:
What is pNFS means?

1.Parallel Network File System

2.peripheral Network File System

3.both (a) and (b)

4.None of These

Posted Date:-2022-10-01 01:47:49


Question:
What is the default maximum number of open files a user can have by default?

1.1024

2.4096

3.8192

4.unlimited

Posted Date:-2022-10-01 04:32:22


Question:
What is the purpose of the file /etc/updatedb.conf?

1. configuration file for software updates

2.configuration file for driver updates

3.configuration file for kudzu

4.configuration file for mlocate package

Posted Date:-2022-10-01 04:13:19


Question:
What is the tee command?

1.send errors to a file

2. create marks on a file

3. translate characters in a file

4.split standard output to a file

Posted Date:-2022-10-01 03:59:19


Question:
When mounting a volume listed in "fstab",

1.it suffices to give only the mount point

2.both the device and mount point must be given on the command line.

3.both (a) and (b)

4.None of these

Posted Date:-2022-10-01 04:38:06


Question:
Where do the manual (man) pages for all commands reside in the File System Hierarchy (FSH)?

1./usr/share/man

2./usr/share/info/man

3. /usr/share/locale/man

4./usr/man/share/locale

Posted Date:-2022-09-30 22:00:17


Question:
Which (free) linux distro is derived from RHEL

1.Mint

2.Ubuntu

3.Debian

4.CentOS

Posted Date:-2022-09-30 22:03:14


Question:
Which command is used to kill a process gracefully?

1. pkill -9 <PID>

2.kill -9 <PID>

3.kill -g <PID>

4.kill -15 <PID>

Posted Date:-2022-10-01 04:26:10


Question:
Which is not a valid priority in syslogd.conf?

1.notice

2.news

3.debug

4.alert

Posted Date:-2022-09-30 22:07:37


Question:
Which kernel parameter is used to reset root password in RHEL7

1.both 1 & single

2.rd.break

3.single

4.1

Posted Date:-2022-10-01 05:06:36


Question:
Which mode provides load balancing and fault tolerance in ethernet bonding ?



1.Round Robin

2.802.3ad

3.balance-tlb

4.balance-alb

Posted Date:-2022-10-01 04:05:48


Question:
Which of the following are valid iptable chains?

1.Through, In,

2.Forward, Input, Output

3.both (a) and (b)

4.None of These

Posted Date:-2022-10-01 04:23:40


Question:
Which of the following are valid iptable chains?

1.Through, In,

2.Forward, Input, Output

3.both (a) and (b)

4.None of These

Posted Date:-2022-10-01 04:23:42


Question:
Which of the following options is true of the entry below? /dev/cdrom /cd iso9660 ro,user,noauto 0 0

1.This is an "fstab" entry which lets any user mount the CD-ROM.

2.This is an "fstab" entry which mounts a CD-ROM as a read-only device at boot time.

3.This is an "mtab" entry which mounts a CD-ROM as a read-only device at boot time.

4.None of These

Posted Date:-2022-10-01 04:27:26


Question:
Which service lets you edit qcow2 images in Linux ?

1. guestfish

2.none of them

3.virt-manager

4.both virsh & virt-manager

Posted Date:-2022-10-01 04:56:09


Question:
Which Standard does pNFS Stands for..

1.NFS 4

2.NFS 3

3.NFS 4.1

4.None of these

Posted Date:-2022-10-01 03:55:50


Question:
Which statement is true about the files and directories created inside the /project directory that have 2777 permissions?

1.All files and directories will have the default group set to the primary group of the user who creates them in /project directory.

2.All executables inside the /project directory will run with the effective group ID (EGID) of the group of the /project directory.

3.All files inside the /project directory will have permissions set to 2644 and the subdirectories will have them set to 2755.

4.All files and directories will have the same group as that of the /project directory.

Posted Date:-2022-10-01 04:53:02


Question:
Which statements are true about a source RPM?

1.Source RPM does not contain information about how to install the software.

2.Source RPMs can be compiled and installed directly.

3.Source RPM cannot be used to build a binary rpm.

4.None of These

Posted Date:-2022-09-30 22:15:42


Question:
xhost +' is a security problem because:

1.this command does not pose any security risks

2.any user with access to the system could connect to your X display

3.any user on remote machines could open a remote connection to your system with rsh or ssh

4.any host on the network could assume your IP system address

Posted Date:-2022-10-01 04:03:19


Question:
You configure an OpenSSH server in the file:



1./etc/ssh/sshd_config

2./etc/sshd/sshd.config

3./etc/sshd_config

4./etc/ssh/sshd.conf

Posted Date:-2022-10-01 04:05:13


Question:
You use samba to:

1.share resources (like printers) between a Windows and Linux machines

2.mount Windows filesystems on Linux machines

3.none are correct

4.both are correct

Posted Date:-2022-10-01 01:46:05


Question:
You use the SUSPEND character to suspend an already running process. Which signal does it send to the process?

1. SIGINT

2.SIGHUP

3.SIGSTOP

4.SIGTERM

Posted Date:-2022-10-01 04:33:47


More MCQS

  1. Red Hat Linux Mcq
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!