Linux 3 Flashcards

1
Q

You attempt to install a package on a new Ubuntu installation. However, you are prompted with the following error:
The following packages have unmet dependencies

How should you resolve this error? [Choose all that apply]

A

Update the repo sources

Run the apt-get command with the -f parameter

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

Which of the following counter types are used for /sys/block/$DEVICE/stat?

A

Unsigned long integer

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

Which of the following is likely to have the most restrictive access control lists?

A

Demilitarized Zone (DMZ) router

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

You are using the latest version of Ubuntu. You need to remap a set of keys. Which of the following command should you use for this purpose? [Choose all that apply]

A
  • xkb

* xev

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

You have a Linux system on which Bluetooth is not working. You need to make it work to synchronize files with your mobile. Which of the following method should you use to troubleshoot Bluetooth? [Choose all that apply]

A
  • Use the dmesg | grep Bluetooth command
  • Use the sudo systemctl status bluetooth command
  • Use the sudo btmon command
  • Use the rfkill list command
  • Use the lsmod | grep bluetooth command
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You execute the following command on the Red Hat Enterprise Linux system:
ps -eZ | grep -E ‘(auditd|sshd)’
The following output is generated:
system_u:system_r:auditd_t:s0 root 3934 ? 00:00:00 /sbin/auditd
system_u:system_r:kernel_t:s0 root 3946 ? 00:00:00 [kauditd]
system_u:system_r:sshd_t:s0-s0:c0.c1023 root 4159 ? 00:00:00 /usr/sbin/sshd
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
What can be interpreted with the following output? [Choose all that apply]

A
  • It is possible to have multiple processes use the same security context
  • The first column is the security context for the mentioned process
  • Each process has only one security context
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Identify the output of the following command:

git push

A

It will push the local repository changes to the remote repository

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

You need to use the make command to build all programs forcefully. Which parameter should you use?

A

-B

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

Which of the following statement(s) is correct about the self-signed certificate? [Choose all that apply]

A
  • A self-signed certificate requires two parties to interact for trading public keys
  • A self-signed certificate can be generated by anyone
  • A self-signed certificate is signed by its own private key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In the /etc/cryptab file, which of the following fields are mandatory? [Choose all that apply]

A
  • Path to the block device

* /dev/mapper/name

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

Which of the following takes place when you restart a service using the restart parameter?

A

The service reads the configuration files and then reloads the configuration when the service restarts

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

You execute the following command:
ls -l /etc/passwd plab

At present, the plab file does not exist. What will be the output of this command?

A

It will list the passwd file and generate an error for the plab file

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

On a CentOS 7 system, you have configured OpenLDAP. You have also specified various attributes, such as domain component ( dc ), distinguished name (dn), and organization (o). You want to now check for the schema. Which file should you open to do this?

A

/etc/openldap/schema

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

You have a virtual Linux server hosted in the cloud environment. You run the getenforce command and find that SELinux is set to Disabled. You make the following changes to the /etc/selinux/config file:
SELINUX=enforcing
SELINUXTYPE=targeted
SETLOCALDEFS=0
You save the config file and reboot the system. After the system reboots, you run the getenforce command and find SELinux is still in the disabled state.
What could be the possible cause? [Choose all that apply]

A
  • The bootloader is disabling the SELinux

* The Linux system’s kernel is not configured with SELinux

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

You are using a Linux system on which Bluetooth is enabled. You want to ensure that you are able to see the messages when you are pairing with any Bluetooth device. Which of the following command will help you achieve this goal?

A

Use the sudo btmon command

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

You need to re-partition a disk that is part of a RAID, which is currently running on a Linux system. You want to ensure that the RAID stays intact and is not broken. What should you do?

A

You need to stop the RAID array first

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

You have several udev rules in the /etc/udev/rules.d/ directory. You have made significant changes to one rule from this directory. What should you do next without much administrative effort?

A

