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