Do you know that? Among individuals with traditional jobs, 80% would be interested in doing additional, outside work apart from their primary jobs next

Contact Email:

<< All Upwork (oDesk) and Elance Tests << Elance test answers << IT & Programming category

Test answers for Red Hat Linux 2020

(102) Last updated: February 12
Elance • IT & Programming
Questions and answers are regularly updated. Answered and not answered tests questions.

This helps getting job: Hundreds of (cover letter examples , interview questions , profile samples ) • Earn on Upwork (oDesk)
Job assistance: jobs popularityfreelance rates

Popular test answers: HTML, .Net, CSS, English, SEO, Photoshop, iOS, Java, Android, Ruby, Python, JavaScript

See all 6 tests answers updated

Find Upwork (oDesk) and Elance test answers on this website:

Collapse | Expand

102 Answered Test Questions:

1. If you are logged in to a regular user account, and it is necessary for you to log in as root and become a superuser, you use:


• chpriv

• passwd

• su

• chown

2. What is pNFS means?


• peripheral Network File System

• Parallel Network File System

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


• init

• runlevel

• chkstate

• telinit

4. 'xhost +' is a security problem because:


• 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

• this command does not pose any security risks

• any host on the network could assume your IP system address

5. A normal user sends a print job to the default printer but later finds the print queue is big and decides to cancel the job. What would the user do to perform this task?


• The user can know the job number but cannot remove the job as he has no permission to use the Iprm command.

• The user has to list the job using Ipq and remove it using the command Iprm with the job number as the argument.

• The user has no permission to view job numbers using the jobs command and hence cannot delete the job.

• The user has no permission to view job numbers using the Ipq command and hence cannot delete the job.

6. Using cat command, which option is used to print the line number?


• cat -A filename

• cat -l filename

• cat count number filename

• cat -n filename

• cat -number filename

7. How would you create a disk dump in RedHat Linux?


• dd if=/dev/sda of=/dev/sdb

• mk4ext /dev/sda /dev/sdb

• fsck2 /dev/sda /dev/sdb

• dump /dev/sda ssh@localhost:/dev/hda

• restore /dev/sda /dev/sdb

8. How to show currently loaded kernel modules?


• lsmod

• modshow

• kernshow

• modprobe

• lsmodules

9. Route:


• modifies entries in the routing tables of dnsd

• modifies entries in the routing tables of routed

• modifies entries in the routing tables of rpcd

• modifies entries in the routing tables of nfsd

10. The runlevel that halts the system is:


• 1

• 6

• h

• 0

11. If you use multiple crontab files, the directory containing them is:


• /etc/cron

• /etc/rc.d/cron

• /etc/cron.monthly

• /etc/cron.d

12. If you are in runlevel 5, and you want to change to runlevel 3, you issue the command:


• chkconfig 3

• init 3

• runlevel 3

• who -r 3

13. The default RHEL window manager is...?





• Gnome

14. What is the most correct way to edit the current users crontab?


• vi /etc/cron.d/0hourly

• vi /etc/crontab.conf

• crontab -l

• crontab -e

15. To count words or lines in a file, you use the command:


• count

• tr

• cc

• wc

16. The default highest runlevel is:


• 6

• 2

• 4

• 12

17. Which (free) linux distro is derived from RHEL


• Mint

• Ubuntu

• CentOS

• Debian

18. To select the level of firewall protection, you make changes in:


• /etd/sysconfig/firewall

• /etc/ysconfig/services

• /etc/sysconfig/iptables

• /etc/sysconfig/authconfig

19. What is the default FTP port number?


• 43

• 37

• 21

• 22

• 53

20. User-encrypted passwords are stored in the file:


• /etc/masterpwd

• /home/passwd

• /etc/profile

• /etc/encpasswd

• /etc/shadow

21. Route accepts the following switches (options):


• (i.e., no option is specified)

• add

• del

• all are correct

22. To change the password for the root account, you use:


• the su command

• the redhat-config tool

• the passwd command

• the priv command

23. How would you display all logical volumes?


• display all logical vol

• show all logical vol

• lvdisplay

• display-logic-vol

• volume display all

24. If you need to disable the ssh service at next boot, you use:


• chkconfig sshd noboot

• chkconfig sshd ignore

• chkconfig sshd off

• chkconfig sshd on

25. To edit your crontab file, you use:


• crontab -i

• vicron

• crontab -e

• viedit

26. To list the most CPU-intensive processes on your system, you can use command:


• iostat

• free

• par

• top

27. The main configuration file that GRUB reads when it is loaded, is:


• /usr/bin/

• /boot/grub/grub.conf

• /etc/boot.conf

• /etc/boot

28. The pwd command will:


• display the decrypted user password (only the user and root can execute this command)

• display the full path of the current working directory

• display the name of the current or permanent default printer

• display the encrypted user's password

