RedHat EX200 Exam Practice Questions (P. 1)
- Full Access (111 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #1
SIMULATION -
Configure your Host Name, IP Address, Gateway and DNS.
Host name: station.domain40.example.com
/etc/sysconfig/network
hostname=abc.com
hostname abc.com
IP Address:172.24.40.40/24 -
Gateway172.24.40.1 -
DNS:172.24.40.1 -
Configure your Host Name, IP Address, Gateway and DNS.
Host name: station.domain40.example.com
/etc/sysconfig/network
hostname=abc.com
hostname abc.com
IP Address:172.24.40.40/24 -
Gateway172.24.40.1 -
DNS:172.24.40.1 -
Correct Answer:
See explanation below.
# cd /etc/syscofig/network-scripts/
# ls
# vim ifcfg-eth0 (Configure IP Address, Gateway and DNS) IPADDR=172.24.40.40
GATEWAY=172.24.40.1 -
DNS1=172.24.40.1 -
# vim /etc/sysconfig/network
(Configure Host Name)
HOSTNAME= station.domain40.example.com
OR -
Graphical Interfaces:
System->Preference->Network Connections (Configure IP Address, Gateway and DNS) Vim /etc/sysconfig/network
(Configure Host Name)
See explanation below.
# cd /etc/syscofig/network-scripts/
# ls
# vim ifcfg-eth0 (Configure IP Address, Gateway and DNS) IPADDR=172.24.40.40
GATEWAY=172.24.40.1 -
DNS1=172.24.40.1 -
# vim /etc/sysconfig/network
(Configure Host Name)
HOSTNAME= station.domain40.example.com
OR -
Graphical Interfaces:
System->Preference->Network Connections (Configure IP Address, Gateway and DNS) Vim /etc/sysconfig/network
(Configure Host Name)
send
light_mode
delete
Question #2
SIMULATION -
Add 3 users: harry, natasha, tom.
The requirements: The Additional group of the two users: harry, Natasha is the admin group. The user: tom's login shell should be non-interactive.
Add 3 users: harry, natasha, tom.
The requirements: The Additional group of the two users: harry, Natasha is the admin group. The user: tom's login shell should be non-interactive.
Correct Answer:
See explanation below.
# useradd -G admin harry
# useradd -G admin natasha
# useradd -s /sbin/nologin tom
# id harry;id Natasha (Show additional group)
# cat /etc/passwd
(Show the login shell)
OR -
# system-config-users
See explanation below.
# useradd -G admin harry
# useradd -G admin natasha
# useradd -s /sbin/nologin tom
# id harry;id Natasha (Show additional group)
# cat /etc/passwd
(Show the login shell)
OR -
# system-config-users
send
light_mode
delete
Question #3
SIMULATION -
Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.
Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.
Correct Answer:
See explanation below.
# cd /home/
# mkdir admins /
# chown .admin admins/
# chmod 770 admins/
# chmod g+s admins/
See explanation below.
# cd /home/
# mkdir admins /
# chown .admin admins/
# chmod 770 admins/
# chmod g+s admins/

To set up the directory "/home/admins" correctly for the admin group, with users having read and write permissions while excluding others, the commands should create the directory, associate it with the 'admin' group, and properly set permissions and the setgid bit. This ensures files created within remain associated with the group. Commands to achieve this are: `mkdir /home/admins`, `chgrp admin /home/admins`, `chmod 770 /home/admins`, and `chmod g+s /home/admins`. This setup allows group members to read and write, but prevents access from non-group members and maintains group ownership for new files.
send
light_mode
delete
Question #4
SIMULATION -
Configure a task: plan to run echo hello command at 14:23 every day.
Configure a task: plan to run echo hello command at 14:23 every day.
Correct Answer:
See explanation below.
# which echo
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)
See explanation below.
# which echo
# crontab -e
23 14 * * * /bin/echo hello
# crontab -l (Verify)

The best way to set up a cron job like this is through the crontab editor. Use the command `crontab -e`, which opens the current user's crontab file in the default text editor. Add the line `23 14 * * * echo "hello"` to run your task at 14:23 every day. Always ensure to check the cron job configuration afterward by using `crontab -l`. This approach suits both general users and those studying the ex200 exam, focusing on practical application and verification of task setup.
send
light_mode
delete
Question #5
SIMULATION -
Find the files owned by harry, and copy it to catalog: /opt/dir
Find the files owned by harry, and copy it to catalog: /opt/dir
Correct Answer:
See explanation below.
# cd /opt/
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;
See explanation below.
# cd /opt/
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;

To correctly copy files owned by 'harry' to /opt/dir/, ensure the directory exists first. The command is: `find / -user harry -type f -exec cp {} /opt/dir/ \;`. This command finds files systemwide owned by 'harry', then copies them to the specified directory. It’s efficient and sticks directly to requirements. Always replace 'Harry' with 'harry' since Linux usernames are case-sensitive, and verify directory permissions might allow the copy operation to proceed without errors.
send
light_mode
delete
All Pages