Linux Flashcards

1
Q

You are attempting to copy the contents of one directory, PLAB, to another directory, PIL. You execute the following command

cp PLAB PIL

You are prompted with an error that this is a directory.
You need to copy all files from the PLAB directory to the PIL directory without any error. What should you do?

A

Use the -r parameter

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

Which of the following statements are true for the global variable? [Choose all that apply]

A

Global variables can pass the stored value from the current shell to the sub-shell
PATH and PS are examples of global variables

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

Which of the following does PKI offer through digital signature?

A

Non-repudiation

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

You need to display information about the currently loaded modules in your Linux system. Which of the following command should you use?

A

lsmod

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

You perform a vulnerability assessment. In the assessment, you conclude that the edge router is accessible through port 22, making the router insecure. You need to secure this router. What should you do?

A

Disable SSH

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

Which of the following information is maintained in the /etc/passwd file? [Choose all that apply]

A

The user ID number (UID)
Login shell
Encrypted password
User’s group ID number (GID)

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

Which of the following algorithm can be used to verify an RPM package cryptographically? [Choose all that apply]

A

MD5

GPG

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

With the 32-bit Windows operating system installed on a disk formatted with MBR, what is the maximum partition size you can create?

A

1 TB

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

You need to view the log messages maintained by rsyslogd. Which of the following files should you review?

A

rsyslog.conf

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

Which of the following tool does not work with the deb packages but works with deb archive?

A

apt

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

If you are using the tar command with the -czvf option, which of the type of file will you create?

A

.tgz

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

You are using CentOS 7. You execute the following command:
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux targeted
Loaded policy name: enforcing
Current mode: enforcing
Mode from config file: Policy MLS status: enabled

Policy deny_unknown status: allowed Max kernel policy version: 28

A

Enforcing

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

You have just installed DHCP package on your Linux system. You want to configure the system as the DHCP ser,er. You attempt to start the DHCP server wilh lt1e defaull dhcpd.conf rile. Yo, are promplec wilh lrie following error:

Starting ISC DHCP server: dhcpdchccl􀁶 syslog for diagnostics …. failed!

What could be the possible cause?

A

Subnet is not defined

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

You want to view the currently active kernel being used by CentOS. You, however, do not want to make any changes to the currently active kernel. What should you do?

A

Execute the grub2-editenv list command

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

Which of the following operating system initially introduced the Common Internet File System (CIFS)?

A

Windows

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

To reboot a system, which of the following run level should you use?

A

6

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

You start a large download on your Linux system. However, you find tile Web browsing is slow. You want to perform traffic shaping to avoid bandwidth saturation. To do this, you decide to use the wondershaper script. You want to meet the following goals:

  1. Use low latency for interactive traffic
  2. Web browsing takes place at reasonable speed along when the downloads and uploads are in progress
  3. Uploading file does not impact the file downloads or vice versa

With the use of wondershaper script, which of the following goals will be met?

A

1, 2, and 3

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

Which of the following are character devices found in the /dev/ directory? [Choose all that apply)

A

Parallel printer ports

Serial port

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

The security administrator has discovered several vulnerabilities in an off-the-shelf appl catio􀀠 but is not sure whether these vulnerabilities are known and published. What should the administrator do to find this out?

A

Verify with the CVE database

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

Which of the following can be considered as an overlay network? (Choose all that apply]

A

Content Delivery Network (CON)
Voice Over IP (VoIP)
Virtual Private Network (VPN)
Peer-to-peer (P2P)

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

Refer to the exhibit
You have generated the output using the following command:

iotop -oPa

You notice that the number of disk write operations is quite high during the peak traffic hours, and the disk is being overburdened. How should you resolve this issue?

A

Replace the hard drive in the system

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

You need to lock out all users except root in a Linux system. Identify the steps that you need to perform:

  1. Log out all the users
  2. Create the /etc/nologin
  3. Modify the /etc/pam.d/login file
A

1, 2, and 3

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

