Linux Flashcards
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?
Use the -r parameter
Which of the following statements are true for the global variable? [Choose all that apply]
Global variables can pass the stored value from the current shell to the sub-shell
PATH and PS are examples of global variables
Which of the following does PKI offer through digital signature?
Non-repudiation
You need to display information about the currently loaded modules in your Linux system. Which of the following command should you use?
lsmod
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?
Disable SSH
Which of the following information is maintained in the /etc/passwd file? [Choose all that apply]
The user ID number (UID)
Login shell
Encrypted password
User’s group ID number (GID)
Which of the following algorithm can be used to verify an RPM package cryptographically? [Choose all that apply]
MD5
GPG
With the 32-bit Windows operating system installed on a disk formatted with MBR, what is the maximum partition size you can create?
1 TB
You need to view the log messages maintained by rsyslogd. Which of the following files should you review?
rsyslog.conf
Which of the following tool does not work with the deb packages but works with deb archive?
apt
If you are using the tar command with the -czvf option, which of the type of file will you create?
.tgz
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
Enforcing
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?
Subnet is not defined
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?
Execute the grub2-editenv list command
Which of the following operating system initially introduced the Common Internet File System (CIFS)?
Windows
To reboot a system, which of the following run level should you use?
6
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:
- Use low latency for interactive traffic
- Web browsing takes place at reasonable speed along when the downloads and uploads are in progress
- 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?
1, 2, and 3
Which of the following are character devices found in the /dev/ directory? [Choose all that apply)
Parallel printer ports
Serial port
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?
Verify with the CVE database
Which of the following can be considered as an overlay network? (Choose all that apply]
Content Delivery Network (CON)
Voice Over IP (VoIP)
Virtual Private Network (VPN)
Peer-to-peer (P2P)
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?
Replace the hard drive in the system
You need to lock out all users except root in a Linux system. Identify the steps that you need to perform:
- Log out all the users
- Create the /etc/nologin
- Modify the /etc/pam.d/login file
1, 2, and 3
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?
You did not execute the command with the root privileges
You have a new Linux system on which you want to perform the following tasks:
- Initialize the network adapter interface
- Assign an IP address on the interface
- Have the ability to enable or disable the interface
- View the IP address on the interface
- View the MAC address of the interface
- 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?
1,2,3,4,5
Which of the following type of program is dependent on the external shared libraries?
Dynamically linked
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?
Run the audit2why command
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?
The subdirectory will have the Default ACL, but the file will access ACL
You want to display the value of a single variable. Which command should you use?
printenv
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?
Use the sudo command
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?
su -c
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]
Verify if the /sys/firmware/efi directory exists
Install and then run efibootmgr
In the /etc/sysctl.conf file, which of the following statement should you add to enable IPv6 forwarding?
net.ipv6.conf.all.forwarding=1
Which type of Access Control Entry (ACE) should you use to log access attempts?
System-audit
Which of the following can be defined as the orchestration attributes? [Choose all that apply]
objects tags desired state description name
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?
Blame
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?
Disable the profile
Which of the following command displays a list of environment variables that have been exported?
env
After you schedule a command to execute at a certain time, which command should you use to view the currently-queued commands?
atq
Which of the following parameter of the print command will redirect the given arguments to the history file?
-s
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?
Use the hotkeys to enable wireless
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?
Remove Compiz from the system
Which of the following command will disable the httpd service at a system startup?
chkconfig httpd off
If you execute the lastb command, which of the following file does it refer for bad login attempts?
/var/log/btmp
In the /dev/disk/by-* directory, which of the following is responsible for creating the symlinks?
udev
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?
Ensure that the chroot jail does not contain setuid or setgid executables
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]
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
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?
TShark will compile but will not be ab’e to read compressed files
Which of the following statement is true for persistent volumes?
Data on the persistent volume can still exist if a Pod is deleted
With which of the filesystems can you use the resize2fs command? (Choose all that apply]
ext2
ext3
ext4
By default, how many minor numbers are mapped to a single SCSI disk?
16
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.]
Set the setguid on the directory
Set the setuid on the directory
Which of the following command will rebuild the LVM cache file by scanning the disks for volume groups?
vgscan
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?
Use the setudit tool
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?
Nslookup
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?
Rescan the SCSI bus on the server
Which file reads the environmental variables from the scripts that are placed in the /etc/profile.d/ directory?
/etc/profile
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?
Implement RADIUS on the network
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]
Ask the cloud service provider to sign an SLA to destroy the data remnants
Encrypt the disk where application and database will reside
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?
Incremental
Using the nmcli command, you want to check the connectivity status of your Linux system. Which of the following command should you use?
nmcli networking connectivity
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?
137
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]
Use a swap file or swap partition
Check the MySQL and system log files
Kill the stopped jobs
Check the memory usage
When you create a group with the groupadd command, what is the default value of MAX_MEMBERS PER GROUP?
0
If the firewalld.conf file is missing, how does firewalld function?
The internal defaults of firewalld are used
Which type of backup can allow you to revert to a system state when it was taken?
Snapshot
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?
Reboot the system to fix the issue
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?
Use the -a parameter with the Is command
Which of the following is used as an intermediate step in the boot procedure?
Vmlinux
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?
You will navigate to the PLAB/PracticelT/London directory
Which of the following is the public key for SSH 1?
Identity.pub
You need to clear the ring buffer message log. What should you do?
Run the dmesg command with the -c parameter
Identify the output of the following command:
usermod –home /tmp plab
Set the /tmp as the home directory for the plab user
The httpd service is running currently. You issue the following command:
systemctl disable application.service
What will be the outcome of this command?
The service will not start automatically at the system boot
You need to ignore a file or folder from being synchronized. Which file should you create for this purpose?
. gitignore
You want to block SMTP traffic using access control lists. Which of the following port should you block?
25
In the transport mode, which of the following is encrypted?
The payload
From which file is the current run level of the system read?
/var/run/utmp
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?
Edit the .treeinfo file and add multiple sources
You want to perform recursive removal of a module and its dependent modules. Which of the following commands should you use?
rmmod
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!
Purge the Nvidia drivers
Install the Nvidia drivers
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?
grub2-mkconfig -o ~/grub.cfg
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]
Ensure that the virtual machine is in the shutdown state
Must be connected to the vCenter server using the vSphere Client
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?
Use the ifconfig command to configure this mode
The system runs many applications that need to run uninterruptedly.
You want to resolve this issue with minimal administrative effort. What should you do?
Stop the systemd-udevd service
Which of the following are examples of environment variables? [Choose all that apply]
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
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?
for
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?
Prevent the eavesdropping attack
Which of the following is likely to be used in arithmetic expressions where you are adding two numbers?
()
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?
This is the default route