29. What is the standard directory for temporary mount points or mounts for removable media(e.g. CD-ROM)


• /mnt

• /mount

• /temp

• /

• /dev

30. During boot init program checks default runlevel from the __________ file.


• /etc/initconf

• /etc/inittab

• /proc/initconf

• /proc/inittab

31. To copy the system log to the current directory, you do:


• copy /var/log/messages

• copy /var/log/messages .

• cp /var/log/messages .

• cp /var/log/messages

32. To open a remote ssh shell with the account test_account on the host test_host, you use the command:


• ssh test_account@test_host

• ssh test_account test_host

• sshd -l test_account test_host

• sshd test_account@test_host

33. System logs for tasks performed on your system are maintained in the directory:


• /etc/syslog

• /etc/syslog.conf

• /var/log

• /usr/sbin/syslog

34. Which is not a valid priority in syslogd.conf?


• news

• debug

• notice

• alert

35. What command generates a DSA ssh key?


• ssh-key --type DSA

• gen-sshkey -t DSA

• ssh-keygen -t dsa

• ssh-genkey -t dsa

36. Which statements are true about a source RPM?


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

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

• Source RPMs can be compiled and installed directly.

37. "shutdown -r now" will:


• Requests that the system be rebooted after it has been brought down in a safe way

• Only send out the warning messages and disable logins, do not actually bring the system down

• Requests that the system be powered off after it has been brought down in a safe way

• Requests that the system be halted after it has been brought down

38. To configure networking via a console GUI you can use:


• networking config

• network-config

• system-config

• system-config-network

39. To find the version of redhat in use you can:


• either will work

• uname -a

• none will work

• cat /etc/redhat-release

40. How would you check the RedHat OS version?


• cat /etc/redhat-version

• cat /etc/version

• cat /etc/kernel-version

• uname -a

• cat /etc/redhat-release

41. What is the default port for squid:


• 5555

• 4444

• 3128

• 5656

• 4646

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

• none of the above

• all of the above

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

43. Runlevel 6 is the:


• state when the system is a fully operational Linux system, with multiuser support and remote file sharing access

• single-user state, which allows access only to the superuser, and does not run any network services

• power-down state and is invoked by the halt command to shut down the system

• reboot state - it shuts down the system and reboots

44. The following filesystem uses journaling:


• ext2

• all are correct

• ext3

• vfat

45. what will the following command do?  "rpm -ql nagios"


• Install the package nagios.

• Verify the package nagios.

• Provide additional info on package nagios.

• list files in package nagios.

46. What does the "tcpdump" command do?


• Lists All TCP connections.

• Terminates all TCP connections on the target host.

• Captures traffic on a network

• Lists All TCP and UDP connections.

47. What is the tee command?


• send errors to a file

• translate characters in a file

• create marks on a file

• split standard output to a file

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


• /usr/share/man

• /usr/share/info/man

• /usr/man/share/locale

• /usr/share/locale/man

49. /proc:


• All are correct

• Can be used for obtaining information about processes and devices

• Some of the files within /proc/ can be manipulated by users and applications to communicate configuration changes to the kernel

• Is a pseudo-file system

50. When creating a new user account, unless otherwise specified, the files from the __________ are automatically copied to the home directory.


• /etc/default

• /etc/user start

• /etc/skel

• /usr/skel

51. 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 -f test_file -u test_user -m test_machine -d /tmp

• scp test_file test_user@test_machine:/tmp

• scp test_file test_machine@test_user:/tmp

• scp test_file:test_user@test_machine:/tmp

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

53. How would you find out the dependencies of RPM package?


• #rpm -ivh

• #rpm -nogpg

• #rpm -UVH

• #rpm -qR

• #rpm -icv

54. When you first add a user to the system, you must provide the user with a bare-bones version of their login, shell, and logout initialization files. The default initialization files are kept in:


• /etc/gshadow

• /etc/shells

• /etc/skel

• /usr/sbin/passwd

55. From Which Version of RHEL was the pNFS introduced ?


• RHEL 6.4

• RHEL 6

56. How would you find out the date and time of rpm installation?


• # rpm -ivh

• # rpm -la

• # rpm -all

• # rpm -qi

• # rpm -Uvh

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


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

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

• 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

• 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

58. 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 every Monday at 4:30 a.m.

• "rmcore" will execute on the first day of every month

• "rmcore" will execute on April 30th for one hour

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


• chown james:mary myfile

• chown myfile james:mary

• changeowner mary myfile

• chown mary myfile

60. which command is used to see aging of password?


• chgrp

• passwd

• chmod

• chage

• chown

61. How to find out memory usage:


• vmstat

• top

• free -m

• All are correct

• cat /proc/meminfo

62. After extending LVM logical volume that has file system what should be done to extend file system?


• resize2fs /dev/lvm_volume

• lventend -L /dev/lvm_volume

• lvextend /dev/lvm_volume