You work on a CentOS system as a regular user. You need to start a new process with the nice value of-10. To do this, you execute the following command:

nice 10 ./plab.sh

You are prompted With the following error:

nice: cannot set niceness: Permission denied

What could be the probable cause?

A

You did not execute the command with the root privileges

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

You have a new Linux system on which you want to perform the following tasks:

  1. Initialize the network adapter interface
  2. Assign an IP address on the interface
  3. Have the ability to enable or disable the interface
  4. View the IP address on the interface
  5. View the MAC address of the interface
  6. Test the connectivity between two systems

You decide to use the ifconfig command. If you use this command, which of the following tasks should you be able to accomplish?

A

1,2,3,4,5

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

Which of the following type of program is dependent on the external shared libraries?

A

Dynamically linked

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

You have a Linux server wilh SELinux configured. On your server, you have file and directory permissions, ACLs, and SELinux contexts configured. When you attempt to create a file in one of the directories, you get the access denied error. You verify that you have read, write, and Execute permissions on the directory. How should you narrow down the problem without reducing the security of the system?

A

Run the audit2why command

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

You have a directory named plab on which you have applied the Default ACL. You create a subdirectory within the plab directory, and then you create a file. What will be the outcome of these actions?

A

The subdirectory will have the Default ACL, but the file will access ACL

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

You want to display the value of a single variable. Which command should you use?

A

printenv

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

You attempt to log on to a newly installed Ubuntu system using the root user. You have been told that the root user does not have any password. However, when you attempt to log in, you are prompted with an authentication failure message. You need to install a package but want to use the restrictive administrative privileges. What should you do?

A

Use the sudo command

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

You want to use the su command in the same manner as the sudo command. The root account is configured with a password. Which of the following command will help you achieve this?

A

su -c

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

You have a dual-boot system with Windows 10 and Ubuntu system. You want to verify if your system is running UEFI. Which of the two methods can help you verify this? (Choose all that apply]

A

Verify if the /sys/firmware/efi directory exists

Install and then run efibootmgr

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

In the /etc/sysctl.conf file, which of the following statement should you add to enable IPv6 forwarding?

A

net.ipv6.conf.all.forwarding=1

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

Which type of Access Control Entry (ACE) should you use to log access attempts?

A

System-audit

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

Which of the following can be defined as the orchestration attributes? [Choose all that apply]

A
objects
tags
desired state
description
name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

You want to sort the running service with the time they took to initialize. You want the highest time taken first. Which of the subcommand of systemctl-analyze should be used for this purpose?

A

Blame

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

You want to unload a profile from the kernel on your Ubuntu system. When AppArmor loads, the profile should not be loaded. What should you do?

A

Disable the profile

37
Q

Which of the following command displays a list of environment variables that have been exported?

A

env

38
Q

After you schedule a command to execute at a certain time, which command should you use to view the currently-queued commands?

A

atq

39
Q

Which of the following parameter of the print command will redirect the given arguments to the history file?

A

-s

40
Q

You have Ubuntu installed on your laptop. You are not able to connect to the wireless network. You run the following command:

rfkill list

You get the following as the output of this command: phy0: Wireless
LAN Soft blocked: yes
Hard blocked: no
How do you resolve this issue?

A

Use the hotkeys to enable wireless

41
Q

You have, recently installed Ubuntu or a desktop. When you boot the system you notice that except for the wall paper, it does not display the side launcher, the unity or the dash. How should you resolve the problem with minimum administrative effort?

A

Remove Compiz from the system

42
Q

Which of the following command will disable the httpd service at a system startup?

A

chkconfig httpd off

43
Q

If you execute the lastb command, which of the following file does it refer for bad login attempts?

A

/var/log/btmp

44
Q

In the /dev/disk/by-* directory, which of the following is responsible for creating the symlinks?

A

udev

45
Q

You have configured chroot jail on a Linux system and restricted a user to a specific directory structure. You want to ensure that the user does not break the chroot jail. Which of the following method will prevent this?

