New Year Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70special

Linux Foundation LFCS Linux Foundation Certified System Administrator Exam Practice Test

Page: 1 / 26
Total 260 questions

Linux Foundation Certified System Administrator Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$37.5  $124.99

PDF Study Guide

  • Product Type: PDF Study Guide
$33  $109.99
Question 1

Which environment variable should be set in order to change the time zone for the commands run from within the environment variable's scope? (Specify the variable name only.)

Options:

Question 2

A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

Options:

A.

rmdir '~/\dir'

B.

rmdir "~/\dir"

C.

rmdir ~/'dir'

D.

rmdir ~/\dir

E.

rmdir ~/\\dir

Question 3

Given a file called birthdays containing lines like:

YYYY-MM-DD Name

1983-06-02 Tim

1995-12-17 Sue

Which command would you use to output the lines belonging to all people listed whose birthday is in May or June?

Options:

A.

grep '[56]' birthdays

B.

grep 05?6? birthdays

C.

grep '[0-9]*-0[56]-' birthdays

D.

grep 06 birthdays | grep 05

Question 4

Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)

Options:

Question 5

Which of the following SQL queries counts the number of occurrences for each value of the field order_type in the table orders?

Options:

A.

SELECT order_type,COUNT(*) FROM orders WHERE order_type=order_type;

B.

SELECT order_type,COUNT(*) FROM orders GROUP BY order_type;

C.

COUNT(SELECT order_type FROM orders);

D.

SELECT COUNT(*) FROM orders ORDER BY order_type;

E.

SELECT AUTO_COUNT FROM orders COUNT order_type;

Question 6

On a Linux system with shadow passwords enabled, which file in the file system contains the password hashes of all local users? (Specify the full name of the file, including path.)

Options:

Question 7

Which of the following settingsfor umask ensures that new files have the default permissions -rw-r----- ?

Options:

A.

0017

B.

0640

C.

0038

D.

0027

Question 8

Which of the following commands will reduce all consecutive spaces down to a single space?

Options:

A.

tr '\s' ' ' < a.txt > b.txt

B.

tr -c ' ' < a.txt > b.txt

C.

tr -d ' ' < a.txt > b.txt

D.

tr -r ' ' '\n' < a.txt >b.txt

E.

tr -s ' ' < a.txt > b.txt

Question 9

Which character starts a comment line in a shell script file?

Options:

A.

;

B.

*

C.

#

D.

/

Question 10

Which of the following sequences in the vi editor saves the opened document and exits the editor?(Choose TWO correct answers.)

Options:

A.

esc ZZ

B.

ctrl :w!

C.

esc zz

D.

esc :wq!

E.

ctrl XX

Question 11

After successfully creating a hard link called bar to the ordinary file foo, foo is deleted from the filesystem. Which of the following describes the resulting situation?

Options:

A.

foo and bar would both be removed.

B.

foo would be removed while bar would remain accessible.

C.

foo would be removed. bar would still exist but would be unusable.

D.

Both foo and bar would remain accessible.

E.

The user is prompted whether bar should be removed, too.

Question 12

Which of the following are tasks handled by a display manager like XDM or KDM? (Choose TWO correct answers.)

Options:

A.

Start and prepare the desktop environment for the user.

B.

Configure additional devices like new monitors or projectors when they are attached.

C.

Handle the login of a user.

D.

Lock the screen when the user was inactive for a configurable amount of time.

E.

Create an X11 configuration file for the current graphic devices and monitors.

Question 13

What is true regarding TCP port 23?

Options:

A.

Port 23 is the well known port for the telnet service which is a plain text protocol that should no longer be used.

B.

Port 23 is the well known port for the SSH service which provides secure logins.

C.

Port 23 is the well known port for the rlogin service which is SSL secured by default.

D.

Port 23 is the well known port for the system login services which are encrypted when the user runs the starttls command in his login shell.

Question 14

What is true regarding the command sendmail?

Options:

A.

With any MTA, the sendmail command must be run periodically by the cron daemon.

B.

All MTAs, including Postfix and Exim, provide a sendmail command.

C.

The sendmail command prints the MTAs queue history of which mails have been sent successfully.

D.

It is only available when the sendmail MTA is installed.

Question 15

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?

Options:

A.

SIGTERM

B.

SIGINT

C.

SIGSTOP

D.

SIGKILL

Question 16

What argument to the -type option of find will match files that are symbolic links? (Specify only the argument and no other options or words.)

Options:

Question 17

Which of the following files, located in the user home directory, is used to store the Bash history?

Options:

A.

.bash_history

B.

.bash_histfile

C.

.history

D.

.bashrc_history

E.

.history_bash

Question 18

Which of the following steps prevents a user from obtaining an interactive login session?

Options:

A.

Run the command chsh -s /bin/false with the user name.

B.

Set the UID for the user to 0.

C.

Remove the user from the group staff.

D.

Add the user to /etc/noaccess.

E.

Create a .nologin file in the user's home directory.