Reload the rules

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

You have a lot of files that contain the words plab and PLAB in your current directory. You want to perform a search for these words but do not want to perform a case-sensitive search using the grep command. What should you do?

A

grep -i plab .

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

Which of the following are components of cron? [Choose all that apply]

A
  • crontab

* crond

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

You have created a directory on a Linux system. You want all the files that are created within this directory should inherit the parent directory’s permissions only. What should you do? [Choose all that apply.]

A
  • Use the chmod command to set the setgid

* Assign the group ownership to the parent directory

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

ll your organization’s internal Websites are using HTTP protocol. After an attack on one of the Websites, you decide to implement HTTPS on all the Websites. However, the management does not allocate any additional funds for this job. What would be your best solution to secure the Websites?

A

Setup an internal CA and issue certificates

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

If you are using remote direct memory access (RDMA) technology in your Linux system, which of the following are the direct benefits? [Choose all that apply]

A
  • Low CPU utilization
  • High throughput
  • Low latency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

You have a Linux system. You want to query the display monitor from the command line and get the information, such as model, make, and display resolution. What should you do? [Choose all that apply]

A
  • Install and run the read-edid hardware information-gathering tool to find this information
  • Search for the information in the /var/log/Xorg.0.log file with the grep command
  • Use the xrandr tool from the x11-server-utils package
24
Q

Identify the output of the following command:

git commit -m “[message]”

A

Commits the staged changes in a new snapshot

25
Q

You are running the top command that displays all processes from all users. You want to view the processes only from the root user. What should you do?

A

Press u and then enter the root

26
Q

Which of the following directory contains the GPT specified UUIDs and labels?

A

by-partlabel

27
Q

Using the chage command, you configure a minimum of 2 days between password change. However, you notice that a user is able to change their password multiple times a day.
You run the following command to verify the settings:
chage -l plabuser
You receive the following output:
Last password change : Mar 25, 2019
Password expires : April 20, 2019
Password inactive : never
Account expires : never
Minimum number of days between password change : 2
Maximum number of days between password change : 25
Number of days of warning before password expires : 7
The Minimum number of days between password change policy does not seem to be working. What could the possible cause?

A

The /etc/shadow file is not enabled

28
Q

If you are using the libvirt API for managing the virtualization solutions, where would you run the libvirtd daemon?

A

On the VM host server

29
Q

You have disabled the memory overcommitting on your CentOS system by setting the following value:
overcommit_memory=2
When you run the swapoff command, you are prompted with the following error:
swapoff: /dev/sda2: swapoff failed: Cannot allocate memory
What could be the possible cause?

A

More memory is allocated to the applications than physical memory

30
Q

You want to search for a binary in a specific path. You do not want the output to provide any other information. Which of the following command should you use?

A

Run the whereis command

31
Q

You want to perform real-time network bandwidth usage. However, you want to perform the network bandwidth utilization based on the IP addresses without performing name resolution. What should you do?

A

Use the -n parameter with the iftop command

32
Q

You want to perform real-time network bandwidth usage. However, you want to perform the network bandwidth utilization based on the IP addresses without performing name resolution. What should you do?

A

Use the -n parameter with the iftop command

33
Q

Identify the Linux installation scenarios that can make the use of the fsck command. [Choose all that apply]
Answers

A
  • The system fails to boot due to the filesystem error
  • Files stored on the system are getting corrupted
  • A USB drive is not working properly
34
Q

Where does the ssh program record the host keys for individual users?

A

known_hosts

35
Q

You need to create a link with the following conditions:
• The data and link need to be on the separate partitions.
• You should be able to create a link with a directory.
• The link should not take up the hard drive space.
• To meet this criteria, you decide to create a hard link. If you do this, which of the above mentioned conditions would be met?

A

The link should not take up the hard drive space.

36
Q

When you run the following command: cat /proc/mounts, where does it retrieve the information from?

37
Q

