Free LFCS Sample Questions — Linux Foundation Certified System Administrator

Free LFCS sample questions for the Linux Foundation Certified System Administrator exam. No account required: study at your own pace.

Want an interactive quiz? Take the full LFCS practice test

Looking for more? Click here to get the full PDF with 139+ practice questions for $10 for offline study and deeper preparation.

Question 1

Which of the following commands displays the contents of a gzip compressed tar archive?

  • A. gzip archive.tgz | tar xvf -
  • B. tar ztf archive.tgz
  • C. gzip -d archive.tgz | tar tvf -
  • D. tar cf archive.tgz
Show Answer
Correct Answer:
B. tar ztf archive.tgz
Question 2

Which of the following commands changes the ownership of file.txt to the user dan and the group staff?

  • A. chown dan/staff file.txt
  • B. chown dan:staff file.txt
  • C. chown -u dan -g staff file.txt
  • D. chown dan -g staff file.txt
Show Answer
Correct Answer:
B. chown dan:staff file.txt
Question 3

Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.)

  • A. uptime
  • B. up
  • C. top
  • D. uname -u
  • E. time –up
Show Answer
Correct Answer:
  • A. uptime
  • C. top
Question 4

What is the output of the following command sequence? for token in a b c; do echo -n "$token "; done

  • A. anbncn
  • B. a b c
  • C. "a " "b " "c "
  • D. token token token
  • E. abc
Show Answer
Correct Answer:
B. a b c
Question 5

Which of the following commands will print the last 10 lines of a text file to the standard output?

  • A. cat -n 10 filename
  • B. dump -n 10 filename
  • C. head -n 10 filename
  • D. tail -n 10 filename
Show Answer
Correct Answer:
D. tail -n 10 filename
Question 6

Which of the following commands updates the linker cache of shared libraries?

  • A. mkcache
  • B. soconfig
  • C. mkldconfig
  • D. lddconfig
  • E. ldconfig
Show Answer
Correct Answer:
E. ldconfig
Question 7

Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)

  • A. shutdown -r now
  • B. shutdown -r "rebooting"
  • C. telinit 6
  • D. telinit 0
  • E. shutdown -k now "rebooting"
Show Answer
Correct Answer:
  • A. shutdown -r now
  • C. telinit 6
Question 8

Which of the following commands moves and resumes in the background the last stopped shell job?

  • A. run
  • B. bg
  • C. fg
  • D. back
Show Answer
Correct Answer:
B. bg
Question 9

Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?

  • A. /etc/keys
  • B. /proc/keys
  • C. /etc/inittab
  • D. /proc/inittab
  • E. /etc/reboot
Show Answer
Correct Answer:
C. /etc/inittab
Question 10

Regarding the command: nice -5 /usr/bin/prog Which of the following statements is correct?

  • A. /usr/bin/prog is executed with a nice level of -5
  • B. /usr/bin/prog is executed with a nice level of 5
  • C. /usr/bin/prog is executed with a priority of -5
  • D. /usr/bin/prog is executed with a priority of 5
Show Answer
Correct Answer:
B. /usr/bin/prog is executed with a nice level of 5
Question 11

Which of the following commands will write a message to the terminals of all logged in users?

  • A. bcast
  • B. mesg
  • C. print
  • D. wall
  • E. yell
Show Answer
Correct Answer:
D. wall
Question 12

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

  • A. i (lowercase)
  • B. (uppercase)
  • C. p (lowercase)
  • D. (uppercase)
  • E. u (lowercase)
Show Answer
Correct Answer:
C. p (lowercase)
Question 13

Which of the following IPv4 networks are reserved by IANA for private address assignment and private routing? (Choose THREE correct answers.)

  • A. 127.0.0.0/8
  • B. 10.0.0.0/8
  • C. 169.255.0.0/16
  • D. 172.16.0.0/12
  • E. 192.168.0.0/16
Show Answer
Correct Answer:
  • B. 10.0.0.0/8
  • D. 172.16.0.0/12
  • E. 192.168.0.0/16
Question 14

Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose TWO correct answers.)

  • A. FIND
  • B. ID
  • C. LABEL
  • D. NAME
  • E. UUID
Show Answer
Correct Answer:
  • C. LABEL
  • E. UUID
Question 15

Which of the following commands will change the quota for a specific user?

  • A. edquota
  • B. repquota
  • C. quota -e
  • D. quota
Show Answer
Correct Answer:
A. edquota
Question 16

Which of the following is the device file name for the second partition on the only SCSI drive?

  • A. /dev/hda1
  • B. /dev/sda2
  • C. /dev/sd0a2
  • D. /dev/sd1p2
Show Answer
Correct Answer:
B. /dev/sda2
Question 17

Which character, added to the end of a command, runs that command in the background as a child process of the current shell?

  • A. !
  • B. +
  • C. &
  • D. %
  • E. #
Show Answer
Correct Answer:
C. &
Question 18

Which of the following environment variables overrides or extends the list of directories holding shared libraries?

  • A. LD_LOAD_PATH
  • B. LD_LIB_PATH
  • C. LD_LIBRARY_PATH
  • D. LD_SHARE_PATH
  • E. LD_RUN_PATH
Show Answer
Correct Answer:
C. LD_LIBRARY_PATH
Question 19

Which of the following kernel parameters instructs the kernel to suppress most boot messages?

  • A. silent
  • B. verbose=0
  • C. nomesg
  • D. quiet
Show Answer
Correct Answer:
D. quiet
Question 20

Which of the following statements is correct when talking about /proc/?

  • A. All changes to files in /proc/ are stored in /etc/proc.d/ and restored on reboot
  • B. All files within /proc/ are read-only and their contents cannot be changed
  • C. All changes to files in /proc/ are immediately recognized by the kernel
  • D. All files within /proc/ are only readable by the root user
Show Answer
Correct Answer:
C. All changes to files in /proc/ are immediately recognized by the kernel

Aced these? Get the Full Exam

Download the complete LFCS study bundle with 139+ questions in a single printable PDF.