A

Ensure that the chroot jail does not contain setuid or setgid executables

46
Q

You have the Ubuntu Linux installation on your system. You want to load a Linux kernel module at the boot time automatically. To achieve this goal, what should you do? [Choose all that apply]

A

Edit the /etc/modules file and add the module in it

Create a new config file for the module and put it in the /etc/modules-load.d/ directory

47
Q

You are compiling the source of TShark on your system, which does not have the zlib library installed. With the supported library, what will be the outcome?

A

TShark will compile but will not be ab’e to read compressed files

48
Q

Which of the following statement is true for persistent volumes?

A

Data on the persistent volume can still exist if a Pod is deleted

49
Q

With which of the filesystems can you use the resize2fs command? (Choose all that apply]

A

ext2
ext3
ext4

50
Q

By default, how many minor numbers are mapped to a single SCSI disk?

A

16

51
Q

You want to assign the ownership to the users and groups of a directory named plab. The owner of the files within, the directory should not have the ownership. What should you do? [Choose all that apply.]

A

Set the setguid on the directory

Set the setuid on the directory

52
Q

Which of the following command will rebuild the LVM cache file by scanning the disks for volume groups?

A

vgscan

53
Q

You have a Linux system with SELinux configured. You want w view the denials that have occurred. Along with this. you want to save the denials. What should you do?

A

Use the setudit tool

54
Q

You have executed a command to query the DNS server for the domain, www.google.com. When you run this command, you get the following
information:
Non-authoritative answer:
Name: www.google.com
Address: 172.217.166.36
Which command would have you executed to get this output?

A

Nslookup

55
Q

You have added a new SCSI device on a Linux server. You need to get this device detected. There are multiple applications running on this server that cannot have a down time. You do not know the device location on the server. What should you do?

A

Rescan the SCSI bus on the server

56
Q

Which file reads the environmental variables from the scripts that are placed in the /etc/profile.d/ directory?

A

/etc/profile

57
Q

You manage a network that consists of servers and hardware from different vendors. You have been asked to integrate a method of centralized authentication, authorization, and accounting (AAA). The users must be securely and centrally authenticated before they can access network resources. Which of the following should you implement?

A

Implement RADIUS on the network

58
Q

You need to host an application with a database in the multi-tenancy environment. The environment is on a cloud from a cloud service provider. You will require this application only for three months. However, after that, you want to ensure that if there are any data remnant of the application, it should not be accessible to anyone. What should you do? (Choose all that apply]

A

Ask the cloud service provider to sign an SLA to destroy the data remnants

Encrypt the disk where application and database will reside

59
Q

You need to perform a backup that is faster, takes less space, but takes a long time to restore. Which of the following backup should you use?

A

Incremental

60
Q

Using the nmcli command, you want to check the connectivity status of your Linux system. Which of the following command should you use?

A

nmcli networking connectivity

61
Q

Your home directory contains only one file named plab.txt. When you check the permissions on the plab.txt file, you get the following result: Permissions
-rw-r—–
What would be its umask permissions?

A

137

62
Q

You have a Website that runs MySQL in the backend. You start to experience problems when Out of Memory (OOM) starts to kill MySQL process as soon as it starts. You want to resolve this issue. Which of the following methods can possibly help troubleshoot this issue? [Choose all that apply]

A

Use a swap file or swap partition
Check the MySQL and system log files
Kill the stopped jobs
Check the memory usage

63
Q

When you create a group with the groupadd command, what is the default value of MAX_MEMBERS PER GROUP?

A

0

64
Q

If the firewalld.conf file is missing, how does firewalld function?

A

The internal defaults of firewalld are used

65
Q

Which type of backup can allow you to revert to a system state when it was taken?

A

Snapshot

66
Q

You have a process with the process state marked with D, signifying the process is in Uninterruptible sleep. You need to ensure that the process comes out of this state. Which of the following solution should you apply?

A

Reboot the system to fix the issue

