51-60 Flashcards

1
Q

A newly created container has been unable to start properly, and a Linux administrator is analyzing the cause of the failure. Which of the following will allow the administrator to determine the FIRST command that is executed inside the container right after it starts?

A. docker export <container_id>
B. docker info <container_id>
C. docker start <container_id>
D. docker inspect <container_id></container_id></container_id></container_id></container_id>

A

D. docker inspect <container_id></container_id>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A Linux administrator is scheduling a system job that runs a script to check available disk space every hour. The Linux administrator does not want users to be able to start the job. Given the following:

[Unit]
Description=Check available disk space
RefuseManualstart=yes
RefuseManualStop=yes

[Timer]
Persistent=true
OnCalendar=---:00:00
Unit=checkdiskspace.service

[Install]
WantedBy=timers.target

The Linux administrator attempts to start the timer service but receives the following error message:

Failed to start checkdiskspace.timer: Operation refused …

Which of the following is MOST likely the reason the timer will not start?

A. The checkdiskspace.timer unit should be enabled via systemctl.
B. The timers.target should be reloaded to get the new configuration.
C. The checkdiskspace.timer should be configured to allow manual starts.
D. The checkdiskspace.timer should be started using the sudo command.

A

C. The checkdiskspace.timer should be configured to allow manual starts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A Linux administrator wants to find out whether files from the wget package have been altered since they were installed. Which of the following commands will provide the correct information?

A. rpm -i wget
B. rpm -qf wget
C. rpm -F wget
D. rpm -V wget

A

D. rpm -V wget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A Linux engineer set up two local DNS servers (10.10.10.10 and 10.10.10.20) and was testing email connectivity to the local mail server using the mail command on a local machine when the following error appeared:

Send-mail: Cannot open mail:25

The local machine DNS settings are:

$ cat /etc/resolv.conf
nameserver 10.10.10.10 #web records
nameserver 10.10.10.20 #email records

Mail server: mail.example.com

Which of the following commands could the engineer use to query the DNS server to get mail server information?

A. dig @example.com 10.10.10.20 a
B. dig @10.10.10.20 example.com mx
C. dig @example.com 10.10.10.20 ptr
D. dig @10.10.10.20 example.com ns

A

B. dig @10.10.10.20 example.com mx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A Linux engineer has been notified about the possible deletion of logs from the file /opt/app/logs. The engineer needs to ensure the log file can only be written into without removing previous entries.

lsattz /opt/app/logs
——————–e—- logs

Which of the following commands would be BEST to use to accomplish this task?

A. chattr +a /opt/app/logs
B. chattr +d /opt/app/logs
C. chattr +i /opt/app/logs
D. chattr +c /opt/app/logs

A

A. chattr +a /opt/app/logs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A systems administrator needs to check if the service systemd-resolved.service is running without any errors. Which of the following commands will show this information?

A. systemctl status systemd-resolved.service
B. systemctl enable systemd-resolved.service
C. systemctl mask systemd-resolved.service
D. systemctl show systemd-resolved.service

A

A. systemctl status systemd-resolved.service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SIMULATION -
Junior system administrator had trouble installing and running an Apache web server on a Linux server. You have been tasked with installing the Apache web server on the Linux server and resolving the issue that prevented the junior administrator from running Apache.

INSTRUCTIONS -
Install Apache and start the service. Verify that the Apache service is running with the defaults.
Typing “help” in the terminal will show a list of relevant event commands.
If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

CentOS Command Prompt
[root@centos7]#

A

yum install httpd
systemctl –now enable httpd
systemctl status httpd
netstat -tunlp | grep 80
pkill <processname>
systemctl restart httpd
systemctl status httpd</processname>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A Linux administrator needs to remove software from the server. Which of the following RPM options should be used?

A. rpm -s
B. rрm -d
C. rpm -q
D. rpm -e

A

D. rpm -e

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A Linux system fails to start and delivers the following error message:

Checking all file systems.
/dev/sda1 contains a file system with errors, check forced.

/dev/sda1: Inodes that were part of a corrupted orphan linked list found.

/dev/sda1: UNEXPECTED INCONSISTENCY;

Which of the following commands can be used to address this issue?

A. fsck.ext4 /dev/sda1
B. partprobe /dev/sda1
C. fdisk /dev/sda1
D. mkfs.ext4 /dev/sda1

A

A. fsck.ext4 /dev/sda1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Based on an organization’s new cybersecurity policies, an administrator has been instructed to ensure that, by default, all new users and groups that are created fall within the specified values below.

Min/max values for automatic uid selection in useradd
#
UID_MIN 1000
UID_MAX 60000
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 1000
GID_MAX 60000

To which of the following configuration files will the required changes need to be made?

A. /etc/login.defs
B. /etc/security/limits.conf
C. /etc/default/useradd
D. /etc/profile

A

C. /etc/default/useradd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly