Uploaded by ausnickol

Linux+ Exam

advertisement
*** HIGHLIGHT YOUR ANSWER IN BOLD ***
EX: A. /etc/test
1 . Which bash configuration files are used for non-login bash shell sessions? (Choose two.)
A. /etc/profile
B. /etc/bashrc
C. ~/.bashrc
D. ~/.profile
E. ~/.bash_profile
2 . You need more information on the ls command. Which commands can be used to learn how to use
this utility? (Choose two.)
A. ls --help
B. help ls
C. ls -h
D. man ls
3 . You’ve opened the /var/opt/myapp/settings.txt file in the vi editor. You need to enter new text
into the file. Which key should you press to switch into Insert mode from Normal or “Command” mode?
A. I
B. A
C. O
D. R
4 . YAML files used to configure network cards to use DHCP or set up static IP addressing can be found
where?
A. /etc/X11
B. /etc/yum
C. /etc/yum.repos.d
D. /etc/netplan
5 . To create a new directory in a user’s home directory named MyFiles, you use which of the following
commands?
A. mkdir ~/myfiles
B. mkdir ~/MyFiles
C. md ~/myFiles
D. mkdir ~ MyFiles
6 . The sealert utility is used to determine that a user cannot access a file. Which command would aid
in troubleshooting by showing access settings?
A. ls -s
B. ls -Z
C. ls -l
D. restorecon
7 . Which vi command-line mode commands can be used to save changes to the current file being
edited and close the vi editor? (Choose three.)
A. ZZ
B. :wq
C. :q
D. :q!
E. :x
8 . You need to change the permissions of a file named widgets.odt such that the file owner can edit
the file, but no other users on the system will be allowed to view or modify it. Which command will do
this?
A. chmod 660 widgets.odt
B. chmod 640 widgets.odt
C. chmod 777 widgets.odt
D. chmod 600 widgets.odt
7 . Which vi command-line mode commands can be used to save changes to the current file being
edited and close the vi editor? (Choose three.)
A. ZZ
B. :wq
C. :q
D. :q!
E. :x
8 . You need to change the permissions of a file named widgets.odt such that the file owner can edit
the file, but no other users on the system will be allowed to view or modify it. Which command will do
this?
A. chmod 660 widgets.odt
B. chmod 640 widgets.odt
C. chmod 777 widgets.odt
D. chmod 600 widgets.odt
9 . You need to change the permissions of a file named projectx.odt such that the file owner can edit
the file, users who are members of the group that owns the file can view and edit it, and users who are
not owners and don’t belong to the owning group cannot view or modify it. Which command will do
this?
A. chmod 660 projectx.odt
B. chmod 640 projectx.odt
C. chmod 777 projectx.odt
D. chmod 644 projectx.odt
10 . Which usermod command options must be used to add user accounts as members of a secondary
group? (Choose two.)
A. -a
B. -s
C. -g
D. -p
E. -G
11 . Which control structure processes over and over as long as a specified condition evaluates to false
?
A. while
B. until
C. for
D. case
12 . For designing the implementation of a new Linux server in the company’s network, the server will
function as an internal file and print server for the organization. Employees will save their work-related
files in shared storage locations on the server, and print jobs for shared printers will be managed by the
server as well. What services should be included in the specifications? (Choose two.)
A. Apache
B. MySQL
C.
Samba
D. Telnet
E. Pure-FTP
F. CUPS
13 . This process takes over and kills processes that use too much memory because they score too high
under this process’s monitoring system?
A. BOMB
B. BOM
C. KaBOOM
D. OOM
9 . You need to change the permissions of a file named projectx.odt such that the file owner can edit
the file, users who are members of the group that owns the file can view and edit it, and users who are
not owners and don’t belong to the owning group cannot view or modify it. Which command will do
this?
A. chmod 660 projectx.odt
B. chmod 640 projectx.odt
C. chmod 777 projectx.odt
D. chmod 644 projectx.odt
10 . Which usermod command options must be used to add user accounts as members of a secondary
group? (Choose two.)
A. -a
B. -s
C. -g
D. -p
E. -G
11 . Which control structure processes over and over as long as a specified condition evaluates to false
?
A. while
B. until
C. for
D. case
12 . For designing the implementation of a new Linux server in the company’s network, the server will
function as an internal file and print server for the organization. Employees will save their work-related
files in shared storage locations on the server, and print jobs for shared printers will be managed by the
server as well. What services should be included in the specifications? (Choose two.)
A. Apache
B. MySQL
C.
Samba
D. Telnet
E. Pure-FTP
F. CUPS
13 . This process takes over and kills processes that use too much memory because they score too high
under this process’s monitoring system?
A. BOMB
B.
BOM
C. KaBOOM
D. OOM
14 . Which tools can be used to check for open network ports? (Choose two.)
A. nmap
B. lsof
C. pwconv
D. ssh
E. cpio
15 . To insert a new kernel module into a Linux system that has no dependencies, which tool is best to
use to utilize the module?
A. dmesg
B. modinfo
C. insmod
D. depmod
16 . Which of the following commands is used to find the domain’s mail server?
A. dig
B. ping
C. traceroute
D. route
17 . Which command updates every few seconds, displaying the routers that packets use to reach their
destination within a GUI?
A. mtr
B. traceroute
C. tracert
D. iftop
18 . When local authentication is used on a Linux system, which file contains the passwords for the
user accounts?
A. /etc/passwd
B. /etc/group
C. /etc/gshadow
D. /etc/shadow
19 . Consider the following entry from the /etc/passwd file: algreer:x:1001:100:Albert
Greer:/home/algreer:/bin/bash. What user ID (UID) has been assigned to this user account?
A. algreer
B. 1001
C. 100
D. Albert Greer
20 . Consider the following entry from the /etc/shadow file:
kmorgan:$2a$05$KL1DbTBqpSEMiL.2FoI3ue4bdyR.eL6GMKs7MU6.nZl5SCC7/REUS:15043:1:60:7:5::. In
how many days will this account be disabled after the user’s password has expired?
A. One day
B. Seven days
C. Five days
D. Null value (never)
21 . Which of the following contains files that populate new users’ home directories created with
useradd?
A. /etc/login.defs
B. /etc/default/useradd
C. /etc/skel
D. /etc/default/grub
22 . You need to create a new account for a user named Ian Mausi on a Linux system and specify a
username of imausi, a full name of Ian Mausi, a default shell of /bin/bash, and that a home directory be
created. Which command will do this?
A. useradd -c "Ian Mausi" -m -s "/bin/bash" imausi
B. useradd -c "Ian Mausi" -m -s "/bin/bash" -u imausi
C. usermod -c "Ian Mausi" -m -s "/bin/bash" imausi
D. useradd -c "Ian Mausi" -s "/bin/bash" imausi
23 .
Which file keeps a list of intentionally untracked files that git should ignore?
A. .gitnot
B. gitnot
C. .gitignore
D. .git
24 . Command substitution, which allows a command to run within a command, is performed with
which operators?
A. ` `
B. $( )
C. ' '
D. " "
E. ${ }
25 . An administrator runs mount /dev/sdb2 /external and realizes they have made a mistake because
a filesystem was already mounted to /external. What happened to the files that were initially mounted
onto /external?
A. The files are destroyed and can only be recovered from backup tape.
B. Linux does not allow for a filesystem to be mounted onto another.
C. The files are temporarily merged with the new filesystem.
D. When the administrator runs umount /dev/sdb2 , the files will reappear unharmed.
26 . A script that requires the end user to enter the name of their supervisor will use which of the
following lines to input the user’s response into a variable named SUP?
A. read SUP
B. input SUP
C. prompt SUP
D. query SUP
27 . When a new user attempts to run a script while in their home directory using the ./runme.sh
command from the shell prompt, they see the following error:
bash: ./runme.sh: Permission denied.
Which resolution will fix this issue?
A. Copy the file to the ~/bin directory.
B. Add the home directory to the PATH environment variable.
C. Enter chmod u+x runme.sh at the shell prompt.
D. Change the shebang line of the script to #!/bin/sh .
28 . Which of the following will make for the fastest restore, and fewest number of tapes to restore,
assuming the system fails shortly after the Friday backup completes?
Key: F=Full, I=Incremental, D=Differential.
A. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-F2
B. Mon-F1, Tue-D1, Wed-I1, Thu-D2, Fri-I2
C. Mon-F1, Tue-D1, Wed-D2, Thu-D3, Fri-D4
D. Mon-F1, Tue-I1, Wed-I2, Thu-I3, Fri-I4
29 . Which of the following commands can convert a SHELL variable to an ENVIRONMENT variable?
A. env
B. export
C. set
D. chmod
30 . Which command would an administrator run to generate a sequence of numbers that starts at 1,
increments by 1, and stops at 100? (Choose all that apply.)
A. seq 1 100
B. seq 100
C. seq 1 1 100
D. seq 1-100
31 . Which command can uncover a remote user’s login name and password when they connect using
telnet or ftp?
A. dig
B. nslookup
C. tcpdump
D. ip
32 . Which protocols encrypt the network traffic? (Choose two.)
A. SSH
B. FTP
C. Telnet
D. HTTPS
E. Finger
33 . Which of the following is not a single sign-on system?
A. RADIUS
B. Kerberos
C.
TACACS+
D. Circumference
E. LDAP
34 . Consider the following IP address: 172.17.8.10/22. Which subnet mask is assigned to this address?
A. 255.255.252.0
B. 255.255.0.0
C. 255.255.255.0
D. 255.255.255.252
35 . Which command would assign the ens32 interface an IP address of 172.17.8.1 with a subnet mask
of 255.255.0.0 and a broadcast address of 172.17.255.255?
A. ip addr set ens32 172.17.8.1/255.255.0.0 bcast 172.17.255.255
B. ip addr 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
C. ip addr set 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
D. ip addr add 172.17.8.1/255.255.0.0 broadcast 172.17.255.255 dev ens32
36 . Which directive in /etc/sysconfig/network/ifcfg-eth0 is used to specify whether the interface is
automatically enabled when the system is booted?
A. STARTMODE
B. BOOTPROTO
C. IPADDR
D. USERCONTROL
37 . Which system keeps one NIC sleeping and awakens when another NIC fails?
A. Active-passive
B. Active-active
C. Load balancing
D. Aggregation
38 . For security reasons, a Linux system should resolve hostnames using the DNS server before trying
to resolve them using the /etc/hosts file. Which file is reconfigured to change the name resolver order?
A. /etc/resolv.conf
B. /etc/sysconfig/network/ifcfg-eth0
C. /etc/nsswitch.conf
D. /etc/sysconfig/services
39 . The /etc/sudoers file on your Linux system is configured by default such that users must supply
the root password when using sudo . Which commands are best used to modify the /etc/sudoers file?
(Choose two.)
A. gedit
B. vi
C. notepad
D. sudoedit
E. visudo
40 . Which setting made in the proper file in the /etc/pam.d/ directory tracks login attempts and locks
out users after multiple attempts?
A. pam_access.so
B. pam_loginuid.so
C. pam_limits.so
D. pam_tally2.so
41 . To secure the sshd service running on a Linux system from hackers, it is decided to configure it to
listen for SSH requests on a port other than the default of 22. Which directive in the
/etc/ssh/sshd_config file can do this?
A. Port
B. BindAddress
C. Protocol
D. Tunnel
42 . You want to write the stdout from the ps command to a file named myprocesses in the /tmp
directory without overwriting the existing contents of that file. Which command will do this?
A. ps < /tmp/myprocesses
B. ps > /tmp/myprocesses
C. ps < > /tmp/myprocesses
D. ps >> /tmp/myprocesses
43 . Which Linux runlevel puts the system in multiuser mode as a network server with a command-line
interface?
A. 1
B. 2
C. 3
D. 5
44 . An administrator must configure the GRUB2 bootloader such that it will boot the first operating
system in the boot menu by default unless an end user manually selects an operating system within the
timeout period. Which directive should be set within the /etc/default/grub configuration file to do this?
A. GRUB_DEFAULT=0
B. GRUB_SAVEDDEFAULT=true
C. GRUB_HIDDEN_TIMEOUT_QUIET=true
D. GRUB_CMDLINE_LINUX=saved
45 . Which commands will switch a Linux system from a graphical environment to a multiuser textbased environment? (Choose two.)
A. systemctl isolate runlevel3.target
B. systemctl isolate rescue.target
C. systemctl isolate multi-user.target
D. systemctl isolate runlevel5.target
E. systemctl isolate graphical.target
46 . The systems administrator just added a third SATA hard disk drive to the Linux system and needs
to create a GPT partition on it. Which command should they use to do this?
A. fdisk /dev/sdb
B. fdisk /dev/sdc
C. fdisk /dev/sd2
D. fdisk /dev/sd3
47 . On a Linux system with 16GB of RAM, two additional SATA hard disks (/dev/sdb and /dev/sdc) are
added to the system and a partition is created on each one. The partitions are defined as LVM physical
volumes. Which command is run to add both physical volumes to a new volume group named DATA?
A. lvscan -v
B. vgcreate DATA /dev/sdb1 /dev/sdc1
C. pvcreate /dev/sdb1
D. lvcreate -L 700G -n research DA
48 . Which statements are true about logical volumes? (Choose three.)
A. Logical volumes may be extended and resized.
B. Logical volumes and RAID are the same.
C. Logical volumes can span multiple block devices.
D. The command lvscan will display a list of logical volumes.
49 . A new Linux system was installed about a week ago. Three days ago, an administrative user
compiled and installed a new application from source code. Now, the Ethernet interface in the system
sporadically goes offline. Which command does the administrator run to see the boot messages
generated by the system when it was in a pristine state shortly after being installed?
A. journalctl -b 2
B. logger -p 2
C. journalctl -b
D. journalctl -b -2
50 . The following content is listed in which file?
# Virtual consoles
tty1
tty2
tty3
A. /etc/securetty
B. /dev/tty
C. /etc/yum.conf
D. /etc/ld.so.conf
51 . After installing GIT, which two configuration properties must you define before issuing a commit?
A. Username and e-mail address
B. MAC address and project name
C. IP address and MAC address
D. Username and password
52 . Which of the following is not a Linux Desktop Environment?
A. GNOME
B. VNC
C. Unity
D. Cinnamon
53 . You have lost the system’s root password. What must you add to the kernel line in the Grub
bootloader to change root’s password?
A. init=1
B. systemd.unit=rescue.target
C. systemd.unit=emergency.target
D. init=/bin/sh
54 . Which of the following allows the network administrator to add a default gateway of 10.5.3.1?
(Choose two.)
A. route add gateway 10.5.3.1
B. ip route add default via 10.5.3.1
C. ip route add default 10.5.3.1
D. route add default gw 10.5.3.1
E. route add default 10.5.3.1
55 . Consider the following routing table:
Given this routing table, why does the following command fail?
route add default gw 10.5.3.1
A. A default route is already defined.
B. Default routes must defined on static networks only.
C. Because there is no route to 10.5.3.1.
D. The genmask value must be 255.0.0.0.
56 . The network administrator modified a configuration file to utilize a tier 1 time server. Since making
the change, time updates via NTP are no longer occurring. What most likely has occurred?
A. Port 123 is blocked on the firewall.
B. The network administrator forgot to reboot the system.
C. The network administrator improperly ran the timedatectl command.
D. The feature is not available on Red Hat strains of Linux and must be converted to a Debian strain.
57 . Which of the following commands can change the time zone on a Linux system?
A. timedatectl
B. date
C. time
D. hwclock
58 . Which utility will convert text to audio on a Linux system, allowing blind users to hear what is
typed?
A. qt
B. daisy
C. speakeasy
D. orca
59 . Which of the following describes the columns of the /etc/fstab file best?
A. Device, mount point, filesystem type, options, fsck order, dump option
B. Device, mount point, filesystem type, options, dump option, fsck order
C. Device, mount point, options, filesystem type, dump option, fsck order
D. Mount point, device, filesystem type, options, dump option, fsck order
60 . Which are not journaled filesystems? (Choose two.)
A. Ext2
B. Ext3
C. Isofs
D. XFS
E. NTFS
61 . Which is NOT a method that results in an Ext3 type filesystem?
A. mke2fs -j /dev/sda2
B. mkfs.ext3 /dev/sdb3
C. tune2fs -t ext3 /dev/sdd4
D. mkfs -t ext3 /dev/sdc7
E. tune2fs -j /dev/sde8
62 . Which command shows who is logged in and which commands they are running?
A. whoami
B. whom
C. who
D. w
E. id
63 . Which command searches /var/log/wtmp ?
A. last
B. lastb
C. who
D. whoami
E. w
64 . Which command deletes the user account and removes the user’s files from their home directory
plus their e-mail?
A. usermod -r
B. useradd -d
C. userdel -d
D. userdel -r
65 . Which commands conduct password expiration for users? (Choose three.)
A. usermod
B. chage
C. passwd
D. password
E. shadow
66 . Which of the following is the local system time zone configuration file?
A. /etc/local/time
B. /lib/localtime
C. /usr/lib/localtime
D. /etc/localtime
E. /usr/bin/localtime
67 . Which option to the localectl command displays the current locale?
A. list-locales
B. status
C. -l
D. -s
68 . Which environment variable will override all LC_* variables?
A. LC_ALL
B. LC_NAME
C. LC_CTYPE
D. LANG
69 . Running ls -l displays the following output:
When user montrie executes the runme command, what EUID will it run at?
A. montrie
B. todd
C. root
D. manf
70 . So that new directories have a default permission of 750, and regular files have a default
permission of 640, what must the umask be? (Choose two)
A. 026
B. 0026
C. 027
D. 0027
E. 0036
F. 036
71 . User Sue gets an error message that she cannot create a new file because there is no more disk
space; however, she is well below her quota use. What is the next command she runs to view total disk
space utilization?
A. quota
B. df -i
C. du -sh
D. df -h
72 . User John notices that system performance is slowing and suspects that memory shortages are
the issue. He cannot add additional memory, so as a quick fix decides to add a swapfile to use as
additional swap space. After creating the swapfile and setting up the Linux swap area, he notices no
change in performance. What command did he most likely forget to run?
A. swapon
B. swapoff
C. mkswap
D. mount
73 . User Quincy discovers that she can get better disk drive performance by converting from cfq or
noop to deadline . What command should she run for proper conversion to deadline ?
A.
/sys/block/sda/queue/scheduler
B. cat deadline > /sys/block/sda/queue/scheduler
C. echo deadline > /sys/block/sda/queue/scheduler
D.
/sys/block/sda/queue/scheduler
74 . User Elimu is working on a bash script. The script contains this case statement:
Which command should Elimu place into the blank?
A. at
B. in
C. of
D. if
75 . User Wade is working on a bash script. The script contains this for statement:
Which command should Wade place into the blank?
A. end
B. rof
C. od
D. done
76 . User Nadia is learning how to examine disk-drive performance and learns to use iostat . To
monitor performance, she would like to see five outputs, with 10 seconds of difference between them.
Which of the following is the best way for her to accomplish this?
A. iostat 5 10
B. iostat 10 5
C. iostat --count 5 --period 10
D. iostat 10
77 . User Walter needs to examine the performance of his RAID array. He is learning how to use
mdadm , but is unsure which option to mdadm will show negative issues with the system (for example,
disk failures). Which of the following are the best ways for Walter to accomplish this? (Choose three.)
A. mdadm --build
B. mdadm --follow
C. mdadm -F
D. mdadm --monitor
78 . Users Landon and Lonnie monitor their virtual machines. One of the applications they use requires
telnet, which unfortunately uses the same escape string ^] . Which option to virsh allows them to
change the escape string to ^[ ?
A. --debug
B. --chstr
C. --esc
D. --escape
79 . System administrators Laeia and Liara work side by side examining accounting results of disk drive
performance. Laeia believes that poor performance is related to aging hard drives, and she consults with
Liara as to the next steps. Liara knows thatexact command to run to check for bad blocks. She
recommends which of the following?
A. blockcheck
B. badblocks
C. kill
D. bbcheck
80 . Sorana desires to display memory and swap utilization using the free command. Unlike iostat , sar
, and others, free does not update periodically by default. Which command can she run with free to
automatically display updates every two seconds, refreshing the screen every time?
A. period
B. watch
C. free
D. twosec
81 . User Ugo decides that he wants new files and directories below the directory work to
automatically have the same group permission as work. Which command can Ugo run to do this?
A. chmod g+s work
B. chmod +a work
C. chmod g=w work
D. chmod g=rw work
82 . Zhang is a network administrator that needs to open the firewall to allow web access. Which of
the following would do this for her?
A. firewall-cmd --zone=public --allow=http
B. firewall-cmd --zone=public --add-service=http
C. firewall-cmd --zone=public --add-service=web
D. firewall-cmd --zone=public --add=http
83 . Henri is a network administrator who is required to open new ports for NTP and HTTPd. He needs
to display the current firewall settings using iptables . Which of the following would do this for him?
A. iptables -d
B. iptables -s
C.
iptables -L
D. iptables -F
84 . Petra is a systems administrator working on a Linux system running SysV init. She runs the
following as root:
Which of the following would she run to enable auditd to start at run state 3 or 5 upon reboot?
A. chkconfig --level 35 auditd start
B. chkconfig --level 35 auditd on
C. chkconfig --level 35 start auditd
D. chkconfig --level 35 on auditd
85 . Milos is a storage administrator and notices disk space is running out on one of the logical
volumes. Before using lvextend to enlarge the volume, what must he do first?
A. Know which volume group device to extend.
B. Reboot the system.
C. Restart the logical volume service.
D. Restart meta-device management.
86 . Ushna is a cloud administrator who would like to orchestrate the setup of 500 CentOS Linux
servers. Of the tools listed, which is the one she would not choose as part of the configuration?
A. Cloud-init
B. Orchestrate
C. Anaconda
D. Kickstart
87 . Thanasi, a cloud engineer, is updating files for orchestration. Here is some sample content that he
is editing with /bin/vi:
This is most likely what type of file?
A. SAML
B. XML
C. JSON
D. YAML
88 . Teliana, a cloud engineer, is updating files for orchestration. Here is some sample content that she
is editing with /bin/vi:
This is most likely what type of file?
A. SAML
B. XML
C. JSON
D. YAML
89 . Systems administrator Juan has just enabled SELinux and is finding it is very difficult to work. He is
just testing the system and does not require it to be fully functional. What should he run that will simply
warn of any SELinux offenses?
A. setenforce permissive
B. setenforce enforcing
C. setenforce disabled
D. setenforce warning
90 . Systems administrator Katerina is running a foreground job and she would like to stop it
temporarily and have it continue later. What key sequence does she run to stop the job?
A. CTRL-C
B. CTRL-Z
C. CTRL-\
D. CTRL-S
Download