Ch 14, 15, 17 questions

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which control structure will process a specified number of times? A. while loop B. for loop C. until loop D. if/then/else E. case

B

Which of the following is a strong password? A. Bob3 B. TuxP3nguin C. penguin D. Castle

B

Your word processing application has left hundreds of backup files in various locations on your hard drive. These files are no longer needed and are consuming a lot of disk space. Because there are so many of them, you don't want to delete them one at a time. You tried using the find command to send a list of backup files (that all end with a ~ character) to the rm command, but the list of files was too long. What should you do? A. Pipe the output from find to the xargs command. B. Delete the files one at a time using rm. C. Pipe the output from find to the del command instead of rm. D. Pipe the output from find to the rmdir command instead of rm.

A xargs command can be used in this situation to break the data down into 128KB chunks before sending it to the rm command, which is small enough for the shell to process

Which of the following can be used to secure users' workstations? (Choose two.) A. Screensaver password B. Session lock C. Long screensaver timeout period D. Passwords written on sticky notes and hidden in a drawer E. Easy-to-remember passwords

A, B

You need to scan your Linux file system to locate all files that have either the SUID or SGID permission set. Which commands can you use to do this? (Choose two.) A. find / -type f -perm -u=s -ls B. find / -type f -perm -g=s -ls C. audit -p=SUID D. audit -p=SGID E. find / -p=s F. find / -p=g

A, B

You want to send the contents of the logfile.txt file in the current directory to the sort command to sort them alphabetically and display them on the screen. Which commands will do this? (Choose two.) A. sort < logfile.txt B. sort logfile.txt C. sort < logfile.txt -o "screen" D. sort < logfile.txt > screen E. sort -n logfile.txt

A, B

Which command can be used to print columns or fields that you specify from a file to the standard output using the tab character as a delimiter? A. cut B. pr C. fmt D. sort

A

Which control structure will keep processing over and over until a specified condition evaluates to false? A. while loop B. for loop C. until loop D. if/then/else E. case

A

Which log file contains a list of failed login attempts? A. /var/log/faillog B. /var/log/last C. /var/log/wtmp D. /var/log/login

A

Which of the following commands can be used to switch to the root user account and load root's environment variables? A. su - B. su root C. su root -e D. su -env

A

Which of the following is the default subnet mask for a Class B network? A. 255.255.0.0 B. 255.0.0.0 C. 255.255.255.0 D. 255.255.255.252

A

Which transport protocol is used by network applications that need very low latency and can tolerate a certain degree of unreliability? A. User Datagram Protocol B. Transmission Control Protocol C. Internet Protocol D. Internet Control Message Protocol

A

You need to display the text "Hello world" on the screen from within a shell script. Which command will do this? A. echo "Hello world" B. read Hello world C. writeln "Hello world" D. print "Hello world"

A

You need to use ifconfig to assign an IP address of 176.23.0.12 and a subnet mask of 255.255.0.0 to your eth0 interface. Which of the following commands will do this? A. ifconfig eth0 176.23.0.12 netmask 255.255.0.0 B. ifconfig 176.23.0.12 netmask 255.255.0.0 C. ifconfig eth0 176.23.0.12 mask 255.255.0.0 D. ifconfig dev=eth0 ipaddr=176.23.0.12 subnetmask=255.255.0.0

A

You want to display on screen the sixth, seventh, and eighth words in any line of /var/log/messages that has the term "syslog" in it. Which of the following commands will do this? A. cat /var/log/messages | awk '/syslog/ {print $6,$7,$8}' B. cat /var/log/messages | awk '/syslog/ {print 6,7,8}' C. cat /var/log/messages | awk /syslog/ {print $6,$7,$8} D. cat /var/log/messages | awk 'syslog {print 6,7,8}'

A

You want to temporarily disable the second interface in an older Linux system. Which of the following commands would you enter at the shell prompt to do this? A. ifdown eth1 B. ifdown eth0 C. ifdown eth2 D. ifconfig disable dev eth1

A

You've opened your /etc/sysconfig/network/routes file in the vi editor. You want to specify a default gateway router address of 10.200.200.254. Which of the following directives would you enter in this file to do this? A. default 10.200.200.254 B. gw_addr 10.200.200.254 C. gateway 10.200.200.254 D. router 10.200.200.254

