LPIC-1 (102-500) Post-Assessment Quiz Flashcards

1
Q

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

a. ~/.bash_logout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

b. alias ll=”ls -al”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

d. echo $COSTCENTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

c. unset BUSINESSUNIT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

b. fi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

b. read CITY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

a. 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

b. done

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

c. &&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

b. XFCE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

a. bounce keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

b. screen reader

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

b. tzselect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

b. timedatectl set-ntp true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

a. UTF-8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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

a. hwclock –systohc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

a. /usr/share/zoneinfo/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

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

A

e. January 1, 1970

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The file located in /etc/X11/ that stores the configuration information for X.org is

A

xorg.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

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

a. crontab -e

21
Q

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

A

b. atq

22
Q

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

a. /var/spool/cron/hsimpson

23
Q

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

a. at -r 7
b. atrm 7

24
Q

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

a. chage

25
Q

Where does Linux store the user’s encrypted password?
a. /etc/shadow
b. /etc/group
c. /etc/skel
d. /etc/passwd

A

a. /etc/shadow

26
Q

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

a. /etc/skel

27
Q

Molly wants to change her password. What command can she use to do that?
a. pwd
b. passwd
c. chpass
d. password

A

b. passwd

28
Q

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

A

c. journald
d. rsyslogd

29
Q

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

A

b. lpr

30
Q

Which two commands can add custom log file entries to the journald database?
a. journalctl
b. systemd-cat
c. writelog
d. logger

A

b. systemd-cat
d. logger

31
Q

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

A

d. logrotate

32
Q

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

a. lpstat
b. lpq

33
Q

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

a. cupsaccept

34
Q

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

A

d. 10.2.3.128/27

35
Q

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

A

d. 192.1.168.155

36
Q

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

A

c. port 80 to port 443

37
Q

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

a. /etc/hostname

38
Q

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

A

d. nmcli

39
Q

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

A

b. ifup eth0
d. ifdown eth0

40
Q

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”

A

b. hostnamectl set-hostname workstation5

41
Q

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

A

d. ping6 ::1

42
Q

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

A

d. /proc/sys/net/ipv4/ip_forward

43
Q

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

a. route
d. netstat -r

44
Q

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

A

c. getent

45
Q

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

A

b. /etc/resolv.conf

46
Q

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

a. newaliases

47
Q

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

A

c. traceroute

48
Q

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

A

b. netstat

49
Q
A