LPIC-1 (102-500) Post-Assessment Quiz Flashcards
You have developed a script that you want to run each time you log out to perform a variety of cleanup tasks. Which file should you modify in order to run this script upon logout?
a. ~/.bash_logout
b. ~/.logout
c. ~/.bashrc
d. ~/.bash_profile
a. ~/.bash_logout
What would you type into the command line to create an alias named ll that will run the ls-al command?
a. alias ll “ls -al”
b. alias ll=”ls -al”
c. alias ll:”ls -al”
d. alias ll = ls -al
b. alias ll=”ls -al”
Katherine has just run the command: COSTCENTER=”3016”. How would she be able to view the value of this variable at the command line?
a. print $COSTCENTER
b. print COSTCENTER
c. echo COSTCENTER
d. echo $COSTCENTER
d. echo $COSTCENTER
Jerome previously set an environment variable named BUSINESSUNIT. He now wants to remove that variable from shell memory. What command can he use to do this?
a. remove BUSINESSUNIT
b. rm BUSINESSUNIT
c. unset BUSINESSUNIT
d. del BUSINESSUNIT
c. unset BUSINESSUNIT
When writing a shell script, many times a logical test is used by means of an if statement to test whether certain criteria are met. What is the proper method of closing an if statement in the BASH shell?
a. a semicolon
b. fi
c. end if
d. a right curly bracket
b. fi
You are writing a shell script and need to collect input from the user and store it in a variable named CITY. Which of the following statements could you use to perform this function?
a. get CITY
b. read CITY
c. ask CITY
d. prompt CITY
b. read CITY
Which of the following is the correct list of numbers that are output from the command seq 1 10 2?
a. 1
b. 10,9,8,7,6,5,4,3,2
c. 1,11
d. 1,3,5,7,9
a. 1
Jason has written a shell script containing a while loop. What is the last line that he needs to include to complete the while loop portion of the code?
a. exit while
b. done
c. a right curly brace
d. end while
b. done
When writing a shell script, you have a command that you do not want to execute unless a prior command executed successfully. Which of the following could you use between the two commands to set up this logic?
a. ||
b. a colon
c. &&
d. a semicolon
c. &&
The most common desktop environments are KDE and GNOME. If a system administrator needs to install an alternative lightweight desktop environment that uses minimal resources, which of the following might they install?
a. XDE
b. XFCE
c. VNC
d. SPICE
b. XFCE
Which of the following settings tells a Linux system to ignore fast duplicate key presses?
a. bounce keys
b. repeat keys
c. sticky keys
d. slow keys
a. bounce keys
Which of the following accessibility options would audibly assist a user that is visually impaired?
a. click assist
b. screen reader
c. screen keyboard
d. braille display
b. screen reader
If you’re not sure about which time zone file you should use with the TZ variable, which of the following commands will prompt you to answer a series of questions to determine the name of the correct time zone file?
a. epoch
b. tzselect
c. timezone
d. localtime
b. tzselect
Which of the following commands would allow a user to ensure that the time and time zone information are obtained from a server on the Internet?
a. date
b. timedatectl set-ntp true
c. timedatectl
d. tzselect
b. timedatectl set-ntp true
Which of the following character sets allows software to use one to four 8-bit bytes to represent the characters defined by Unicode?
a. UTF-8
b. ASCII
c. ISO-646
d. ISO-8859
a. UTF-8
Which of the following commands would set the BIOS time to match the current Linux time?
a. hwclock –systohc
b. hwclock –systz
c. hwclock –getepoch
d. hwclock –hctosys
a. hwclock –systohc
Which of the following directories contains a number of individual files for each of the various timezones that can be configured on the system.
a. /usr/share/zoneinfo/
b. /etc/timezones/
c. /var/share/zoneinfo/
d. /usr/share/timezones/
a. /usr/share/zoneinfo/
What date does Linux calculate its epoch time from?
a. January 1, 1900
b. January 1, 1910
c. January 1, 1950
d. January 1, 2000
e. January 1, 1970
e. January 1, 1970
The file located in /etc/X11/ that stores the configuration information for X.org is
xorg.conf
Which of the following commands allows a user to configure their own cron jobs?
a. crontab -e
b. vi ~/.cron
c. cron –edit
d. vi /etc/crontab
a. crontab -e
Which of the following commands lists the user’s pending jobs? (Unless the user is a superuser in which case everybody’s jobs are listed.)
a. at -q
b. atq
c. atlist
d. batch
b. atq
A user on a Fedora Linux system with the username hsimpson has created several scheduled jobs using the crontab -e command. Which of the following is the file where those jobs’ information is saved?
a. /var/spool/cron/hsimpson
b. /var/cron/hsimpson
c. /tmp/cron/hsimpson
d. /tmp/spool/cron/hsimpson
a. /var/spool/cron/hsimpson
Which of the following commands would remove at job number 7? (Choose two)
a. at -r 7
b. atrm 7
c. at -r -j 7
d. atrm -j 7
a. at -r 7
b. atrm 7
Which of the following commands can be used to change the number of days before a user’s password expires that they will start to receive warning messages?
a. chage
b. usermod
c. userexpire
d. moduser
a. chage
Where does Linux store the user’s encrypted password?
a. /etc/shadow
b. /etc/group
c. /etc/skel
d. /etc/passwd
a. /etc/shadow
When a new user account is created, a home directory is also created for that user and populated with a set of files. What directory does Linux use as the template to copy these files from for the user’s new directory?
a. /etc/skel
b. /usr/local/home
c. /var/local/userdir
d. /var/templates/home
a. /etc/skel
Molly wants to change her password. What command can she use to do that?
a. pwd
b. passwd
c. chpass
d. password
b. passwd
What are the two most common logging daemons that you will find in a Linux operating system? (Choose two)
a. systemd
b. logger
c. journald
d. rsyslogd
c. journald
d. rsyslogd
Which of the following facilities used by the system log daemon specifies messages related to the printing system?
a. auth
b. lpr
c. uucp
d. daemon
b. lpr
Which two commands can add custom log file entries to the journald database?
a. journalctl
b. systemd-cat
c. writelog
d. logger
b. systemd-cat
d. logger
Rather than configuring the logging daemons, Gene wants to configure a utility Linux server to take the log files for the web server and back them up each day while creating a blank log file for the current day. He wants to automatically delete any files that are more than 30 days old. Which of the following utilities could Gene use to accomplish these goals?
a. logger
b. systemd-cat
c. journald
d. logrotate
d. logrotate
Which of the following commands will show the current list of print jobs waiting to be printed? (Choose two)
a. lpstat
b. lpq
c. lpstatus
d. lpd –queue
a. lpstat
b. lpq
John tries to print a spreadsheet that he has been working on but receives an error message that the print queue is not currently able to allow new print jobs. Which of the following does he need to do to allow print jobs to queue again?
a. cupsaccept
b. cupsallow
c. cupsenable
d. cupson
a. cupsaccept
Kendra is planning to create a separate subnet for a group of servers in the data center. In total, she needs 16 IP addresses for the new subnet. Which of the following subnets would provide the minimum number of IP addresses necessary while having the fewest number of unused addresses?
a. 10.2.3.128/25
b. 10.2.3.128/26
c. 10.2.3.128/28
d. 10.2.3.128/27
d. 10.2.3.128/27
Larry has just gotten another IP address from his company’s ISP to assign to the new web server he has just installed. Which of the following might be an IP address that could have been assigned by the ISP?
a. 10.220.30.105
b. 172.30.115.201
c. 192.168.1.155
d. 192.1.168.155
d. 192.1.168.155
Curly is modifying a .htaccess file on the web server to automatically redirect traffic coming in on an unsecure port to the secure port. Which source port is he redirecting, and to which destination port is he sending the traffic to?
a. port 143 to 993
b. port 23 to port 22
c. port 80 to port 443
d. port 110 to 995
c. port 80 to port 443
Moe knows that every computer on the network needs to have a unique name. He wants to configure the name on his new workstation. Which of the following files should he edit?
a. /etc/hostname
b. /etc/hosts
c. /etc/host
d. /etc/host.conf
a. /etc/hostname
Which of the following is a command that can be used with Network Manager to view or modify network connection information?
a. nm –ifconfig
b. nmstat
c. ifconfig
d. nmcli
d. nmcli
Bart has just changed ethernet interface eth0 to use dhcp instead of a static IP address. He needs to reload the configuration by shutting down the interface and then bringing it back up. Which of the following commands would Bart need to use to accomplish this task?
a. ifdisable eth0
b. ifup eth0
c. ifenable eth0
d. ifdown eth0
b. ifup eth0
d. ifdown eth0
Lisa knows that she can modify the /etc/hostname configuration file to set the host name on her workstation so that it boots up with that host name every time. Alternatively, she knows that she can use a command to perform this function as well. Which command should Lisa use?
a. hostname -p workstation5
b. hostnamectl set-hostname workstation5
c. hostname workstation5
d. HOSTNAME=”workstation5”
b. hostnamectl set-hostname workstation5
Marge wants to ping the IPv6 loop address on her system. Which of the following commands will accomplish this task?
a. ping –ipv6 ::1
b. ping -6 0000:0000:0000:0000:0000:0000:0000:0001
c. ping ::1
d. ping6 ::1
d. ping6 ::1
Which of the following files needs to be modified so that the contents of the file are simply the number 1 in order to enable a Linux system to operate as a router for IPv4 packets?
a. /etc/ip_forward
b. /proc/net/ip_forward
c. /etc/rc.d/ip_forward
d. /proc/sys/net/ipv4/ip_forward
d. /proc/sys/net/ipv4/ip_forward
Which of the following commands can be used to display the current routing table? (Choose two)
a. route
b. route print
c. show route
d. netstat -r
a. route
d. netstat -r
Which of the following commands can be used to display entries from the Name Service Switch libraries?
a. show entries
b. dispent
c. getent
d. display entries
c. getent
Ty wants to configure his workstation to use a certain set of DNS servers. In which file would he configure the IP addresses of the DNS servers that he wants to use?
a. /etc/rc.d/names.conf
b. /etc/resolv.conf
c. /etc/nsswitch.conf
d. /etc/hosts
b. /etc/resolv.conf
John is the mail administrator for his organization. The HR manager has asked you if a new e-mail address could be created for resumes to be e-mailed into the company without having to advertise the e-mail address with their name on it. John adds the alias to /etc/aliases. What is the next task that John needs to perform?
a. newaliases
b. aliases-reconfigure
c. alias -n resumes
d. alias –create resumes
a. newaliases
Grace is trying to pinpoint the source of connectivity issues between her workstation and a server in a remote office. Which of the following commands could help her pinpoint where the issue might be in the network?
a. net-trace
b. trace
c. traceroute
d. tracert
c. traceroute
Which of the following commands can be used to determine which network services are listening on different ports on a Linux system?
a. nbtstat
b. netstat
c. mpstat
d. stat
b. netstat