Linux1 Flashcards
You execute the following command:
wc -l plab1.txt|tee -a plab2.txt
The contents of the plab1.txt are:
1
2
3
With the given command, what would be the contents of the plab2.txt file?
The contents of the plab2.txt file will be
1
2
3 plab1.txt
Identify the correct statement(s) for a repository. [Choose all that apply]
The repository configuration files are stored in the /etc/yum.repos.d/ directory
The configuration file for a repository has the extension .repo
When you run the following command: cat /proc/mounts, where does it retrieve the information from?
kernel
You need to configure link bonding to support fault tolerance. Which of the following will meet your requirement? [Choose all that apply]
3 (broadcast) Broadcast policy
1 (active-backup) Active-backup policy
0 (balance-rr) Round-robin policy
You enable your Linux Web server with the PKI-based login. When you connect to this Web server, you are not prompted for the password. With this configuration, which of the security risks are you avoiding?
Brute-force attack
You want to list out all the storage devices that are connected to a Linux system. You want to ensure that both mounted and unmounted devices are listed. What should you do? [Choose all that apply]
Use the hwinfo command
View the /proc/partitions file
Use the fdisk -l command
Use the lsblk command
When you use the dd command with the obs parameter, what is the default number of bytes written at a time?
512
You need to display information about the currently loaded modules in your Linux system. Which of the following command should you use?
lsmod
Which of the following type of program is dependent on the external shared libraries?
Dynamically linked
Which type of Access Control Entry (ACE) should you use to log access attempts?
System-audit
Which of the following can be used to log events generated by ACLs?
SELinux
Which of the following does PKI offer through digital signature?
Non-repudiation
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?
/etc/network/interfaces
You have one QLogic HBA card in a system that runs Red Hat Enterprise Linux 5.3. When you boot the system, the HBA is not detected. You run the following command:
ll -d qla2xxx
However, the command does not display any output. How should you possibly resolve this issue?
Update the device drivers
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 directory contains the GPT specified UUIDs and labels?
by-partlabel
Which of the following file controls the start of a service?
/etc/inittab
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]
Restart the processes
Restart the system
You need to find out the currently logged in users and their processes. Which command should you use?
w
You need to create a shell script. Which of the following is the directive that must be added in the first line of the shell script?
!
Which of the following command is used to create the SSH key?
ssh-keygen
When you connect to your network, either through a physical wire or remotely, the network access control application validates the state of your system. Your system has a small application installed that communicates with the network access control application. Which of the following solution has the security administrator implemented?
Agent-based, out-of-band
You have a plab.txt file that contains the following content:
Hello
PLAB
Users
You want to generate another file plab1.txt and add the same content using a single command. Which of the following command will help you achieve this?
cat > plab1.txt «_space;EOF Hello PLAB Users EOF
Which of the files should you use to view the hard drive details?
/proc/partitions
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.]
Assign the group ownership to the parent directory
Use the chmod command to set the setgid
If you need to defragment an XFS filesystem, which of the following command should you use?
xfs_fsr
Which file should you edit to modify the user-specific configuration?
.bash_profile
If you are running a system in the multi-user environment with the network environment, which sysvinit run level are you in?
3
Which of the following separates the real file system from the operating system and system services?
VFS
Which of the following action is performed when you perform Ctrl + z on a running process?
The process is sent to the background
You are using a Linux system. You need to display the information for a device that is in the Customized Devices object class. What should you do?
Run the lsdev command with the -C parameter
You need to deploy a series of Linux virtual machines (VMs) in Microsoft Azure. You need to use an application lifecycle automation tool. With the given choices, which of the following would be most appropriate?
chef
You have a kiosk that has USB enabled and is isolated from the network. Recently, a user copied an infected file into the kiosk. You want to ensure no one can use USB on the kiosk.
Which of the following individual actions can possibly help achieve this? [Choose all that apply]
Disable USB in the BIOS
Disable USB hub through the operating system
On a Debian system, you are editing the /etc/pam.d/common-password file. Which keyword and value should you add at the end of the following line if you need to ensure that the user must use one uppercase letter in the password:
password requisite pam_pwquality.so retry=3
ucredit=-1
You run the mkswap command:
mkswap /dev/hda1
but are prompted with the following error:
mkswap: command not found
How should you resolve this error?
Run the mkswap command with the root privileges