• mk4ext /dev/lvm_volume

• extend /dev/lvm_volume

63. To power down the system, you use:


• shutdown -h now

• telinit 0

• shutdown -h +1

• all are correct

64. Which Standard does pNFS Stands for..


• NFS 4.1

• NFS 3

• NFS 4

65. For partitioning disks, you use:


• both are correct

• parted

• none are correct

• fdisk

66. Files located at "/etc/rc.d/rc<x>.d/" directories(where <x> is the number of the runlevel) are:


• symbolic links

• sockets

• hard links

• scripts

67. To check the list of shells installed on the system, you look in:


• /etc/shell

• /etc/profile

• /etc/shells

• /etc/conf

• /etc/services

68. The __________ program can add password for a group. It is used to administer /etc/group, and /etc/gshadow.


• chgrpwd

• chgrp

• passwdgr

• grpasswd

• gpasswd

69. To disable SSH root login you should:


• Set "PermitRootLogin no" in /etc/ssh/sshd_config

• Set "PermitRootLogin=No" in /etc/ssh/sshd.conf

• Set "PermitRootLogin no" in /etc/ssh/sshd.conf

• Set "AllowRootLogin=No" in /etc/ssh/sshd_config

70. To display IP routing table you can use:


• ip route list

• All variants are correct

• ip route show

• route

• netstat -r

71. You configure an OpenSSH server in the file:


• /etc/ssh/sshd.conf

• /etc/ssh/sshd_config

• /etc/sshd_config

• /etc/sshd/sshd.config

72. What is the permission of /etc/shadow?


• 665

• 640

• 660

• 400

• 644

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


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

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

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

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

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


• configuration file for kudzu

• configuration file for driver updates

• configuration file for software updates

• configuration file for mlocate package

75. Identify the true statement about configure script.


• 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 system.

76. If umask is 0022, what is the by default permission of a file?


• 744

• 755

• 644

• 655

• 777

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

78. How to list users that are logged on?


• who

• All answers

• users

• w

79. The command to check your current runlevel is:


• both are correct

• who -r

• runlevel

• none are correct

80. If you want to set a samba share as read/write, you set it with the following in /etc/samba/smb.conf:


• rw = yes

• readwrite = yes

• read = yes ; write = yes

• writeable = yes

81. What is the default I/O scheduler elevator?


• as

• deadline

• noop

• cfq

82. Which command is used to kill a process gracefully?


• kill -9 <PID>

• kill -g <PID>

• pkill -9 <PID>

• pkill -G graceful <PID>

• kill -15 <PID>

83. Which of the following are valid iptable chains?


• Through, In, Out

• Forward, Input, Output

• Accept, Drop, Reject

• All of the above

• None of the above

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


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

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

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

85. Scripts within a cron directory are run:


• in no particular order

• in alphabetical order

• by size

• according to creation date

86. In a file delimited by commas, what command will print the 3rd column of data:


• awk -f, '{print $2}'

• awk '{print $3}'

• awk -F, '{print $3}'

• awk -f, '{print $3}'

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






88. What command will free the page cache?


• echo 2 > /proc/sys/vm/drop_caches

• echo 1 > /proc/sys/vm/drop_caches

• echo 0 > /proc/sys/vm/drop_caches

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

89. When mounting a volume listed in "fstab",


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

• it suffices to give only the mount point

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

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

91. How to find out what packages are currently installed?


• yum list --installed

• yum list installed

• rpm -a

• rpm -q

• yum info --installed

92. If your /etc/inittab file becomes corrupted,  to start up your system, bypassing the inittab file,  so you could edit the file to fix it; you can reboot and  enter the following command at the boot prompt:


• linux single

• linux -s

• init -s

• linux -S

93. What file is used for 'HOSTNAME' configuration?


• /etc/hosts

• /etc/sysconfig/networking

• /etc/sysconfig/network

• /etc/resolv.conf

• /etc/hostname

94. What is the default maximum number of open files a user can have by default?


• 4096

• 1024

• 2048

• unlimited

• 8192

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


• /sbin/passwd.defs

• /etc/user.def

• /etc/usergrp

• /etc/login.defs

96. 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?


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

• All the samba shares on server1 will be displayed.

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

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

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


• back up the projects directory at 2:00 P.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. every weekday

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

98. If you use 'shutdown now', it will:


• transfer your system into maintenance mode

• print a warning to all active terminals and then halt the system

• shut down the system

• reboot the system

99. To change the system runlevels, you use:


• initd

• runlevel

• telinit

• setinit

100. How to kill user session?


• pskill username

• kill username

• kill -9 -u username

• pkill -9 -u username

101. What file will show you with what options kernel was started?


• /proc/cmdline

• /boot/kern_start

• /proc/start

• /var/log/messages

102. To have 'grep' match only whole lines, you use:


• grep -L

• grep -E

• grep -l

• grep -x