Linux Questions in preparation for a Certification Exam
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Linux Questions in preparation for a Certification Exam
Hi Gurus,
I was about to do Linux certification(RHEL) and finding it difficult. So giving some practice tests and in my practice tests also not finding the answers, Could you please help me with answers for the below :
Question 1)
Scenario
You need to set up a client which connects to a development database instead of the production database. You need to configure the client like the client in production and connect to the development database by host name.
Question Based on the scenario above, how do you connect the client to the development database instead of the production database without having to modify the application configuration?
Choice 1
Create a second A record in DNS for the database server host name, and enter the development client IP address.
Choice 2
Create an entry in the routing table to permit only requests to the desired IP address.
*Choice 3
Add an entry to the /etc/hosts file on the client to point to the development database server, and add hosts: files to /etc/nsswitch.conf.
Choice 4
Add an entry to /etc/resolv.conf to point to the development database server.
Choice 5
Add an entry in the /etc/sysconfig/network file to point the development database server host name to the desired IP address.
Question 2)
How do you permit all users to create cron jobs?
Choice 1
Add "account required pam_stack.so service=system-auth" to /etc/pam.d/crond.
Choice 2
Create an empty /etc/cron.allow file.
Choice 3
Add "allusers" to CRONDARGS in /etc/sysconfig/crond.
Choice 4
Run "chmod 755 /usr/bin/crontab" as root.
Choice 5
Question 3)
Which command do you use to obtain the UUID for a partition?
Choice 1
id
Choice 2
uuid
Choice 3
fdisk -l
Choice 4
vol_id -t
Choice 5
blkid -o list
Question 4)
Scenario
You need to copy a directory tree from a remote system. All the file systems on the remote system are read-only, and the remote system accepts SSH connections only.
Question Based on the scenario above, which command do you use to copy the files?
Question 5)
Which command do you use to determine the secondary groups containing user bob.smith?
Choice 1
getent passwd bob.smith
Choice 2
gid bob.smith
Choice 3
showgroup bob.smith
Choice 4
groups bob.smith
Choice 5
grep bob.smith /etc/passwd
Question 6)
Users are complaining of poor system performance. Upon investigating, you determine an application indexing process called 123index is consuming enough CPU cycles to affect other services on the machine. You cannot abort the indexing process without corrupting data, so you decide to change the priority at which the indexing process can consume CPU cycles. The PID of 123index is 5645.
Question Based on the scenario above, how do you limit the 123index process from consuming too many CPU cycles and affecting other users?
Choice 1
echo 10 > /proc/5645/sched
Choice 2
renice 10 -p 5645
Choice 3
HUP -n 10 -p 5645
Choice 4
nice 5645
Choice 5
kill -HUP 5645 --respawn --nice 10
Question 7)
#!/bin/sh thetime=$(date) tar czf ~/myarchive.tar.gz ~/files/* echo $thetime
Question What is the result when the sample code above is executed?
Choice 1
The script exits with no output displayed.
Choice 2
The date and time before the tar command ran is displayed.
Choice 3
The script returns to the prompt and displays exit 0.
Choice 4
The output of the FIFO tar file is displayed.
Choice 5
The contents of the myarchive.tar.gz file is displayed.
Question8)
Which command do you use to tunnel X traffic over SSH?
Choice 1
ssh -R 6001:remotehost:6001 remotehost
Choice 2
ssh remotehost startx -X
Choice 3
ssh -X remotehost
Choice 4
ssh -x remotehost
Choice 5
ssh -L 6001:remotehost:6001 remotehost
Question9)
Which command do you use to update a new RHEL 7 server?
Choice 1
apt-get dist-upgrade
Choice 2
yum dist-upgrade
Choice 3
yum update
Choice 4
update-all
Choice 5
rpm --update
Question10)
Which command do you use to display the network interfaces on a server with multiple network cards?
Choice 1
ip --list
Choice 2
ip link
Choice 3
ipconfig /a
Choice 4
route -n
Choice 5
nstat
Question11)
Which command do you use to view the running processes on a system and what state they are in, ordered by how much of the CPU they each use?
Choice 1
free -m
Choice 2
cpu
Choice 3
top
Choice 4
ps aux
Choice 5
ps -a
Question12)
In /etc/exports, which client specifier uses NIS?
Choice 1
IP address
Choice 2
CIDR
Choice 3
hostname
Choice 4
DNS name with wildcard
Choice 5
netgroup
Question 13)
$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
Question Based on the terminal output above, how do you add the directory /usr/local/sbin to the user's $PATH?
Choice 1
Add a line with PATH=/usr/local/sbin before export PATH.
Choice 2
Add a line with SEARCH=/usr/local/sbin before the first line with PATH.
Choice 3
Change PATH=$PATH:$HOME/bin to PATH=$PATH:$HOME/bin:/usr/local/sbin.
Choice 4
Change PATH=$PATH:$HOME/bin to PATH=$PATH:$HOME/bin:/usr:/local:/sbin.
Choice 5
Change PATH=$PATH:$HOME/bin to PATH=$PATH:$HOME/bin:/usr/local.
Question14)
In which base directory are man pages located?
Choice 1
/usr/man
Choice 2
/usr/share/man_pages
Choice 3
/usr/share/doc
Choice 4
/usr/share/man
Choice 5
/etc/man
Question 15)
Terminal Output
$ cat logrotate.conf /tmp/pacct { size 10k create 700 user user rotate 3 }
Question Based on the terminal output above, the pacct file is rotated when:
Choice 1
3 days have elapsed.
Choice 2
the logrotate service runs.
Choice 3
it reaches 10 KiB in size.
Choice 4
it reaches 11 KiB in size.
Choice 5
it reaches 700 KiB in size.
Question 16)
When configuring a new server, you need to limit the number of connections to 25 for any services controlled by xinetd.
Question Based on the scenario above, which entry do you add to the /etc/xinetd.conf file?
Choice 1
iptables --hitcount 25 -j DROP
Choice 2
cps = 25 30
Choice 3
log_on_success = 25
Choice 4
log_on_failure > 25
Choice 5
instances = 25
Question 17)
Terminal Output
# crontab -l 1 3 * * 6 /usr/local/sbin/specialbackup
Question Based on the terminal output above, when does the
script /usr/local/sbin/specialbackup execute?
Choice 1
On the sixth day of each month at 3:01 A.M.
Choice 2
On Saturday at 1:03 A.M.
Choice 3
Every Sunday at 3:01 A.M.
Choice 4
On the sixth month at 1:03 A.M.
Choice 5
Every Saturday at 3:01 A.M.
Question 18)
To find information on a specific system call, you run the man command and receive the following error:
bash: man: command not found
Question Based on the scenario above, which package do you install to obtain the base man utility and documents?
Choice 1
man-db
Choice 2
base
Choice 3
man-base
Choice 4
man-pages-base
Choice 5
manpages
Question 19)
Scenario
You need to set your RHEL 7 server to start multi-user mode, but you do not want to start Xwindows by default.
Question Based on the scenario above, which command do you use to accomplish this task?
Choice 1
run systemctl set-default multi-user.target
Choice 2
run systemctl isolate graphical.target
Choice 3
run ln -sf /usr/lib/systemd/system/multi-user.service /etc/systemd/system/default.wants/.
Choice 4
edit /etc/sysconfig/desktop and set 'DESKTOP="NONE"'
Choice 5
touch /etc/noxwindows
Question20)
Which tools are required for you to make and use a swap file?
Choice 1
cp, mkfifo, swapon
Choice 2
cpio, mkfs, mount
Choice 3
tar, mktemp, fdisk
Choice 4
touch, mknod, mount
Choice 5
dd, mkswap, swapon
Question 21)
Scenario
On a server you manage, you need to run a script which reindexes a large table of keys. Your shift ends at 4:00 P.M., but you must schedule the task to run just once and run no earlier than 6:30 P.M. today.
Question Based on the scenario above, which commands do you run to execute the script "reindex_keys"?
Choice 4
anacron run /root/reindex_keys @ 18:30
/etc/init.d/anacron reload
Choice 5
schedule 18:30 /root/reindex_keys
schedule set
Question 22)
Terminal Output
$ ls -l /dev/null crw-rw-rw- 1 root root 1, 13 Apr 2 09:20 /dev/null
Question Based on the terminal output above, /dev/null is a:
Choice 1
directory.
Choice 2
named pipe.
Choice 3
socket.
Choice 4
world-writable file.
Choice 5
character device.
Question 23)
Scenario
A developer advises you that library calls to glib2 are failing. You review the change control log for the server and discover updates were performed that are not related to glib2.
Question Based on the scenario above, which log do you review to determine if the glib2 package was updated in error?
Choice 1
/var/log/audit
Choice 2
/var/log/wtmp
Choice 3
/var/log/rpm.log
Choice 4
/etc/yum/cache
Choice 5
/var/log/yum.log
Question24)
When configuring anacrontab, which unit do you use for the delay field?
Choice 1
Seconds
Choice 2
Minutes
Choice 3
Hours
Choice 4
Days
Choice 5
Weeks
Question 25)
During startup, which process does RHEL 7 start first?
Choice 1
swapd
Choice 2
inet
Choice 3
systemd
Choice 4
auditd
Choice 5
ntpd
Question26)
Which command shows the switches available for the dd command?
Choice 1
manpages dd
Choice 2
helpfile dd
Choice 3
man dd
Choice 4
dd --docs
Choice 5
more /usr/share/doc/dd/README
Question27)
Which crontab entry do you use to run a scheduled job every 6 minutes?
Question28)
Which command do you use to examine a binary file to determine which library files should be added to a chroot environment?
Choice 1
ld
Choice 2
file
Choice 3
ldd
Choice 4
hexdump
Choice 5
yum
Question29)
Which logrotate configuration directive do you use to permit rotation of a log whose writer must keep the file open?
Choice 1
sharedscripts
Choice 2
compress
Choice 3
closewriter
Choice 4
notifempty
Choice 5
copytruncate
Question 30)
$ ps -aux | grep ssh root 3710 0.0 0.0 49848 136 ? Ss 20:39 0:00 /usr/sbin/sshd
Question The "S" in the terminal output above signifies the /usr/sbin/sshd process is:
Choice 1
in an interruptible sleep state.
Choice 2
a dead process.
Choice 3
a defunct process.
Choice 4
stopped by a control signal.
Choice 5
in high priority mode.
Question 31)
Terminal Output
# grep '^services' /etc/nsswitch.conf services: files
Question Based on the terminal output above, where does xinetd resolve a port number when none is specified in a configuration entry?
Choice 1
/etc/services
Choice 2
/etc/hosts
Choice 3
/etc/protocols
Choice 4
/etc/networks
Choice 5
/etc/resolv.conf
Question 32)
Terminal Output
$ ./testfiles Too many open files
Question Why do you receive the error message above?
Choice 1
The file system is out of inodes.
Choice 2
The process reached the limit on open file descriptors.
Choice 3
The current working directory has too many files.
Choice 4
The system process table is full.
Choice 5
The temporary directory has too many files.
Question 33)
Terminal Output
$ echo foo >&3 bash: 3: Bad file descriptor
Question What does the error message above indicate?
Choice 1
The process reached the limit on open file descriptors.
Choice 2
The file system is full.
Choice 3
The current working directory has too many files.
Choice 4
The user has insufficient privileges to create the file "3".
Choice 5
The process has no open file descriptor numbered 3.
Question 34)
Terminal Output
$ ls -l /usr/tmp lrwxrwxrwx 1 root root 13 Mar 27 15:18 /usr/tmp -> ../var/tmp
Question Based on the terminal output above, /usr/tmp is a:
Choice 1
directory.
Choice 2
temporary link
Choice 3
world-writable file.
Choice 4
symbolic link.
Choice 5
hard link.
Question 35)
Scenario
You have two Ethernet cards with addresses on separate subnets for each card. Traffic is not routing between the cards even though the cards are configured correctly.
Question Based on the scenario above, which command do you use to temporarily enable routing between the cards?
Question 37)
Scenario
While working on an RHEL workstation, you need to connect to an NFS export from a server named hugo which only has a single export to /mnt/tip. You do not remember the name of the export, and the administrator for that server is not in the office.
Question Based on the scenario above, which commands do you use to determine the name of the export and mount it?
Choice 1
nmap hugo
mount hugo:mount /mnt/tip
Choice 2
showmount -e hugo
mount -t nfs hugo:export /mnt/tip
Choice 3
showmount -v hugo
mount hugo:export /mnt/tip
Choice 4
nfs --show-exports hugo
mount hugo:export /mnt/tip
Choice 5
fdisk -l
mount hugo:* /mnt/tip
Question 38)
Scenario
You create a script called "off_site_backup" in /usr/local/sbin to back up some data to an offsite server. The script must run daily to ensure you have a backup of the company data offsite.
Question Based on the scenario above, which command do you use to run the script?
I am amazed that you are even asking us to answer those practice questions for you.
What good will it do if we give you the 38 correct answers?
Where is YOUR input?
What will have YOU learned from the exercise?
I suggest that you follow Ztcoracat's recommendations and start putting in some serious effort yourself, otherwise you have no chance of obtaining RHEL certification in the future.
Just to get you started here is the answer to Question 3:
Truly amazing. Folks asking us to do their homework is bad but asking to take their tests is beyond common sense.
Answer this, what good is your certification if YOU don't earn it? If someone gives you a job and you can't do the work - what do you think happens next?
Common guys, I am not asking for explanations, if you can then do it, else leave it...
I am an EA, what the heck will I do with a Linux certification.. It is just passion for technology
Common guys, I am not asking for explanations, if you can then do it, else leave it...
I am an EA, what the heck will I do with a Linux certification.. It is just passion for technology
The approach here is wrong. You need to understand the question and answers. Sounds like your trying to dump your way to the cert.
If you're going for RHCE and can't answer the question (Question 3) how to get a UUID for partitions, then your not ready.
I am not asking for explanations, if you can then do it, else leave it...
I am an EA, what the heck will I do with a Linux certification.. It is just passion for technology
What exactly ARE you asking for then?
What is your primary motivation for visiting this LQ forum and asking for the answers to these 38 questions?
Your comments have left me, for one, simply bewildered.
Exactly so. The point of any set of questions – or of "certifications" in general – is that these are supposed to be things that you need to be able to know, and the "boots on the ground questions" that you need to be able to answer. It does absolutely nothing for you to ask someone else to answer thirty-eight(!) questions for you.
... and it speaks volumes, not in a way that is favorable to you, that you should try.
If your employer is paying for you to take a certification, "good for them." But they are doing it so that you gain knowledge. The fact that you are then able to correctly answer most questions like these is merely evidence that you (might) have done so. It, like the piece of sheepskin itself, is merely secondary. If you "co-opt" the process of actually learning, you're only cheating them ... and, yourself. You're wasting your own time.
Is it the case that you want the answers but you don't want to know how to come up with the answers, or do I misunderstand?
Quote:
Originally Posted by Dave009
...I am an EA, what the heck will I do with a Linux certification...
What's an EA? A certificate is simply someone recognised as an authority giving their word that the holder of the certificate has achieved some level of understanding.
How long have you been using GNU/Linux? Maybe you need more experience before trying for certification?
and so on... It's so simple, read the question and answer, no use giving useless lectures.. We are all Technical Guys with less or more competency from one another in a specific field. Hope this helps.. If I am wrong somewhere, correct me but request you not to scribble which is of no use to anyone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.