A

Consider the following use of the seq command: seq 3 9. What sequence of numbers will this command generate? A. 3, 4, 5, 6, 7, 8, 9 B. 3, 6, 9 C. 1, 4, 7, 10, 13, 16, 19, 22, 25 D. 9, 18, 27

A The first number specifies the starting number, whereas the second number specifies the ending number in the sequence. A third number would specify an increment.

Which of the following are true of the MAC address? (Choose two.) A. It's hard-coded in the network board. B. It's logically assigned by the operating system. C. MAC addresses are globally unique. D. The network administrator can configure its value. E. It is used by the DNS server to resolve domain names.

A, C

You need to scan a Linux system with an IP address of 10.200.200.1 to determine what ports are currently open on it. What commands could you use at the shell prompt to do this? (Choose two.) A. nmap -sT 10.200.200.1 B. scan 10.200.200.1 -TCP C. scan 10.200.200.1 -UDP D. nmap -sU 10.200.200.1 E. nmap 10.200.200.1 -scan

A, D

You need to view the first few lines of the /var/log/boot.msg file. Which of the following commands will do this? (Choose two.) A. head /var/log/ boot.msg B. tail /var/log/ boot.msg C. grep -l 10 /var/log/boot.msg D. less /var/log/boot.msg E. cat /var/log/boot.msg

A, D

Which of the following are valid IP addresses that can be assigned to a network host? (Choose two.) A. 192.168.254.1 B. 11.0.0.0 C. 257.0.0.1 D. 192.345.2.1 E. 10.200.0.200

A, E

You've created a shell script in your home directory named myscript. How can you execute it? (Choose two.) A. Enter /bin/bash ~/myscript at the shell prompt. B. Enter myscript at the shell prompt. C. Select Computer | Run in the graphical desktop; then enter ~/myscript and select Run. D. Enter run ~/myscript at the shell prompt. E. Enter chmod u+x ~/myscript; then enter ~/myscript at the shell prompt.

A, E

Your users can't access your organization's e-mail server, which is hosted by a third-party vendor. You suspect that a router may be down somewhere within your organization. Given that the hostname of the e-mail server is pop.mymail.com, which of the following commands would you enter at the shell prompt to test this? (Choose two.) A. traceroute pop.mymail.com B. netstat -r pop.mymail.com C. finger pop.mymail.com D. verify pop.mymail.com E. tracepath pop.mymail.com

A, E

Consider the following IPv4 address that uses CIDR notation: 10.0.0.5/12. Which of the following subnet masks corresponds to the CIDR prefix used in this address? A. 255.0.0.0 B. 255.240.0.0 C. 255.224.0.0 D. 255.252.0.0

B

The existence of which file prevents all users except root from logging in to a Linux system? A. /root/nologin B. /etc/nologin C. /var/log/nologin D. /tmp/nologin E. /usr/sbin/nologin

B

Which command will create a new variable named TOTAL and set its type to be "integer"? A. variable -i TOTAL B. declare -i TOTAL C. declare TOTAL -t integer D. TOTAL=integer

B

Which layer of the OSI model enables the routing of data? A. Data Link B. Network C. Transport D. Session E. Application

B

Which log file contains messages from all services running on the system? A. /var/log/faillog B. /var/log/messages C. /var/log/wtmp D. /var/log/services

B

Which of the following commands will add a default gateway router address of 10.200.200.254 to your route table? A. route 10.200.200.254 B. route add default gw 10.200.200.254 C. netstat -a default 10.200.200.254 D. gateway 10.200.200.254

B

Which of the following directories contains configuration files that the xinetd daemon uses to manage network daemons (by default)? A. /var/lib/xinetd.d B. /etc/xinetd.d C. /etc/xinetd D. /srv/xinetd.d

B

Which of the following elements must be included at the beginning of every shell script? A. #Comment B. #!/bin/bash C. exit 0 D. #begin script

B

Which option in your eth0 network interface configuration file should you use to configure the NIC to get its IP address information dynamically from a DHCP server? A. STARTMODE B. BOOTPROTO C. IPADDR D. DHCP

B