67
Q

You execute the Is command to list the files in the current directory. However, you notice that you are not able to view the hidden files. You want to list the hidden files using the Is command. What should you do?

A

Use the -a parameter with the Is command

68
Q

Which of the following is used as an intermediate step in the boot procedure?

A

Vmlinux

69
Q

You have created a soft link with the help of following command:
ln -s PLAB/PracticeIT/London PLAB
After creating the soft link, you issue the following command:
cd PLAB
What would be the outcome when you execute this command?

A

You will navigate to the PLAB/PracticelT/London directory

70
Q

Which of the following is the public key for SSH 1?

A

Identity.pub

71
Q

You need to clear the ring buffer message log. What should you do?

A

Run the dmesg command with the -c parameter

72
Q

Identify the output of the following command:

usermod –home /tmp plab

A

Set the /tmp as the home directory for the plab user

73
Q

The httpd service is running currently. You issue the following command:

systemctl disable application.service

What will be the outcome of this command?

A

The service will not start automatically at the system boot

74
Q

You need to ignore a file or folder from being synchronized. Which file should you create for this purpose?

A

. gitignore

75
Q

You want to block SMTP traffic using access control lists. Which of the following port should you block?

A

25

76
Q

In the transport mode, which of the following is encrypted?

A

The payload

77
Q

From which file is the current run level of the system read?

A

/var/run/utmp

78
Q

You need to specify multiple HTTP sources for installation of multiple servers. You want to ensure that if one source is not available, the installation image is available at the second source. Which of the following can help you achieve this?

A

Edit the .treeinfo file and add multiple sources

79
Q

You want to perform recursive removal of a module and its dependent modules. Which of the following commands should you use?

A

rmmod

80
Q

You updated the kernel on a Linux systern that has Nvidia display adapter. When you restart the systerm. Cinnamon continues to crash. Which should you perform to resolve ,his issue? [Choose all that apply!

A

Purge the Nvidia drivers

Install the Nvidia drivers

81
Q

You need to save the GRUB2 configuration. You want the configuration file to be saved in your home directory. To do this, which of the following command should be used?

A

grub2-mkconfig -o ~/grub.cfg

82
Q

You have a vSphere vCenter server that is managing multiple ESXi servers. You need to connect to the vCenter server using the vSphere Client. You have created a new virtual machine that you want to use as a template.
Which of the following pre-requisites must you fulfill to achieve this goal? [Choose all that apply]

A

Ensure that the virtual machine is in the shutdown state

Must be connected to the vCenter server using the vSphere Client

83
Q

You have a Linux system with one network adapter card. You want to capture all packets to perform an analysis. Therefore, you need to put the eth0 interface in the Promiscuous mode so that this interface is able to receive all packets. What should you do?

A

Use the ifconfig command to configure this mode

84
Q

The system runs many applications that need to run uninterruptedly.
You want to resolve this issue with minimal administrative effort. What should you do?

A

Stop the systemd-udevd service

85
Q

Which of the following are examples of environment variables? [Choose all that apply]

A
A.	PS1 
B.	TEMP
C.     PATH
D.     Read more at: 
         https://www.thesslstore.com/blog/difference-sha-1- 
         sha-2-sha-256-hash-algorithms/ 
E.     MAIL
86
Q

You have a list of items that you want to iterate until the list is exhausted. Which of the following loop would be most appropriate to use in this scenario?

A

for

87
Q

You have recently implemented application streaming on a Linux system on your network. You have made the following configuration:

  • Enforced encryption
  • Configured the session timeout
  • Configured access control on the application streaming server

With this configuration, you should be able to prevent which of the following attack?

A

Prevent the eavesdropping attack

88
Q

Which of the following is likely to be used in arithmetic expressions where you are adding two numbers?

A

()

89
Q

When examining the routing table of a router, a network administrator notices the following entry:

0.0.0.0.0.0.0.0 GigabitEthernet 1

What does this entry mean?

A

This is the default route