135 Linux-Pro Chapter 2 to 9 & 13
You need to shut down the system immediately and send a message to logged in users to allow running processes to close gracefully.
shutdown -h now
You are working on a systemd-based Linux distribution. Which command can you use to manage the service and targets?
systemctl
What would you enter at the command prompt to find out whether cups.service is running?
systemctl status cups.service
what is the core process for a systemd-based Linux system?
systemd
You need to restore a file, yearend.xls, from the archive 013004.tar.gz in the backup directory. The file needs to be restored to /home/accounting. Which command will perform the restore?
tar -xzvf /backup/013004.tar.gz /home/accounting/yearend.xls
what has the process ID (PID) of 1?
the initial process
You need to convert the file system of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive. What command and option should you enter at the command prompt?
tune2fs -j /dev/sdb3
You need to create a user account with the following parameters: Login name: pmorrill Comment: Paul Morrill Home directory: /home/pmorrill_temp UID: 683 Which of the following commands should you use?
useradd -c "Paul Morrill" -d /home/pmorrill_temp -u 683 pmorrill
You have performed an audit and have found active accounts for employees who no longer work for the company. You want to disable those accounts. Which command example will disable a user account?
usermod -L joer
A programmer named Brandon calls with an issue. He is currently using the C shell each time he logs in, but his manager has told him to start using the bash shell. Which command will change brandon's shell to the desired setting?
usermod -s /bin/bash brandon
What is the full path directory that holds the man files on the system?
usr/share/man
Which of the following commands creates a volume group named backup and initializes it by adding the third disk in a Linux system to the volume group?
vgcreate backup /dev/sdc
Which of the following are three popular tool sets Linux-based hyper visors use to manage virtual machines?
virsh vmm libvirt
Which of the following tools provides a graphical interface for managing virtual machines on a Linux host?
vmm
Which of the following paths represents the root directory?
/
What is the full path and filename of the GRUB 2 file that is used for editing the default behavior of the bootloader menu?
/etc/default/grub
You have GRUB2 installed on your Linux workstation. You need to make changes to the boot menu. Which files and scripts can you edit to modify the menu entries and behavior of the boot menu?
/etc/default/grub /etc/grub.d/40_custom
You need to change the default home directory value, which is used by the useradd utility when creating a user account. What is the full path and filename of the file you should edit?
/etc/default/useradd
Anna, a system administrator, wants to prevent users from pressing the Ctrl+Alt+Delete key combination to reboot the server. Which configuration file should be modified to change this setting?
/etc/inittab
What is the full path and file name for the file that contains a colon-, space-, tab-, newline-, or comma-delimited list of directories in which to search for libraries?
/etc/ld.so.conf
All users at your site are using the bash shell. You want to set a variable that will apply to every user and always have the same value. Which of the following shell configuration files should you place this variable in? .bash_profile .bashrc .bash_login /etc/profile
/etc/profile
Which of the following directories is the home directory for the root user account?
/root
A Linux user has an executable file named ni that can save a snapshot of network information with the date and time in a log file. The executable ni file is in the /root directory, and /root is the current working directory. Which of the following commands would run the executable file? (Select TWO).
/root/ni ./ni
What is the full path to the directory that contains information about each kernel module installed on the computer?
/sys/module
What is the typical default umask value?
022
Which of the following hexadecimal codes represents an extended partition?
0x85
What would be the outcome of the following command? userdel -r jjones
1) The user account, jjones, would be deleted along with jjones' home directory.
Which of the following is the maximum number of GUID partitions that can be created using the gdisk utility?
128
For Linux files, the default permission is 666, and the default umask is 022. When a new file is created, it will be assigned 644 (rw-r--r--) permissions. If the umask is set to 027, what permissions will be assigned for newly created files?
640 (rw-r-----)
Which of the following actions does the dpkg -l (lowercase L) command perform?
All packages with names that match a specified pattern are displayed
You have an xfs file system in your linux computer. You need to display the XFS file system parameters, such as the block size and inode data structures. Which of the following commands should you use? (Select TWO). (Each answer is an independent solution.)
xfs_growfs -n xfs_info
which system component verifies the hardware and passes control of the computer to the boot loader?
BIOS
You are asked to help a user who is complaining that file system errors are being reported during boot-up. When you reboot the user's system, you see errors on sda2. Which of the following strategies will check the file system on sda2 and fix the errors?
Change to single user mode and run fsck /dev/sda2.
Which of the following is a function of a virtual network switch?
Connects the VMs virtual NIC and the host's physical NIC.
Which of the following templates, which use the JSON file format, can be copied and used to create multiple containers, that run the same applications?
Container Image
Which of the following describes the effects of the tune2fs -j /dev/sdb1 command?
Converts the /dev/sdb1 device to ext3.
Which of the following steps must be completed after creating a logical volumes so that the logical volume can be used to store files?
Create file systems on the volumes and mount them.
Which of the following daemons allow processes to communicate with each other and relay information about hotplug devices?
D-bus
You have an xfs file system in your Linux system represented by /dev/sdb1. You need to copy all the filenames on the drive to the /reviewxfs file. You must be able to read the filenames in the /reviewxfs file. Which of the following commands should you use?
xfs_metadump -o /dev/sdb1 /reviewxfs
You have a dual-boot system with a Linux and Windows operating systems. You need to configure the GRUB 2 bootloader to display the menu for 12 seconds before it automatically boots the default operating system. Which of the following is the BEST first step to configure the boot loader?
Edit the timeout parameter in the /etc/default/grub file to say GRUB_TIMEOUT=12
Which of the following desktops is the default for many Linux distributions, such as Fedora and Ubuntu?
GNOME
You are editing the /etc/default/grub file. Which option should you use to set the default operating system?
GRUB_DEFAULT=
Which of the following situations is most likely to cause a dependency problem?
Installing two different packages that both include /usr/lib/graphlib
Which environment variable overriding all other settings. It sets all locales
LC_ALL
The number of inodes has been exhausted.
Leroy tries to copy some files to an ext3 volune and received the following error: "No space left on device." Leroy executes the df command and determines that there is sufficient space to copy the files. He also verifies that he has the permission to copy the files. Which of the following BEST describes Leroy's problem?
Which of the following Linux bridge modes is the default?
NAT
Which remote desktop technology offers access from most common platforms such as Linux, Windows, Mac iOS, Android, and Rasberry?
NX
p
Q .8 While in the vi Command Mode, you copy a whole line of text to the general buffer. You then navigate to a different location in the file. Which of the following commands will pastes the copied text?
yy
Q .9 What command would you enter while in vi command mode to copy the entire line of text to the general buffer?
j
Q. 10 Move the cursor down a line.
k
Q. 10 Move the cursor up a line.
1. Press the Esc key 2. TypeP ":wq"
Q. 5 Using the vi editor in Insert Mode, you made a few changes to the /boot/grub/grub.conf
You obtain your applications and updates in RPM format. Which of the following distributions is your system based on?
Red Hat
Which values are set for the following environment variables? Type echo $variable at the prompt to answer the question. The variables are case sensitive.
SHELL /bin/bash
Which of the following provides a complete open-source solution for remove access to virtual machines?
SPICE
Which of the following systemd unit-specfic sections describes how to manage services or appllcations on the server?
Service
If an attacker boots into single user mode, they are logged in automatically as the root user without being required to enter the root password.
Set a bootloader password.
Setting the SUID flag is a powerful and useful feature. It can have weaknesses associated with its use. Which of the following statements identifies a weakness?
Setting the SUID flag for an application or process owned by the root user is a potential security hole.
The hard disk in your Linux laptop has almost reached its maximum storage capacity. You would like to add more hard disk storage but there is no room internal to the computer. Which of the following device types is BEST to use if you want to achieve the fastest throughput?
USB
Which of the following character sets is a variable length encoding standard of Unicode that uses one to four 8-bit bytes to support many languages and most commonly used on linux?
UTF-8
Which of the following is the maximum number of logical partitions allowed on an extended partition?
Unlimited
Which file system is a FAT32 file system for Linux?
VFAT
file
What would you enter at the command prompt to display a file's type?
Which of the following are an example of a Linux display server?
X11 KDE
Which X11 Window System element is the MAIN system component?
X11 Server
PATH=$PATH/sbin/special
You want the directory /sbin/special to be include in the PATH environment variable. You also want to keep all current directory entries currently in the PATH variable.
Which awk/sort command combination displays a sorted list of username in the /etc/password file?
awk -F: '{ print $1 }' /etc/passwd | sort
Which of the following commands will display which boot options were given to the kernel at boot time?
cat /proc/cmdline
You need to get detailed information about the system memory. Which of the following commands will display that information?
cat /proc/meminfo
A file named acctg needs to have the SGID permission set on it while keeping all other permissions at their present value. Which of the following commands will accomplish this?
cjmod g+s acctg
You are requested to help a user who reports that he has no more local storage space. You go to his system and log in as the root user. Which of the following commands will display the available disk space on all partitions? (Select TWO).
df df -h
When creating an ext2 or ext3 file system, a fixed number of inodes is assigned. Which of the following commands shows the number of inodes, number of free inodes, and number of used inodes?
df -i
What dpkg command would you enter at the command prompt to search for packages that have been partially installed on the system?
dpkg -C
Which of the following commands will reconfigure an already installed package?
dpkg-reconfigure
What command would you enter at the command prompt to list all files and directories in the badams home directory along with a file size and a total amount of space taken up by the directory?
du -ac /home/badams
What command would you enter at the command prompt to list all files and directories in the badams home directory along with a file size and total amount of space taken up by the directory?
du -ac /home/badams
Which of the following commands will open the quota file for a specific user?
edquota -u
Which command should you enter at the command prompt to change the quota settings for the gshant user?
edquota -u gshant
You are searching the standard input for any line containing "JAMESTOWN" at the end of a line. Which egrep constructor should you enter at the command prompt?
egrep JAMESTOWN$
You recently used the HOST=FS4 command. Which of the following commands should you use to change the HOST variable to a global variable that will be inherited by subsequent child sells and processes?
export HOST
Which of the following Linux systems support journaling?
ext4
What would you enter at the command prompt to display a file's type?
file
You need to find all files in the /home/gshant directory that are larger than 300k. You can change your directory to /home/gshant.
find -size +300k
Which of the following commands finds all of the files on the system that have either blue or gold in their names?
find / -name '*blue*' -o -name '*gold*'
You have a group named temp_sales on your system. The group is no longer needed, and you should remove the group. Which of the following is the BEST command for accomplishing this task?
groupdel temp_sales
Due to a merger with another company, standardization is now being imposed throughout the company. As a result of this, the sales group must be renamed marketing. Which of the following is the BEST command to use to rename the group?
groupmod -n marketing sales
What would you enter at the command prompt to display the primary and secondary group memberships for the gshant user account?
groups gshant
You are experiencing a problem with a SysV init network server. You want to bring the system down and try reseating the cards within it before restarting it. Which command completely shuts down the system in an orderly manner?
init 0
Which of the following commands will merge two files based on identical fields of text?
join
which of the following commands will merge two aifles based in identical fields of text
join
You have been asked to temporarily fill in for an administrator who has just been fired. This administrator was known to have lax security standards, and you suspect that passwords are still kept in the /etc/passwd file. Which of the following entry within the passwd file would indicate that the passwords are stored there?
kolton:34uyx:431:0:Back Door:/root:/bin/bash
Which of the following commands will display the attributes of a /boot/gub/grub.conf file?
lasttr /boot/grub/grub.conf
A directory intended to used only by administrations keep us filing with files.
ls -1 | cut-d " " -f5
Which of the following commands displays an expanded listing that includes the owner and size of all the files in the /etc directory?
ls -al /etc
A directory intended to be used only by administrators keeps filling with files. Which of the following commands would you use to see only the names of the users saving files in the directory?
ls -l | cut -d " " -f5
Which command displays information about all loaded modules on the system?
lsmod
You are working on a Linux System and need more information about the uname command. What you enter at the command prompt to learn about the uname command syntax and options?
man uname
Which of the following utilities is used to manage and monitor software RAID devices?
mdadm
Fred, a Linux administrator, needs to create the directory /var/oracle/database/9i. Only the directory /var currently exists. The current working directory in the root of the filesystem. Which of the following commands will create the directory path?
mkdir -p /var/pracle/database/9i
Which of the following commands formats the second partition on the fourth disk drive with the ext3 file system?
mke2fs -j /dev/sdd2
You need to create an ext4 file system on the first partition on the second hard disk drive. What command should you enter at the command prompt?
mkfs.ext4 /dev/sdb1
Which utility runs at startup to load modules into the kernel?
modprobe
Which of the following commands will check for dependencies before removing the debug module from the kernel?
modprobe -r debug
You need to mount the CD-ROM device to the /media/cdrom directory. What command should you use?
mount /dev/cdrom /media/cdrom
You have partitioned and formatted a new hard disk, sdc. You want to mount the first partition on sdc to directory /mnt/newdisk. Which command will perform the mount correctly?
mount /dev/sdc1 /mnt/newdisk
You want to display the contents of ~/franksdep in hexadecimal format. You change to your home directory. How should you enter the command at the command prompt?
od -x franksdep
What is the name of the primary partition management utility that will both create GUID partitions and create file systems on those partitions?
parted
Marco recently made some partition changes, and the kernel is not recognizing the partitions. Which of the following commands should Marco use to resolve the problem?
partprobe
Which command displays all environment variables defined in the shell?
printenv
Which of the following commands initializes a physical volume?
pvcreate
You have added a third hard disk to your Linux system. What command would you use to initialize a physical volume on this disk for later use by the Logical Volume Manager?
pvcreate /dev/sdc
You are using LVM on your Linux system to manage hard disk partitions. What command do you enter to scan for physical volumes on the system?
pvscan
What is the name of the package that must be installed if you want to use disk quotas on your Linux system?
quota
Which command should you enter at the command prompt to display the current user's quota limits and disk usage?
quota
Which of the following commands displays the disk usage and quota limits for the development group?
quota -g development
Without installing an RPM package, you want to check for all of the package's uninstalled dependencies. Which of the following commands should you use?
rpm --test
Which of the following commands queries the system for all installed RPM packages?
rpm -qa
Which of the following utliites will substitute an existing string with a new string within a file?
sed
Which of the following sed commands replaces all the occurrences of the string foo with the sctring foo with the string bar in myfile.txt?
sed -e 's/foo/bar/g`myfile.txt
Which of the following sed commands replaces all the occurrences of the string foo with the string bar in myfile.txt?
sed -r 's/foo/bar/g' myfile.txt
in which phase is the root partition mounted?
OS Kernel
what is responsible for loading and executing the initial process?
OS Kernel
Which of the following functions does the dpkg --configure command perform?
Reconfigures an unpacked package
Which of the following special permissions prevents a file's deletion by anyone except the file's owner?
Sticky bit
env
Two users should have identical settings, yet one is having problems with the display oh his screen , and you suspect there is a difference in their environment variables?
Which of the following devices is a hotplug device?
USB flash drives
Which of the following desktops was the default for Ubuntu until 2017?
Unity
|
Which command operator pies the output of one command as the input of another command?
xargs
Which command overcomes the 128 KB shell command size restriction by breaking up long lists of arguments?
tee
Which command reads from standard input (stdin) and writes to both standard output (stdout) and a file?
cat
Which of the following commands can be used to combine the content of three files into a single text stream?
HISTSIZE=300
Which of the following commands configures the shell to retain 300 recently used commands in the ~.bash_history file for multiple shell sessions?
cat turbo
Which of the following commands gives the same results as cat< turbo?
cat /usr/wordlist1 /usr/wordlist2 | sort
Which of the following commands sorts the contents of the wordlist1 and wordlist2 files and sends the results to standard output?
allfiles=$(ls-a)
Which of the following commands stores the output of the ls -a command in a shell variable name allfiles?
1. myvar=`sort -r names.txt` 2. myvar=$(sort -r names.txt)
Which of the following commands utilize command substitution? (Choose TWO.)
touch /home/gshants/smile
Which of the following commands will change the /home/gshants/smilefile's modification and last accessed times to the current time?
Which of the following commands will help you to determine which version of GRUB is installed on your Linux system?
grub2-install --version grub-install -v
After updating the settings in the /etc/default/grub file, you know the changes must be written to the grub.cfg file before they will be used. What would you enter a the command prompt to write the changes to the grub.cfg file?
grub2-mkconfig -o /boot/grub2/grub.cfg
Which of the following commands should a Linux user enter to see a list of all the commands the user recently ran at the command prompt?
history
You need to determine which files are associated with the metacity RPM package. Which of the following commands should you use?
rpm -ql metacity
Which of the following utilities should you use if you need to extract a file from an RPM package file?
rpm2cpio
Which sed flag or option allows you to exchange one string of characters for another string of characters in a file?
s
Which of the following utilities will substitute and existing string with a new string within a file?
sed
Which of the following commands will change the /home/gshants/smilefile's modification and last accessed times to the current time?
touch /home/gshants/smile
Which of the following commands transposes characters in a text steam?
tr
Which of the following commands transposes characters in a text stream?
tr
When managing DNF, what is the full path to the directory where you should place .repo files?
/etc/yum.repos.d/
When using templates to deploy virtual machines, one challenge is that all VMs will have the same settings, such as hostname, security identifies, and even the same IP address.
Bootstrapping
Which of the following describe the difference between the /lib/modules directory and the /usr/lib/modules directory? (Choose TWO).
Both directories contain hard links to the kernel modules. /lib/modules is available to root in single user mode, while /usr/lib/modules is available to all users.
Which of the following is the standard shell for MOST Linux computers?
Bourne-again shell (bash)
Type the full device file name for the first partition on the hard drive with the third lowest ID number.
/dev/sdc1
What is the full path and filename for the DNF configuration file?
/etc/dnf/dnf.conf
What is the full path and filename of the file that contains the file system table for a Linux system?
/etc/fstab
You need to implement disk quotas on your Linux system. You need the quotas on the / directory. What is the full path and name of the file that must be edited to implement quotas for users and groups?
/etc/fstab
You want to mount a number of filesystems each time the system is brought up. Which configuration file should hold the configuration information for the filesystems to be mounted?
/etc/fstab
A file contains the following entry: sales:x:1001:pclark,mmckay,hsamson which of the following files contains similar entries?
/etc/group
ls -l | less
A user attempts to view the contents of a directory, but the output of the ls -l command scrolls beyond the limit of one console window. Which of the following commands would allow the users to see the full listing of the directory?
sudo chattr -i report.txt && rm report.txt
A user, ljenkins, contacts the help desk about and error received while removing a file from their home directory. The user received the following error when trying to use the rm command to remove the file:
If a systemd system is configured to use multi-user.target as the default boot target, which file has a symbolic link (symlink) to the multi-user.target file?
/etc/systemd/system/default.target
What is the full path to the directory that allows you to name devices when they are connected to the system?
/etc/udev/rules.d/
What is the full path and file name for the YUM configuration file?
/etc/yum.conf
What is the full path to the directory that contains data files that change constantly, including email, print jobs, and proxy cache files?
/var
Add the command defining the alias to the appropriate shell configuration file.
Which of the following actions can be used to define a persistent alias?
cp -r /temp /home/gshant cp -R /temp /home/gshant
Which of the following command copies the entire /temp directory ith all of its files, sub- directories, and files in the sub-directories to the /home/gshant directory . (Select TWO. Each answer represents and independent solution.)
The contents of the /usr/bin directory are written to a file named /tmp/list.txt. Previous files contents are kept, and the new information is added at the end of the file.
Which of the following describes the effects of the ls -l/usr/bin>>/tmp/list.txt
G (Ctrl +G)
Which of the following nano editor keyboard shortcuts will display help text which includes a list of all keyboard shortcuts.
Which of the following desktops emulates a Windows desktop, especially in the location of the menu options and bottom panel bar?
KDE
Which of the following are popular Linux desktops? KDE CINNAMON GNOME SPICE Unity KNOPPIX Mate NX Grub
KDE Cinnamon GNOME Unity Mate
Which of the following can be used to script Anaconda and provide unattended installations using a single file?
Kickstart
You are wokring on a Linux distribution that uses systemd. Which non-symlink file in the /usr/lib/systemd/system/ directory is used to start the services necessary for multiple users, networking, and a graphical display?
graphical.target
You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files. Which of the following commands will show you the amount of free space?
df /sales
You have installed a package called mathpac with DNF. After a system upgrade, the package is not working correctly. Which of the following commands should you try first to get the package to function?
dnf update mathpac
Your system is currently running the multi-user.target. You want to enable bluetooth.service to run when graphical.target is loaded. There are two commands you must enter from a command prompt to accomplish this task. Drag the commands on the left to the appropriate step number on the right. Not all of the commands will be used.
systemctl enable bluetooth.service
You are on a systemd system. Without rebooting the system, you want to change from the currently running target unit to a target that supports networking, supports multiple users, and displays a graphical interface. What command should you enter to accomplish this task?
systemctl isolate graphical.target
You have a tape archive mounted in /dev/rmt12. You need to get a list of the file contents. Which command will list the contents?
tar -tf /dev/rmt12
You have a SCSI tape drive st0. You want to backup the contents of /var/oracle. Which command will perform the backup?
tar -vcf /dev/st0 /var/oracle
You are using LVM on your Linux system to manage the existing volumes. After adding and initializing the fourth hard drive to the system and creating a physical volume, what command should you use to add it to the backup volume group?
vgextend backup /dev/sdd
Which of the following is the BEST command to use when creating a disk image?
dd
Which of the following commands allow you to use an alternative superblock when the primary superblock has been corrupted?
e2fsck -b 16385 /dev/sda1
Which of the following commands shows the value of the LANG environmental variable currently set for the language the operating system uses?
echo $LANG
Which command displays information on all USB devices connected to the computer?
lsusb
You have installed a package called mathpac with yum. After a system upgrade, the package is not working correctly. Which of the following commands should you FIRST try to get the package to function?
yum update mathpac
What YUM command would you enter at the command prompt to download an RPM package without installing it to the system?
yumdownloader
For which of the following directories should you create separate partitions?
-1 /home -2/var
You suspect your /dev/sda3 partition is in need of repair. Which of the following e2fsck options will repair the errors without any interaction from you?
-p
You have a critical file called yearend.xls. You want to set file permissions so that only the owner of the file can modify it and only group owners can read it. Which permission listed below will accomplish that?
-rw-r----- 1 george acctg 26256 June 1 04:16 yearend.xls
You have added several new hard disks to your system. After partitioning and formatting, you have modified a configuration file to mount these new file systems automatically. You want to document the change you made. Which of the following configuration files would you document?
/etc/fstab
Which of the following directories typically hold the dynamic libraries on your system? (Select TWO).
/usr/lib/ /usr/local/lib/
During a Fedora distribution installation, you choose to add a regular user account. The only other user that has been added to the system was root. Which of the following user IDs is most likely to be associated with the new user?
1000
Which of the following vi key combinations should you press while in Insert Mode to save the file you are working on and quit?
<Esc>:wq
A user is trying to access a system using SSH, but can't connect. The user has verified the correct hostname and IP address. Which of the following should the user check to troubleshoot the issue? (Choose TWO).
Check whether the SSH daemon is running. Check the firewall to see if the default SSH port 22 is blocked.
What commonly prefeined alias is configured to run the ls -l command?
II
Command Mode
Match the vi mode on the left to the correct definition of the right.
Anna, a system administrator, created a new virtual machine that she would like to provision on additional hyper visors. Which of the following will provide a VM template that is open and can be used by hyper visors from different venders?
OVF
h
Q .10 Move the cursor one space to the left.
l
Q .10 Move the cursor one space to the right.
Command Line Mode
Q .6 The vi mode that works with the file system. Use it to save files after editing them.
/Sam
Q .7 What command would you enter while in vi command mode to find the term Sam?
:
Q. 4 After opening a file in vi, you want to switch from Command Mode to Command Line Mode. What key invokes Command Line Mode?
Which of the following will prevent a user from booting a computer, booting from removable devices, and changing UEFI/BIOS settings?
Set a UEFI/BIOS password.
Drag the permission string on the left to the category on the right. Some permissions strings will not be used.
Symbolic link: lrwxrwxrwx Hard link: -rwxr-xr-x
A user type has the following qualities: Created by default during the Linux installation Used by the system for specific roles Not used to log into the system Which of the following user types has these qualities?
System or service user
Which values are set for the following environment variables? Type echo $variable at the prompt to answer the question. The variables are case sensitive.
TERM linux
The ls command in the current working directory gives the following listing: lrwxrwxrwx 1 root root 4 2010-11-05 mydata -> shantsgems -rwxr -xr -x 1 root root 382 2010-0-05 shantsgems
The mydata file is a symbolic link to the shantsgems file.
Which component of the X11 Window System controls the placement and appearance of windows on a Linux computer?
Window Manager
Which awk/sort command combination displays a sorted list of usernames in the /etc/passwd file?
awk -F: '{ print $1 }' /etc/passwd | sort
What would you enter at the command prompt to start a new Bourne-again shell (bash) session?
bash
Which of the following commands displays information found in the second column of the tab delimited ~/smarts file?
cut -f2 ~smarts
In the /etc/shadow file, which character in the password field indicated that a standard user account is locked?
!
A friend sent you a shell script file that is 117 lines long. He says that he wants to examine code on lines 82 and 87. What command would enter while vi Command Mode to go directly to line 82?
#82
In the /etc/shadow file, which character in the password field indicates that the password is an encrypted entry?
$
Which of the following desktops were started by an Arch Linux user in response to the negative reception of GNOME 3 and continue to follow the GNOME 2 code base?
MATE
View the contents of the /root/.bash_profile. Type cat /root/.bash_profile at the prompt to answer the question. What is the last word in the file?
PATH
Which of the following yum options will display whether updates are available for RPM packages?
list updates
What YUM command would you enter at the command prompt to determine which package contains the /usr/lib/libstlport_gcc.so file?
yum whatprovides /usr/lib/libstlport_gcc.so
Before you install an RPM package, you want to verify the authenticity of the package and check the digital signature to ensure that it has not been altered. Which rpm option should you use?
--checksig
Which useradd option displays the default values specified in the /etc/default/useradd file.
-D
Which dpkg option completely removes a package and its configurations files?
-P
Which of the following are true about the ASCII character set?
-Uses a seven-bet encoding technique -Does not include international symbols
You are compressing a file with the tar utility, but you need to ensure you can uncompress the file with the bzip2 utility. Which tar option should you use during the file compression?
-j
Which file shows the currently mounted volumes?
/etc/mtab
For which of the following directories should you create separate partitions?
/var
Which of the following utilities would you typically use to lock a user account? (select two) 1) passwd 2) useradd 3) usermod 4) userdel
1) passwd 3) usermod
You have GRUB2 installed on your Linux workstation. You need to make changes to the boot menu. Which files and scripts can you edit to modify the menu entries and behavior of the boot menu?
1- /etc/default/grub 2- /etc/grub.d/40_custom
Drag the GRUB 2 file or directory on the left to the correct description on the right.
1-The GRUB 2 configuration file (non-editable)? 1-/boot/grub2/grub.cfg 2-The script file that allows menu entries to be modified?. 2- 40_custom 3-The GRUB2 directory for script files.? 3- /etc/grub.d/ 4- The GRUB 2 configuration file (editable)? 4- ./etc/default/grub/ 5- The script that identifies kernels on the root device and creates menu entries.? 5- 10_linux
Given this entry in the /etc/passwd file: pmallory:x:1001:1050:Paul Mallory:/home/pmallory:/bin/bash Which of the following is the user ID associated with this entry.
1001
Which of the following device categories do RAM chips, CPUs, expansion cards (such as PCI cards), and standard hard disk drives belong to?
Coldplug devices
The graphics driver was recently updated on a system. Now, the graphical user interface (GUI) is not displaying, preventing the user from logging in. You need to access the system locally. Which of the following commands will access the tty2 terminal?
Ctrl+Alt+F2
You have found a patch for the Samba server on your system. The patch is a .rpm package. Which of the following procedures is the MOST correct for installing the package?
Download the package. Run rpm -Uvh on the package to install the update.
Yesterday you created a new swap area for your system. Today, after rebooting the system, you find the swap area is not mounted. What should you do to ensure the swap area is mounted each time the system boots?
Edit /etc/fstab and add the swap partition.
Which of the following represent a typical Linux backup type? (Choose FIVE.)
Incremental Differential Snapshot Full Image
myscript >> testfile.txt
Joe, a bash script developer, is trying to debug a shell script named my script. Which of the following commands would record the output of the script in a text file?
Linux-based hypervisors, such as a Xen, KVM, and QEMU, provide a software-based virtual network switch. Which of the following is an additonal feature provided by a Linux bridge?
NAT
Which of the following functions does the -d option perform when using the apt-get command to install a package?
Packages are downloaded to the system, but not installed.
Which of the following describe an OVA (open virtual appliance or application) file?
Provides a single file that archives all the files that make up an OVF using TAR.
Anaconda is an installation program that's used by Fedora, RHEL, and other distributions. Which of the following does Anaconda perform? (Upon installation what are provided?)
Provides a user interface with guided installation steps.
Keyboard shortcuts are displayed at the bottom of the editor
Q. 11 Which of the following nano text editor features makes it easier for beginners to learn that the vi test editor
Edit Mode
Q. 6 The vi mode that vim to write and edit text in the file.
pwd
Q. 7 What would you enter at the command prompt to display the current working directory?
exec ./myapp
Q.5 As a Linux user, you have access to an executable file named myapp. It's found in the current directory, but not in the command path. What would you enter at the command prompt to start the myapp file and replace the shell with myapp process?
You have previously installed the package mplayer and wish to remove it from your computer. Which of the following removal methods should you use?
Run the command rpm -e mplayer.
Roberto, a help desk technician, received a call from Sally. She was not able to change to a directory that she owns. The following is the output from the commands that Sally entered: ... ... Based on the output, which of the following describes the problem?
Sally does not have the eXecute permission as owner of the directory.
You have just installed a new program that will be used by all users on the computer. After installation, you log in as a regular user, and you try to run the program. The program stops and displays the following error: Error: not running as root What should you do so that all users can run this program?
Set the SUID on the program.
rm -r smp
The /home/gshant/smp directory contains several files. The directory and files need to be removed. The current working directory is /home/gshant. What would you enter at the command prompt to remove the smp directory and all the files it contains?
rmdir smp
The /home/gshant/smp directory is empty and needs to be removed. The current working directory is /home/gshant. What would you enter at the command prompt to remove the smp directory?
Which of the following BEST describes the role of the Linux desktop
The Linux desktop adds a series of tools and utilities to make the GUI useful.
Ted, a Linux user, creates symbolic links in his home directory to set of files in their /data directory using the ln -s command. Later, a system administrator deletes the files in the /data directory. What happens to the symbolic links that Ted created?
The symbolic links still exist in Ted's home directory, but they are useless because the link has been broken.
While reading about file system permissions in your Linux, you discover that the default permissions assigned to new files when they are created are rw-rw-rw (666 octal), and new directories are rwxrwxrwx (777 octal). However, when you create a new file in a directory called /data, the permissions assigned ar rw-r--r--. Which of the following BEST explains the results you are seeing.
The umask must be set to 0022 and therefore, block the write permission for the group owner and everyone else.
Your company is deploying ten new virtual machines. You have planned the disks pace for anticipated future growth. However, the hypervisor currently doesn't have enough disk space for the all disks that need to be allocated. You have placed an order for additional storage that will be added to the hypervisor. You must have all ten servers operational before your order will arrive. You determine that overbooking the storage space will work in the short term. Which of the following storage provisioning options should be selected?
Thin Provisioning
cp /var/log/auth.log ~/auth$(date +%A).log
Tom, a shell script developer, knows that the date + %A command gives the current local weekday name(Sunday, Monday, Tuesday, ...). Which of the following commands will copy the authentication log file, /var/log/auth.log, to a new file that with a filename that includes the current local weekday name?
Which of the following statement describes file globbing?
Using wildcards to match specific files.
A service account is created by the system or an application and cannot be used to log in to the system. Which of the following methods can be used to verify that a service account cannot login to the system?
View the entry for the service account in /etc/passswd and look for /sbin/nologin.
HISTSIZE
Which environment variable specifies the number of past commands stored in memory in the current shell sessions?
Valid inode for the file data even if the original file is deleted.
Which of the following is a characteristic of a hard link?
Distinct (non-duplicate) inode.
Which of the following is a characteristic of a symbolic link?
It contains the directory prefixes ti search for programs and files.
Which of the following statemnets BEST describes the PATH environment variable?
You need to see who has permissions to the sales_projection_q2 file. You use ls -l sales_projection_q2 and receive the following information: drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2 Which user owns this file? Which group owns this file?
Which user owns this file? pclark Which group owns this file? acct
You have been currently using a cable to connect your Linux laptop to the company network. You are now, however, required to attend several meetings a week in other parts of the building and you would like to be able to bring your laptop with you, but still need access to the the network while in that meeting. Which of the following device types would BEST meet your needs?
WiFi
Your company has implemented both Linux and Window servers. The system administrators use Windows desktops, so they have access to Windows administration tools. They routinely access the Windows servers using Windows Remote Desktop
XRDP
Mary, a system administrator, would like to deploy virtual machines, storage, and networiking in a cloud environment. Which of the following file formats would allow Mary to modularized these items as template.
YAML JSON
export COMP=1745
You need to set the COMP variable to the value 1745. Which of the following commands sets the variable so it is inherited by subsequent child shells?
ls -a /home/jerrys
You need to view the contents of the /home/jerrys directory. What would you enter at the command prompt to show all the contents, hidden files and directories?
Which of the following is valid metacharacter that can be used in the bash shell to escape or ignore the shell's special meaning for the character that immediately follows?
\
Tom, a Linux administrator, has installed a new hard disk. He creates two primary partitions, sdb1 and sdb2, and one extended partition, sdb3. He formats sdb1 with ext3 and sdb2 as a swap area. When Tom attempts to format sdb3 as a swap area, he is unable. Which of the following explains why Tom can't format sdb3?
an extended partition can't be formatted.
What would you enter at the command prompt to change the group ownership for the devstyle.txt file to rand in the present working directory?
chgrp rand devstyle.txt
You are the team lead for a marketing project. Only the members of the team3 group should have read/write permissions to a document called project_data.doc, however, you want to ensure that no one on the team will delete the document by accident. Your user name is bsmith. A long listing of the file is as follows: -rwxr-xr-x 1 bsmith team3 7260 June 22 2004 project_data.doc Which of the following commands would accomplish this?
chmod 1664 project_data.doc
You need to set the SUID permission on a file named rider. Which of the following commands will accomplish this?
chmod 4777 rider
You must change ownership of a script called myscript so that only the user owner has read/write access to it and only the user owner and group owner have execute permissions. Which of the following commands would accomplish this?
chmod 750 myscript
There is a directory called projects owned by the user cmarcela and the group rd. cmarcela has left the company. You need to give ownership of the projects directory, its files, and its subdirectories to the user ebates, who is a member of the mgmt group. Which of the following commands should you use to change the user ownership?
chown -R ebates projects
Which of the following commands make sales the group owner of the /sales/report file? (Select TWO. Each answer is an independent solution.)
chown .sales /sales/report chown :sales /sales/report
You need to see who has permissions to the sales_projection_q2 file. You use ls -l sales_projection_q2 and receive the following information: drwxr-xr-x 22 pclark acct 4096 Jun 19 15:01 sales_projection_q2 Which of the following commands will change the user owner to jyoung and the group owner to sales?
chown jyoung:sales /home/sales/sales_projection_q2
A Linux administrator is logged in as root and needs to copy a file name letter.doc from the USB flash drive mounted under /media/usb.
cp /media/usb/letter.doc /root
A system administrator is configuring a package manager to access packages from a local repository and take advantage of a local repository's transfer speed. Which of the following commands can be used to pull packages from an online repository? (Select THREE).
curl wget rsync
Which of the following commands displays information found in the second column of the tab delimited ~/smarts file?
cut -f2 ~/smarts
Which utility allows you to make an exact copy of a file?
dd
You are requested to help a user who reports that he has no more local storage space. You got to his system and log in as the root user. Which of the following commands will display the available disk space on all partitions? (Select TWO).
df -h df
You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files.
df /sales
A technician recently added a new disk drive to a system, and the drive is not available. Which of the following commands scans the host bus adapter (HBA) and detects the newly added drive?
echo "- - -: > /sys/class/scsi_host0/scan
You want to view the number of commands your bash shell is set to save by examining the current HIST SIZE environment variables.
echo $HISTSIZE
Which of the following commands would display this output?
echo Frank said, \"Linux is fun\!\"
Which of the following commands/command sequences can be used to view the partition information on the first hard disk? (Select TWO.)
fdisk -l fdisk /dev/sda, then press p
Which of the following commands partitions the second hard disk on a Linux system?
fdisk /dev/sdb
Which of the following commands finds files with the .txt extension in the /home/gshantdirectory?
find /home/gshant -name '*txt'
Which of the following commands is used to find a specific file on a Linux system?
locate
Which of the following commands creates a logical volume named video from the home volume group and configures it with 2 TB of disk space?
lvcreate -L 2T -n video home
You are using LVM on your Linux system to manage the existing volumes. What command do you enter to scan for logical volumes on the system?
lvscan
One of the Linux servers for the accounting departments needs additional memory to fix recent performance issues. You have ordered the memory, but it is back ordered, so you decide to add a swap partition to the server to help the performance issues immediately. Which of the following commands will add a swap partition to the first partition on the third hard drive?
mkswap /dev/sdc1
You just got a new input device named GamePad that you want to use on your computer. You don't think that the GamePad driver (i.e., kernel module) was compiled into the kernel of your Linux distribution. Which of the following commands will install the driver {gamepad.ko) into the kernel? (Select two.)
modprobe gamepad insmod gamepad.ko
Which of the following commands will check for dependencies before loading the gameport module in the kernel?
modprobe gameport
A user is trying to access a file system mounted at /mnt/sdb1, but receives an error that states No such file or directory. Which commands can you use to see the current mount points? (Select TWO).
mount df
A number of new file systems have been added to the server and you want them to be active now. You also do not want to bring the server down. Which command makes the changes active?
mount -a
Which of the following statements BEST describes the nl -s ": " my file command?
nl adds the number, a colon, and a space to the front of each line in the file
Which of the following statements BEST describes the nl -s ":" myfile command?
nl adds the number, a colon, and a space to the front of each line in the file.
You want to display the contents of ~ franksdep in hexa decimal format.
od -x franksdep
You suspect that the gshant user account is locked, Which command will show the status of the user account? (enter the command as if at the command prompt)
passwd -S gshant
Which of the following commands merges two files on a line-by-line bases and separate each line with a tab?
paste
Which of the following commands merges two files on a line-by-line basis and separate each line with a tab?
paste
You are an IT consultant for a small company. The company wants to increase the security of their small network. You want to move their passwords from the /etc/passwd file to the /etc/shadow file. Which of the following utilities will BEST accomplish this task?
pwconv
After creating the aquota.user and aquota.group files in the /home directory, what command should you enter to enable quotas for the /home directory?
quotaon /home
Which of the following sets of permissions represent the minimal permissions required to allow a user to list the contents of a directory?
r-x
Within the /var directory is a sub-directory named backup. Ken, a Linux administrator, needs to delete the directory and any files that it contains. He changes directory focus to /var. Which of the following commands deletes the directory named backup and any file it contains?
rm -r backup
Which of the following partitions functions as virtual memory for a Linux system?
swap
You need to create a large number of files, and you would like to ensure that youm the user owner, are the only person that has read and write permissions to the files. The files will be located in a number of different directories that already contain other files you don't want modified. How could you BEST create these files within the correct permissions using the LEAST amount of effort?
type umask 0066 to change your umask.
A user calls the help desk. Each time he creates a new text file, permissions of 640 are applied to the file, and he use chmod to set them to 644. What command should you enter in the user's profile to set the default permission for newly created files to 644?
umask 0022
Partition /dev/sdb2 is mounted to /mnt/temp. You need to unmount /dev/sdb2. Which commands would you use? (Choose two.)
umount /dev/sdb2 umount /mnt/temp
Which of the following apt-cache options will show the missing dependencies in the package cache?
unment
After using the locat command, you discover some of your files are not being listed in the search results. What would you enter at the command prompt to update the var/log/locatedb file?
updatedb
Which of the following apt-get options will upgrade all installed packages to the latest versions using the information in /etc/apt/sources.list ?
upgrade
The user emcmann has been transferred from the accounts payable department. She was assigned to several secondary groups that gave her rights to sensitive files and systems. You need to remove her from all her current secondary groups right away. Enter the command that will remove emcmann from all her secondary groups.
usermod -G "" emcmann
You have just created the lsmith user account and need to assign this new user to the secondary groups admin and acct. Enter the command you would use to add lsmith to the admin and acct secondary groups.
usermod -G acct,admin lsmith
You need to modify the group membership for the user cjensen user to add the staff group to his list of secondary group memberships. He needs to keep his existing secondary group memberships. Which command option will add cjensen to the staff group without removing him from the other groups?
usermod -aG staff cjensen
Which of the following command line tools are used o control virtualization by using arguments such as list, start, and shutdown?
virsh
At the command prompt, how would you enter a command that will print the line count, word count, and byte count respectively in the /home/gshant/servepath file?
wc -lwc /home/gshant/servepath
Which of the following commands searches man pages for a specific keyword (Select Three.)
whatis man -k apropos
You use a program on your Linux system called photorec. What would you enter at the command prompt to display the path to the photorec binary file?
which photorec
Which of the following files would you use to create aliases that are applied when a specific user starts a bash session? (Select TWO. Each answer is an independent solution.) /etc/profile /etc/bashrc ~/.bashrc ~/.profile ~/.bash_logut
~/.bashrc ~/.profile
Which of the following desktops was derived from GNOME 3, follows traditional desktops metaphor conventions, and is the primary desktop environment for the Mint distribution?
Cinnamon
When implementing a network gateway, implementing a firewall, or increasing performance, multiple NICs can be added to a computer. Which of the following can be implemented on VMs to provide this capability?
Dual-home NICs
Anaconda is an installation program that's used by Fedora, RHEL, and other distributions. Which of the following does Anaconda perform? (What does it do inside the computer)
Identifies the computer's hardware.
Which of the following functions does the rpm -V command perform?
Verifies that an RPM package is free from errors.
You are working on a Debian distribution of Linux. You want to retrieve information about the Debian package database on the system. Without using any command options, what command will provide the information you need?
apt-cache
You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all the dependencies for the package. Without using any command options, what command should you use?
apt-get
Which of the following commands can be used to combine the content of three files into a single text stream?
cat
A Linux administrator is logged in as root and needs to copy a file name letter.doc from the USB flash drive mounted under /media/usb.?
cp /media/usb/letter.doc /root
You used DNF to list the ruby packages that are available to install. You see that there is a package available that is called ruby. What DNF command do you use to install this ruby package?
dnf install ruby
You have users who need to do some programming projects in the Ruby programming language. What DNF command do you use to find out if there is a ruby package available to install on the Linux server?
dnf list ruby
What dpkg command would you enter at the command prompt to list information about a currently installed Debian package?
dpkg -p
You are working with the RPM package acroread-8.1.3-51.6.i586.rpm. Match the naming convention term on the left with the associated file name segment on the right.
i586 ; Architecture type 8.1.3 ; Version number acroread ; Package name 51.6 ; Release number
What would you enter at the command prompt without options to reload the library cache every time libraries are added or removed and update the symbolic links?
ldconfig
You are attempting to install an RPM package on your Linux system, but the system tells you that a newer package is already installed. Which of the following commands will install the RPM package over the existing installed package?
rpm --force
You are attempting to install an RPM package on your Linux system, but the system tells you the package has dependencies that are not installed. What would you enter at the command prompt to force RPM to override the need to install the dependencies?
rpm --nodeps
What command will upgrade an RPM package only if an earlier version is already installed on the system?
rpm -F
You have an RPM package called mathpac that is not working correctly. You have downloaded the latest package. Which of the following commands should you use to install the latest mathpac package?
rpm -U mathpac
You have just finished installing an updated kernel on your email server that has been patched to solve a security vulnerability and wish to reboot as soon as possible. This is a busy time of day, and you do not want the server down any longer than necessary.
shutdown -f
You are experiencing a problem with one particular server. Each time it boots, it goes into single-user mode even though no warnings or errors are reported. You want to verify that is configured to boot to the multi-user.target unit, just as all your other servers are. This system is running systemd
systemctl get-default
Your system is currently running the multi-user.target. What would you enter at command prompt to find out whether the atd.service is configured to start every time the multi-user.target is loaded?
systemctl is-enabled atd.service
which screen lets you choose if you have multiple OS's installed?
the secondary boot loader
At the command prompt, how would you enter a command that will print the line count, word count, and byte count respectively in the /home/gshant/serverpath file?
wc -lwc /home/gshant/servepath
Which of the following is displayed when the uname -a command is run?
All system information
Lynda, a network administrator, has been tasked with connecting the VMs on multiple virtual machine hosts in a way that doesn't expose the VMs to the external network.
An overlay network
/etc/profile ~./bash_profile
Anna, a system administrator, wants to set a global variable that can be used each time she logs. Currently, she has to set the variable each time a terminal is opened. Which of the following files would need to be modified to make a global variable persistent? (Choose TWO.)
Type the full device file name for the second partition on the hard drive with the lowest ID number.
/dev/sda2
You need to identify which user accounts on the Linux system have encrypted passwords. Which character in the password field of the /etc/shadow file indicates that an encrypted password is set for the user account?
$
Which of the following dpkg options will install a package recursively?
-R
Which of the following statements Best describes the purpose of the Filesystem Hierarchy Standard (FHS)? select 2 options
-The FHS allows software installation routines to predict where to place configuration files. -The FHS allows users to predict where to find system configuration files.
Which of the following repquota options will give quota limits and disk usage for all file systems listed in /etc/mtab?
-a
You are inspecting the superblocks and block information on your file system. You need dumpe2fs to display only the blocks that are reserved as bad in the file system. Which of the following options should you use?
-b
Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility. Which of the following debugfs options should you use to examine the file system?
-c
Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility. Which debugfs option should you use to examine the file system?
-c
You need to view the files within /home/gshant/expfile.bz2, but you want to leave the compressed file unchanged. What bzip2 option should you use?
-k
Ann, a Linux script developer, is trying to debug a shell script that has the command ls -s in it. She suspects that an error is occurring, and she wants to send the results of the operation and any errors to a file name ~/Friday in order to examine it later
.ls-s &> ~/Friday
You have an application whose owner is root, but you want all users to execute the application with root user permissions. Which of the following examples shows correct usage of the SUID flag?
-rwsr--r-- 3 root sys 73748 Nov 2 2005 /usr/bin/applicationx
You have an application whose group is sys, but you want all users, whether or not they are members of the sysadmin group, to execute the application with sysadmin group permissions. Which of the following examples shows correct usage of the SGID flag?
-rwxr-sr-- 3 root sysadmin 73748 Nov 2 2005 /usr/bin/applicationx
A user has requested that each time she presents credentials to log in, a particular entry be written to a log file. This action will only apply to her, and she is using the bash shell. Which of the following configuration files is the BEST to modify to enable this action? .bashrc .sh /etc/profile .profile
.profile
During installation, you need to make sure there is plenty of hard disk space allocated to the partition that is going that is going to hold the entire Linux operating system.
/
The /etc/shells file contains a list of shells that are available on the current systems. Type cat /etc/shells at the prompt to answer the following question: Which of the shells listed below is not available on the system?
/bin/ksh
Which directory contains the configuration file for GRUB 2
/boot/grub2/
You have installed a new Linux system and you want to make a baseline of system performance. Which of the following files contain baseline information? (Select TWO).
/cpuinfo /meminfo
Under the Filesystem Hierarchy Standard (FHS), what is the full path to the directory that contains the device files for a Linux system?
/dev
What is the file path and name of the directory that contains device files for hard drives, optical drives, and USB devices?
/dev
You are preparing to mount a device local to your system. Which directory holds the device files?
/dev
You need to configure your Linux system to allow only the root user account to mount the CD-ROM device. Which of the following options should you add to the /etc/fstab file?
/dev/cdrom /media/cdrom -t iso9660 ro,nouser,noauto
What is the full path to the directory that contains a set of configuration file templates that are copied into a new user's home directory when it is created?
/etc/skel
When managing YUM, what is the full path to the directory where you should place .repo files?
/etc/yum.repos.d/
You are in the process of manually creating the partitions during a Linux installation. Knowing that users will often require a lot of space to store their files, which of the following directories (or mount points) SHOULD be configured on its own partition?
/home
Which of the following directories is specified by Filesystem Hierarchy Standard (FHS) as a mount point for removable media, such as USB storage media, DVDs, CD-ROMs, and Zip disks?
/media
According to the Filesystem Hierarchy Standard (FHS), which of the following directories contains information about the system state and processes?
/proc
What is the full path to the directory that contains information about the system state and process
/proc
Which of the following is the full path and filename of the file that contains information about which interrupt request (IRQ) channels are being used by each hardware device on the system?
/proc/interrupts
If not cleared out, log files can eventually consume a large amount of data, sometimes filling a drive to its capacity. If the log files are on the same partition as the operating system, this could potentially bring down a Linux computer.
/var
During installation, you must create a root user account for the system. Which of the following user account number does this account use? 0
0
Match the correct term on the left with the definition on the right. 1 Allows processes to communicate with each other and notify them of new hotplug devices 2 Provides all applications with data about current hardware 3 Dynamically creates device files in a virtual file system as devices are added and removed 4 Exports information about hotplug devices so that other utilities can access the information
1 Allows processes to communicate with each other and notify them of new hotplug devices D-Bus 2 Provides all applications with data about current hardware hald 3 Dynamically creates device files in a virtual file system as devices are added and removed /udev 4 Exports information about hotplug devices so that other utilities can access the information sysfs
Match the correct /proc directory content on the left with the description on the right. 1) Displays the boot options that were given to the kernel at boot time. 2) Displays information about the computer's CPU. 3) Displays information about the current kernel version. 4) Displays all the direct memory access assignments for the computer.
1) Displays the boot options that were given to the kernel at boot time. cmdline 2) Displays information about the computer's CPU. cpuinfo 3) Displays information about the current kernel version. version 4) Displays all the direct memory access assignments for the computer. dma
Match the term on the left with its characteristic on the right. (Each term can be used more than once.) Dynamic Library Static Library
1) Has a .so or .so.version extension. Dynamic Library 2) Increases the size of the application. Static Library 3) Has an .a filename extension. Static Library 4) Is typically stored in /usr/lib/ and /usr/local/lib/. Dynamic Library 5) Can degrade program load time if the library is already in use by another program. Dynamic Library
A user with an account name of larry has just been terminated from the company. There is good reason to believe that the user will attempt to access and damage the files in the system in the very near future. Which command below will disable or remove the user account from the system and remove his home directory?
1) userdel -r larry
Which of the following commands is used to find a specific file on a Linux system?
1- find 2-locate
An employee named Bob Smith, with a user name of bsmith, has left the company. You have been instructed by your supervisor to delete his user account along with his home directory. Which of the following commands would produce the required outcome? (choose all that apply)(2)
3) userdel -r bsmith 4) userdel bsmith;rm -rf /home/bsmith
Which of the following is the maximum number of primary partitions that can be created on a single hard disk drive?
4
One of your users Karen Scott, has recently married and is now Karen Jones. She has requested that her username be changed from kscott to kjones, but no other values change. Which of the following commands will accomplish this? 1) usermod -l kscott kjones 2) usermod -u kscott kjones 3) usermod -u kjones kscott 4) usermod -l kjones kscott
4) usermod -l kjones kscott
Which of the following sets of octal permissions would allow everyone to execute the following file as if they were the root user? -rwxr-xr-x 1 root root 8045 July 24 2018 myscript
4755
You are called into the office of a newly hired manager. He has copied a file from his old place of work onto his new workstation, but is now receiving an error message that access is denied each time he tries to access the file. He is not the owner of the file or a member of the group the file is associated with. Which of the following represents the LEAST set of file permissions needed for him to be able to read and write to the file?
666
As an administrator, you are tasked with configuring an Apache web server by modifying the /etc/apache2/apache2.conf file. You open the file in vi. As you're looking at the file, you knock your spill-proof drink container onto the keyboard. It rolls over several keys as you try to pick it up. Now there are extra characters everywhere in the text buffer. Which of the following commands can you use to exit vi without saving any changes that were made to the text buffer?
:q!
Which of the following statements best describes the function of the repquota /home -vu command?
A summary of disk usage and quotas is displayed for the users who have files within /home.
Which command displays a list of the currently defined aliases on the system?
Alias
Gloria, a Linux administrator, used the gdisk utility to create eight partitions on a new hard drive. Which of the following BEST describes the partitions Gloria has created?
All eight partitions are the same. They are simply partitions. There are no primary, extended, or logical partitions.
what is the correct order for the boot phases of a linux computer
BIOS, Boot loader, OS Kernel, Init
As a network administrator, you have had several users ask for a way in which they could connect their phones to their Linux computer, without the use of wires. Which of the following device types would BEST meet these user's needs?
Bluetooth
Anaconda is an installation program that's used by Fedora, RHEL, and other distributions. Which of the following does Anaconda perform? (After Anaconda's installation what does it create.)
Creates a file system.
Which of the following man page sections shows a list of options available for a Linux command and explains what the options do?
DESCRIPTION
You have just installed a new Linux system, which is using the Wayland system. Which of the following is VALID regarding this system?
Events captured from the keyboard are sent to the Wayland compositor and then the Wayland client, where the rendering takes place.
Which values are set for the following environment variables? Type echo $variable at the prompt to answer the question. The variables are case sensitive.
HOME /root
If you are viewing the contents of a man page, which key can you press to get back to the beginning of the page?
Home
You need the DNF utility to check specific URLs for RPM repositories. Which of the following locations should you add the URLs to?
In .repo files within the /etc/yum.repos.d/ directory
Match the locale environmental variable name on the left with the description on the right. Defines very locale setting at once while allowing futher individual customization via the LC_*settings.
LANG
Which values are set for the following environment variables? Type echo $variable at the prompt to answer the question. The variables are case sensitive.
LANG en_US.UTF-8
You are trying to pipe data from the cat command to another program, but the data output does not make sense. You believe that the system's locale is corrupting the output. To test your hypothesis, you decide to change a locale environment variable.
LANG=C
Match the locale environmental variable name on the left with the description on the right. Specifically used an override for LC_MESSAGES
LANGUAGE
Match the locale environmental variable name on the left with the description on the right. A special variable for overriding every other environment setting. It sets all locales to the same setting.
LC_ALL
Match the locale environmental variable name on the left with the description on the right. Specifies personal name format.
LC_NAME
Which environment variable specifies additional directories to search for library files not listed in /etc/ld.so.conf?
LD_LIBRARY_PATH
You attempt to unmount a volume using the umount /dev/sdd3 command, but you receive a device is busy error message. Which of the following strategies will be MOST likely to allow you to unmount the file system? (Select TWO).
Make sure your current directory is not on the file system and try to unmount again. Find and close any open files on the file system, and try to unmount again.
Alias logcheck="cd /home/mbrown/logs;ls-al"
Mary Brown is a Linux user with the username mbrown. Mary has a directory named logs in her home directory that is regularly updated with new log files when certain system events occur. She runs the following commands several times a week to check this directory:
Which of the following methods should you use to configure dynamic libraries on a Linux system? (Select TWO).
Modify /etc/ld.so.conf to add the path of the libraries. Use the LD_LIBRARY_PATH environment variable to specify additional directories to search for library files.
You have a systemd Linux system that is configured to boot into the graphical.target by default. The system seems to be running much slower than normal. You need to reboot the system, but you want it to boot into a single-user target unit with no network access so you can preform troubleshooting tasks and get the system running normally again. What should you do before your reboot?
Set the default boot target to rescue.target.
Which of the following statements BEST describes the effects of the split -50 -d -a 3 AllNames FiftyNames- command if there are 103 lines and 240 bytes in the file?
The AllNames file is split into three files containing 50 lines or less. The output is FiftyNames-001, FiftyNames-002, and FIftyNames-003.
Which of the following statements BEST describes the effects of the split -50 -d -a 3 AllNamesFiftyNames- command if there are 103 lines and 240 byes in the file?
The AllNamesfiles is split into three fields containing 50 lines or less. The output is FiftyNames-001,FiftyNames-003
Which of the following commands should you use to change the location of the default file used to search for libraries?
ldconfig -f
You are viewing the /etc/passwd file, and you notice the following entry: pclark:x:1001:1001:Petunia Clark:/home/pclark:/bin/bash Which statement BEST describes this entry?
The pclark password is stored in the /etc/shadow file.
export val=5000
Tim, a technician, created a local variable named val and set it to 5000 at the bash prompt. Tim wants to use the variable in a script. But when the script is executed, the value of val is not set to 5000. Which of the following commands would allow Tim to set a global variable that would be available to the script?
Which of the following commands will display the attributes of a /boot/gub/grub.conf file?
lsattr /boot/grub/grub.conf
Which of the following commands creates a shortcut that can be used to run the fail -f /var/log/messages?
alias sysmesg="tail -f /var/log/messages"
Which of the following statements correctly describe the differences between the "apt-get remove" and "apt-get purge" commands? (Select TWO).
apt-get purge - removes the package and the configuration files. apt-get remove - removes a specified package, but leaves the configuration files.
You have installed a package called mathpac with apt-get. After a system upgrade, the package is not working correctly. Which of the following commands is the MOST correct method to get the package to work?
apt-get upgrade mathpac
Which of the following Debian package management utilities provides the front end for APT?
aptitude
Which of the following commands sorts the combine contents of the wordlist1 and wordlist2 files and send the results to both the screen and a file named sortedwordlist?
cat / usr /wordlist1 / usr / wordlist2 | sort | tee sortedwordlist
You want to restore files with the extension .cfg from an archive called configs.cpio. Which command will perform the restore?
cpio -ivd **.cfg" < /mnt/hdd2/configs.cpio
Which of the following commands allows you to use an alternative superblock when the primary superblock has been corrupted?
e2fsck -b 16385 /dev/sda1
The system requirements for a new Linux computer show that the system will primarily be used to store documents of small size. Which of the following file systems would be the MOST efficient at storing these documents on a Linux system?
ext4
Which of the following is the MOST common Linux file system?
ext4
You are accessing the /home/shants/depsmark tedxt file through a terminal connection. The file has long lines of text , yet your terminal only show's 75 characters per line. Which of the following commands will limit the lines in the file to the limits on the terminal.
fmt -w 75 /home/shants/depsmark
You are accessing the /home/shants/depsmark text file through a terminal connection. The file has long lines of text, yet your terminal only shows 75 characters per line. Which of the following commands will limit the lines in the file to the limits on the terminal?
fmt -w 75 /home/shants/depsmark
Which partition management utility can be used to define and change various different GUID partition configurations without committing the configuration to the disk until the w command is used?
gdisk
You have installed a new blank hard drive on your Linux system. This is the second drive on the system so it is represented in the file system by the /dev/sdb file. You need to create GUID partitions on this drive. What command do you use to start up the GUID disk management utility to create partitions on the /dev/sdb drive?
gdisk /dev/sdb
Which of the following commands displays the user groups that dblair is a member of?
grep -e dblair /etc/group
Which of the following commands displays all the lines in the blue_and_gold file that do not contain the word 'Karen'?
grep -v Karen blue_and_gold
An application named ABCD is generating system errors when it starts. Which of the following commands searches the system message log fiel for these errors?
grep ABCD /var/log/messages
Which of the following commands displays all lines within the MTS file that have the word "world" with them?
grep world MTS
You are the administrator for a small company. You need to create a new group for users in the sales department. You need to name the group sales. Which command will accomplish this task?
groupadd sales
Which of the following commands will display information about the RAID devices on the computer?
hwinfo --listmd
Which of the following commands reloads the libraries for the /bin/bash executable, but does not update the cache?
ldconfig -N /bin/bash
What would you enter at the command prompt to display the shared library information for executables?
ldd
Which of the following commands displays all of the shared library information for the /bin/bashexecutable?
ldd -v /bin/bash
Which of the following is an open-source application programming interface (API) that's used for creating, monitoring, migrating, starting and stopping virtual machines?
libvirt
Which of the following DNF options will display whether updates are available for RPM packages?
list updates
Your Linux system was installed for you while you were living in the United States of America. You have since been transferred to satellite office located in Wood Walton, England, and have taken your computer with you. Since England uses the larger A4 paper size, you would like to change the LC_PAPER locale environment variable.
localectl
Which of the following utilities would you use to search a path for files that match a given name?
locate
A user attempts to view the contents of a directory, but the output of the ls -l command scrolls beyond the limit of one console window. Which of the following commands would allow the users to see the full listing of the directory?
ls -l | less
You want to archive some configuration files to the floppy drive. You are using the cpio utility. Which line will create the archive on the floppy?
ls /etc/*.conf | cpio -ovd > /dev/rfd0
Anna is attempting to unmount the mount point /mnt/daata. The umount command failed and displayed error message stating that the device is busy. Anna suspects there may be an open file causing the issue. Which of the following commands will show Anna a list of open files?
lsof
Anna is attempting to unmount the mount point /mnt/data. The umount command failed and displayed error message stating that the device is busy. Anna suspects there may be an open file causing the issue. Which of the following commands will show Anna a list of open files?
lsof
Which of the following commands will display information about the PCI devices installed on the system?
lspci
You are working on a Linux distribution that uses systemmd. Which file in the /usr/lib/systemd/system/ directory is text-based and used to start the services that support multiple users and support networking?
multi-user.target
Which of the following commands will move a file from one location to another?
mv
Which of the following commands will change the /home/pmallory/reportsfile's name to reports.bak?
mv /home/pmallory/reports //home/pmallory/reports.bak
Which of the following commands will change the /home/pmallory/reportsfile's name to reports.bak?
mv /home/pmallory/reports /home/pmallory/reports.bak
You need to install the package apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm Which of the following commands will perform the installation? (Select TWO).
rpm -ih apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm & rpm -Uh apt-0.5.15cnc6-1.1.fc2.fr.i386.rpm
You have informed users that you need to bring the machine down at the end of the day to perform routine maintenance. However, prior to shutting the system down, you want to sen a message to users to give them fifteen minutes to save data and exit the system.
shutdown -h +15 It is time for a shutdown!
Which of the following commands will display each line in a text file in alphabetic order?
sort
A user, ljenkins, contacts the help desk about and error received while removing a file from their home directory. The user received the following error when trying to use the rm command to remove the file:
sudo chattr -i report.txt && rm report.txt
You have a Linux system with two activated swap partitions, sda3 and sdb2. Which of the following commands can you use to deactivate only the sda3 swap partition?
swapoff /dev/sda3
You created a swap area on sda3, but it is not activated. What command will activate this swap partition?
swapon /dev/sda3
Your system is currently running the multi-user.target. You want to enable bluetooth.service to run when graphical.target is loaded. There are two commands you must enter from a command prompt to accomplish this task. Drag the commands on the left to the appropriate step number on the right. Not all of the commands will be used.
systemctl isolate graphical.target
You are experiencing a problem with a network server. You want to bring the system down and try reseating the cards within it before restarting it.
systemctl isolate poweroff.target
You need to perform some system maintenance on a systemd system, and you want to prevent users from logging on while you do so.
systemctl isolate rescue.target
After making changes to the configuration of anaconda.service, you must make those changes take effect. Which single command should you enter to make this service use the new configuration?
systemctl restart anaconda.service
The current default boot target is a multi-user.target, but you want to use this system as a desktop workstation. You need a boot target that supports multiple users, supports networking, and has a graphical display. This is a systemd system. What command should you enter to change the default boot target to one that meets these needs?
systemctl set-default graphical.target
After getting calls about users not being able to print, you check the status of cups.service and find that is is not running. What would you enter at the command prompt to run cups.service?
systemctl start cups.service
Which of the following is responsible for bringing up other units and services when boot targets are changed?
systemd
You need to back up Jane's files in her /home/user/jane directory. Which command will create an archive of these files in the /root directory? (Select TWO).
tar -czvf /root/jane.tgz /home/user/jane tar -cvf /root/jane.tar /home/user/jane
You have an xfs file system in your Linux computer. You need to display the XFS file system parameters, such as the block size and inode data structures. Which of the following commands should you use?
xfs_info xfs_growfs -n
You have an XFS file system in your Linux system represented by /deb/sdb1. You need to copy all the filenames on the drive to the /reviewxfs file. You must able to read the filenames in the /reviexfs file. Which of the following commands should you use?
xfs_metadump -o /dev/sdb1 /reviewxfs
You used YUM to list the python packages that are available to install. You see that there is a package available that is called python. What YUM command do you use to install this python package?
yum install python
You have users who need to do some programming projects in the Python programming language. What yum command should you use to find out if there is a Python package available to install on the Linux server?
yum list python
which command operator pipes the output of one command as the input of another command?
|
After a user starts a bash session and the script in / etc/profile is applied, if all of the following files exist, which will be run next? ~ /.bash_login ~/.bash_logout ~/.bash_profile ~/.profile
~/.bash_profile