Question 19

Each entry in a crontab must end with what character?

Options:

A.

Tab

B.

Space

C.

Backslash

D.

Newline

Question 20

What does the command mount -a do?

Options:

A.

It ensures that all file systems listed with the option noauto in /etc/fstab are mounted.

B.

It shows all mounted file systems that have been automatically mounted.

C.

It opens an editor with root privileges and loads /etc/fstab for editing.

D.

It ensures that all file systems listed with the option auto in /etc/fstab are mounted.

E.

It ensures that all file systems listed in /etc/fstab are mounted regardless of their options.

Question 21

Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.)

Options:

A.

Synchronize the hardware and system clocks.

B.

Output date and time in different formats.

C.

Set the system clock.

D.

Set the hardware clock.

E.

Update the time via NTP.

Question 22

Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?

Options:

A.

sed '/bob/Bob' letter >newletter

B.

sed s/bob/Bob/ letter < newletter

C.

sed 's/bob/Bob' letter > newletter

D.

sed 's/bob/Bob/g' letter > newletter

E.

sed 's/bob, Bob/' letter > newletter

Question 23

Which port is the default server port for the HTTPS protocol? (Specify the port number using digits.)

Options:

Question 24

Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)

Options:

Question 25

What is the purpose of the command mailq?

Options:

A.

It fetches new emails from a remote server using POP3 or IMAP.

B.

It is a multi-user mailing list manager.

C.

It is a proprietary tool contained only in the qmail MTA.

D.

It queries the mail queue of the local MTA.

E.

It is a command-line based tool for reading and writing emails.

Question 26

Which of the following parameters are used for journalctl to limit the time frame of the output? (Choose TWO correct answers.)

Options:

A.

--from=

B.

--since=

C.

--until=

D.

--upto=

E.

--date=

Question 27

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

Options:

A.

bcast

B.

mesg

C.

print

D.

wall

E.

yell

Question 28

What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?

Options:

A.

The command is SetUID and it will be executed with the effective rights of the owner.

B.

The command will be executed with the effective rights of the group instead of the owner.

C.

The execute flag is not set for the owner. Therefore the SetUID flag is ignored.

D.

The command will be executed with the effective rights of the owner and group.

Question 29

What is the purpose of the Bash built-in export command?

Options:

A.

It allows disks to be mounted remotely.

B.

It runs a command as a process in a subshell.

C.

It makes the command history available to subshells.

D.

It sets up environment variables for applications.

E.

It shares NFS partitions for use by other systems on the network.

Question 30

What output will the command seq 10 produce?

Options:

A.

A continuous stream of numbers increasing in increments of 10 until stopped.

B.

The numbers 1 through 10 with one number per line.

C.

The numbers 0 through 9 with one number per line.

D.

The number 10 to standard output.

Question 31

For accessibility assistance, which of the following programs is an on-screen keyboard?

Options:

A.

xkb

B.

atkb

C.

GOK

D.

xOSK

Question 32

Which of the following Linux filesystems preallocates a fixed number of inodes at the filesystem's make/creation time and does NOT generate them as needed? (Choose TWO correct answers.)

Options:

A.

ext3

B.

JFS

C.

ext2

D.

XFS

E.

procfs

Question 33

Which parameter must be passed to ifconfig to activate a previously inactive network interface? (Specify the parameter only without any command, path or additional options)

Options:

Question 34

Which of the following commands overwrites the bootloader located on /dev/sda without overwriting the partition table or any data following it?

Options:

A.

dd if=/dev/zero of=/dev/sda bs=512

B.

dd if=/dev/zero of=/dev/sdabs=512 count=1

C.

dd if=/dev/zero of=/dev/sda bs=440 count=1

D.

dd if=/dev/zero of=/dev/sda bs=440

Question 35

Which signal is missing from the following command that is commonly used to instruct adaemon to reinitialize itself, including reading configuration files?

killall -s _______ daemon

Options:

Question 36

When the command echo $$ outputs 12942, what is the meaning of 12942?

Options:

A.

It is the process ID of the echo command.

B.

It is the process ID of the current shell.

C.

It is the process ID of the last command executed.

D.

It is the process ID of the last command which has been placed in the background.

Question 37

Which of the following commands prints a listof usernames (first column) and their primary group (fourth column) from the /etc/passwd file?

Options:

A.

fmt -f 1,4 /etc/passwd

B.

split -c 1,4 /etc/passwd

C.

cut -d : -f 1,4 /etc/passwd

D.

paste -f 1,4 /etc/passwd

Question 38

When trying to unmount a device it is reported as being busy. Which of the following commands could be used to determine which process is causing this?

Options:

A.

debug

B.

lsof

C.

nessus

D.

strace

E.

traceroute

Question 39

Which of the following commands can be used to extract content from a tar file?

Options:

A.

tar -xvf

B.

tar -vf

C.

tar -e

D.

tar -c

E.

tar–v

Page: 1 / 26
Total 260 questions