Red Hat Red Hat Certifications EX200 Questions & Answers
Question 121:
Part 1 (on Node1 Server)
Task 6 [Accessing Linux File Systems]
Find all lines in the file /usr/share/mime/packages/freedesktop.org.xml that contain the string ich.
Put a copy of these lines in the original order in the file /root/lines.
/root/lines should contain no empty lines and all lines must be exact copies of the original lines in
/usr/share/mime/packages/freedesktop.org.xml
Correct Answer: Check the anser in explanation.
*
[root@node1 ~]# cat /usr/share/mime/packages/freedesktop.org.xml | grep ich > /root/lines
[root@node1 ~]# cat /root/lines
Ficheru codificáu en BinHex de Machintosh
fichier codé Macintosh BinHex
ficheiro de Macintosh codificado con BinHex
fichièr encodat Macintosh BinHex
ficheiro codificado em BinHex de Macintosh
fichier boîte aux lettres
Question 122:
Part 2 (on Node2 Server)
Task 8 [Tuning System Performance]
Set your server to use the recommended tuned profile
Correct Answer: Check the anser in explanation.
[root@node2 ~]# tuned-adm list [root@node2 ~]# tuned-adm active Current active profile: virtual-guest [root@node2 ~]# tuned-adm recommend virtual-guest [root@node2 ~]# tuned-adm profile virtual-guest [root@node2 ~]# tuned-adm active Current active profile: virtual-guest [root@node2 ~]# reboot [root@node2 ~]# tuned-adm active Current active profile: virtual-guest
Question 123:
Part 2 (on Node2 Server)
Task 2 [Installing and Updating Software Packages]
Configure your system to use this location as a default repository:
[root@node1 ~]# vim /etc/yum.repos.d/redhat.repo [BaseOS] name=BaseOS baseurl=http://utility.domain15.example.com/BaseOS enabled=1 gpgcheck=1 gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release [AppStream] name=AppStream baseurl=http://utility.domain15.example.com/AppStream enabled=1 gpgcheck=1 gpgkey=http://utility.domain15.example.com/RPM-GPG-KEY-redhat-release [root@node1 ~]# yum clean all [root@node1 ~]# yum repolist repo id repo name AppStream AppStream BaseOS BaseOS [root@node1 ~]# yum list all
Question 124:
Part 1 (on Node1 Server)
Task 15 [Running Containers]
Create a container named logserver with the image rhel8/rsyslog found from the registry registry.domain15.example.com:5000
The container should run as the root less user shangrila. use redhat as password [sudo user]
Configure the container with systemd services as the shangrila user using the service name, "container-logserver" so that it can be persistent across reboot.
Use admin as the username and admin123 as the credentials for the image registry.
* [shangrila@node1 user]$ podman generate systemd --name logserver --files --new /home/shangrila/.config/systemd/user/container-logserver.service [shangrila@node1 ~]$ systemctl --user daemon-reload [shangrila@node1 user]$ systemctl --user enable --now container-logserver.service [shangrila@node1 ~]$ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7d9f7a8a4d63 registry.domain15.example.com:5000/rhel8/rsyslog:latest /bin/rsyslog.sh 2 seconds ago logserver [shangrila@node1 ~]$ sudo reboot [shangrila@node1 ~]$ cd .config/systemd/user [shangrila@node1 user]$ systemctl --user status
Question 125:
Part 2 (on Node2 Server)
Task 5 [Managing Logical Volumes]
Add an additional swap partition of 656 MiB to your system. The swap partition should automatically mount when your system boots Do not remove or otherwise alter any existing swap partition on your system
Correct Answer: Check the anser in explanation.
* [root@node2 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vdc 252:32 0 5G 0 disk vdc1 252:33 0 4.1G 0 part datavg-datalv 253:3 0 3.9G 0 lvm /data vdd 252:48 0 5G 0 disk vde 252:64 0 10G 0 disk [root@node2 ~]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 2097148 1548 -2 [root@node2 ~]# free -m total used free shared buff/cache available Mem: 1816 1078 104 13 633 573 Swap: 2047 1 2046 [root@node2 ~]# parted /dev/vdc print Number Start End Size Type File system Flags 1 1049kB 4404MB 4403MB primary lvm
* [root@node2 ~]# parted /dev/vdc mkpart primary linux-swap 4404MiB 5060MiB [root@node2 ~]# mkswap /dev/vdc2 Setting up swapspace version 1, size = 656 MiB (687861760 bytes) no label, UUID=9faf818f-f070-4416-82b2-21a41988a9a7 [root@node2 ~]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 2097148 1804 -2 [root@node2 ~]# swapon /dev/vdc2
Create collaborative directory /mnt/shares with the following characteristics:
Group ownership of /mnt/shares should be sharegrp.
The directory should be readable, writable and accessible to member of sharegrp but not to any other user. (It is understood that root has access to all files and directories on the system)
Files created in /mnt/shares automatically have group ownership set to the sharegrp group.
Correct Answer: Check the anser in explanation.
* [root@node1 ~]# mkdir -p /mnt/shares [root@node1 ~]# ls -lrt /mnt/ [root@node1 ~]# chgrp sharegrp /mnt/shares/ [root@node1 ~]# chmod 2770 /mnt/shares/ [root@node1 ~]# ls -lrt /mnt/ ### For Checking ### [root@node1 ~]# su - harry [harry@node1 ~]$ cd /mnt/shares/ [harry@node1 shares]$ touch harry [harry@node1 shares]$ logout [root@node1 ~]# su - natasha [natasha@node1 ~]$ cd /mnt/shares/ [natasha@node1 shares]$ touch natasha [natasha@node1 shares]$ ls -lrt -rw-rw-r--. 1 harry sharegrp 0 Mar 21 06:03 harry -rw-rw-r--. 1 natasha sharegrp 0 Mar 21 06:03 natasha
Question 127:
Part 1 (on Node1 Server)
Task 8 [Managing Local Users and Groups]
Create a user fred with a user ID 3945. Give the password as iamredhatman
Correct Answer: Check the anser in explanation.
* [root@node1 ~]# useradd -u 3945 fred [root@node1 ~]# echo "iamredhatman" | passwd --stdin fred Changing password for user fred. passwd: all authentication tokens updated successfully
Question 128:
Part 1 (on Node1 Server)
Task 7 [Accessing Linux File Systems]
Find all the files owned by user natasha and redirect the output to /home/alex/files.
Find all files that are larger than 5MiB in the /etc directory and copy them to /find/largefiles.
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Red Hat exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your EX200 exam preparations and Red Hat certification application, do not hesitate to visit our Vcedump.com to find your solutions here.