You just installed a second Ethernet board in an older Linux system. What alias is assigned to this interface by default? A. eth0 B. eth1 C. eth2 D. eth3

B

You need to configure your /etc/hosts.allow file to allow only the linux1, linux2, and linux3 systems to access the vsftpd daemon on your system. Which of the following lines in the file will do this? A. vsftpd: ALL B. vsftpd: linux1, linux2, linux3 C. vsftpd: ALL EXCEPT linux1, linux2, linux3 D. vsftpd linux1, linux2, linux3

B

You need to verify that a remote host with a hostname of fs1.mycorp.com is up and running. Which of the following commands would you enter at the shell prompt to do this? A. finger fs1.mycorp.com B. ping fs1.mycorp.com C. netstat -s fs1.mycorp.com D. verify fs1.mycorp.com

B

You want to use your organization's DHCP server to dynamically assign an IP address to your ens1 network interface. Which of the following commands would you enter at the shell prompt to do this? A. dhcp ens1 B. dhclient ens1 C. get address dynamic ens1 D. ip address=dhcp dev= ens1

B

You're configuring the /etc/logrotate.d/ntp file to customize logging from the Network Time Protocol daemon on your system. You want old, archived logs to be saved using the current date in the filename extension. Which directive in the ntp file will do this? A. notifempty B. dateext C. rotate D. create

B

Which files can you check on some distributions to verify that a kernel module has been loaded and an alias created for a newly installed network board? (Choose two.) A. /etc/sysctl.conf B. /etc/modprobe.conf C. /etc/modules.conf D. /etc/drivers E. /etc/aliases

B, C

Which parameters in your network interface configuration file are required to assign an IPv6 address to the host? (Choose two.) A. ETHTOOL_OPTIONS B. PREFIXLEN C. IPADDR D. MTU E. REMOTE_IPADDR F. USERCONTROL

B, C

A workstation on your network has just sent several packets to a host that does not reside on the current network segment. The packets are sent to the default gateway router for the network segment. What happens next? A. The packets are dropped. B. The packets are translated from private IP addresses used on the internal network to the public IP address configured on the router. C. The default gateway router checks its routing table to determine where to send the packets next. D. The default gateway router performs a DNS lookup to determine the IP address of the target host.

C

From within a shell script, you need to prompt users to enter their phone number. You need to assign the value they enter into a variable named $PHONE. Which command will do this? A. read "What is your phone number?" $PHONE B. read $PHONE C. read PHONE D. ? "What is your phone number?" PHONE

C

Which command can be used from within an if/then/else structure to evaluate whether or not a specified condition is true? A. eval B. == C. test D. <>

C

Which command can be used to process a text stream and remove all instances of the tab character and replace them with eight spaces? A. cut B. replace -t 8 C. expand D. unexpand

C

Which command will evaluate to True within an if/then/else structure in a shell script if the variable num1 is less than the variable num2? A. eval num1 < num2 B. test num1 < num2 C. test num1 -lt num2 D. test "num1" != "num2" E. eval "num1" != "num2"

C

Which control structure will keep processing over and over as long as the specified condition evaluates to false? A. while loop B. for loop C. until loop D. if/then/else E. case

C

Which log file contains a list of all users who have authenticated to the Linux system, when they logged in, when they logged out, and where they logged in from? A. /var/log/faillog B. /var/log/last C. /var/log/wtmp D. /var/log/login

C

You want to configure limits on the system resources your Linux users are allowed to consume using the pam_limits PAM module. Which file do you need to edit to set these limits? A. /etc/limits.conf B. /etc/pam_limits.conf C. /etc/security/limits.conf D. /etc/security/pam_limits.conf E. /etc/sysconfig/limits.conf

C

You've configured three hosts on your network with the following IP addresses and subnet masks: • Host A IP = 23.0.0.1, Mask = 255.0.0.0 • Host B IP = 23.0.0.3, Mask = 255.255.0.0 • Host C IP = 23.0.0.4, Mask =255.255.0.0 Is this network configured properly? A. Yes, this network is configured properly. B. No, the 23.0.0.1 IP address used by Host A is a reserved IP address. C. No, Host A uses the wrong subnet mask. D. No, Host B and Host C must use the default Class A subnet mask.

C