You have containers configured on your Linux system. When containers are in use, you get the Out Of Memory Exceptions (OOME). What could be the possible method to correct this error?

A

Reduce the memory used by the application in the container

38
Q

You have containers configured on your Linux system. When containers are in use, you get the Out Of Memory Exceptions (OOME). What could be the possible method to correct this error?

A

Reduce the memory used by the application in the container

39
Q

You need to create a non-editable clone of a Git repository. Which parameter should you use with the git clone command? [Choose all that apply]

A

bare

mirror

40
Q

If you need to edit the ssh.conf file, in which directory would you find it in?

41
Q

You need to configure the nameservers for a static IP address on your system. Which of the following would be the correct file to edit?

A

/etc/network/interfaces

42
Q

A.

/etc/network/interfaces

43
Q

You want to block traffic from the specific IP address using ipset. To do this, you perform the following steps:
• Install ipset on the CentOS system
• Create a blacklist with hash:ip
• Add rules in the blacklist
• After doing these tasks, what else should you do as the next step to ensure the blocking works in the desired manner?

A

Test the ipset rules

44
Q

Which of the following prohibits a packet from passing through but sends no response? [Choose all that apply]

45
Q

You have created a new partition on a hard drive in CentOS Linux system. You used fdisk to create this partition. You create a filesystem on the new partition. When you save the partition information, you are prompted with the following error:
Re-reading the partition table failed.: Device or resource busy
How should you resolve this error? [Choose all that apply]

A
  • Run the partprobe command after exiting fdisk
  • Use the hdparm -z command
  • Reboot the system
46
Q

Which command will combine the specified branch’s history into the current branch?Answers

A

git merge [ branch]

47
Q

You are setting up a network and need to ensure that it performs at an optimum speed. You want to ensure that there are no latency issues in the network. Moreover, you need to ensure the optimal level of security. To achieve this, you consider the following tasks:
1 Minimize the number of rules on the router
2 Configure auditing only for the necessary events
3 Add a greater number of security controls
4 Disable authentication within the network
• Which of these tasks are required to meet your goal?

A

1&2
1 Minimize the number of rules on the router
2 Configure auditing only for the necessary events

48
Q

Which command should you run to display a partition label?

A

e2label /dev/sda1

49
Q

You had created a link named PLAB to the PLAB/PracticeIT/London directory. You want to now remove the link. What should you do? [Choose all that apply]

A

Use the unlink command

Use the rv coverage

50
Q

You had created a link named PLAB to the PLAB/PracticeIT/London directory. You want to now remove the link. What should you do? [Choose all that apply]

A

use the unlink command

use the rm command

51
Q

You manage multiple Ubuntu systems that use Personal Package Archives (PPAs) for package installation. You do not want these packages to receive updates. You have been advised to use the sudo apt-get install command with the appropriate option. Which of the following option should help you meet the required goal?

52
Q

You want to obtain the vendor and device IDs for the installed HBAs in a Linux system. What should you do? [Choose all that apply]

A
  • Review the /usr/share/hwdata/pci.ids file

* Use the lspci | grep “Fibre Channel” command

53
Q

Which of the following command will list the package name that contains the ls command?Answers

A

yum provides “*bin/ls.”

54
Q

You are using Ubuntu on your system. You run the aa-status command and find out that processes are running in the unconfined state. You verify and conclude that these processes have a profile defined. What should you do to resolve this issue? [Choose all that apply]

A
  • Restart the processes
  • C.
  • Restart the system
55
Q

Using orchestration helps you keep up-to-date inventory. This helps achieve which of the following benefits? [Choose all that apply]

A
  • Create and provision services quickly

* Maximum resource utilization

56
Q

However, there is no output. You need to enable swap on boot permanently. Which following steps you must perform to achieve this? [Choose all that apply]

A
  • Run the mkswap /swap.dat command

* Add a swap partition in the /etc/fstab file