You need to make a permanent, static IP address assignment for your eth0 network interface, which has a MAC address of 00:0C:29:B1:50:A4. Which file do you need to edit to do this, depending on your particular distribution? (Choose two.) A. /etc/sysconfig/network/eth0/ifcfg-eth-id-00:0C:29:B1:50:A4 B. /etc/sysconfig/network/00:0C:29:B1:50:A4/eth0 C. /etc/sysconfig/network/ifcfg-eth0 D. /etc/sysconfig/network/ifcfg-eth-id-00:0C:29:B1:50:A4 E. /etc/sysctl/network/ifcfg-eth-id-00:0C:29:B1:50:A4

C, D

You've just set up an e-mail server on your Linux system and enabled the SMTP and POP3 daemons to allow users to send and receive mail. Which ports must be opened in your system's host firewall to allow this? (Choose two.) A. 20 B. 21 C. 25 D. 110 E. 119 F. 80

C, D

Which command can process a file or text stream and add a number to the beginning of each new line? A. join B. paste C. fmt D. nl

D

Which of the following commands will load the updatedb process and leave it running even if the user logs out of the shell? A. updatedb B. updatedb & C. updatedb -nohup D. nohup updatedb &

D

Which of the following would be the most secure place to locate a Linux server? A. On the receptionist's front desk B. In the CIO's office C. In an unoccupied cubicle D. In a locked room

D

Which option, when used with the tail command, will cause the journalctl utility to monitor a log file for new entries? A. - B. -l C. -m D. -f

D

Which utility can you use to view your /var/log/lastlog file? A. cat B. last C. grep D. lastlog

D

You need to configure your Linux firewall to allow all network traffic addressed to the DNS service on the local system. Which command will do this? A. iptables -t filter -A INPUT -s 0/0 -p tcp -dport 53 -j DROP B. iptables -t filter -A OUTPUT -s 0/0 -p tcp -dport 53 -j ACCEPT C. iptables -t filter -A INPUT -s 0/0 -p tcp -dport 80 -j DROP D. iptables -t filter -A INPUT -s 0/0 -p tcp -dport 53 -j ACCEPT

D

You need to search for and replace the word "June" with the word "July" in a file named proj_sched.txt in your home directory and send the output to a new file named new_proj_sched.txt. Which command will do this? A. cat ~/ proj_sched.txt | sed s/June/July/ B. cat ~/ proj_sched.txt | awk s/June/July/ C. cat ~/ proj_sched.txt | awk s/June/July/ 1> new_proj_sched.txt D. cat ~/ proj_sched.txt | sed s/June/July/ 1> new_proj_sched.txt

D

You need to set password age limits for the ksanders user account. You want the minimum password age to be one day, the maximum password age to be 45 days, and the user to be warned five days prior to password expiration. Which command will do this? A. usermod -m 1 -M 45 -W 5 ksanders B. useradd -m 1 -M 45 -W 5 ksanders C. chage -M 1 -m 45 -W 5 ksanders D. chage -m 1 -M 45 -W 5 ksanders

D

You've opened your /etc/sysconfig/network/resolv.conf file in the vi editor. You want to specify a DNS server address of 10.200.200.1. Which of the following directives would you enter in this file to do this? A. host 10.200.200.1 B. resolver 10.200.200.1 C. dnsserver 10.200.200.1 D. nameserver 10.200.200.1

D

Your network interface has been assigned an IP address of 10.0.0.1. What is this binary equivalent of this decimal address? A. 10001010.00000000.00000000.00000001 B. 00001010.00000001.00000001.00000001 C. 10100000.00000000.00000000.00000001 D. 00001010.00000000.00000000.00000001

D

Which control structures are considered to be branching structures? (Choose two.) A. while loop B. for loop C. until loop D. if/then/else E. case

D, E

In a shell script, you need to prompt the user to select from one of seven different options presented with the echo command. Which control structure would best evaluate the user's input and run the appropriate set of commands? A. while loop B. for loop C. until loop D. if/then/else E. case

E


Set pelajaran terkait

Legal Concepts of the Insurance Contract

View Set

Topic #4: Nervous System and Brain Organization

View Set

Unit 6 - Algorithms - Defined Terms

View Set

The Inheritance Games Vocabulary #10

View Set