Summer Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

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

Question 1

What of the following can be done by the command ifconfig? (Choose TWO correct answers.)

Options:

A.

Set a network interface active or inactive.

B.

Specify the kernel module to be used with a network interface.

C.

Allow regular users to change the network configuration of a network interface.

D.

Change the netmask used on a network interface.

E.

Specify which network services are available on a network interface.

Question 2

Which of the following commands shows the current color depth of the X Server?

Options:

A.

xcd

B.

xcdepth

C.

xwininfo

D.

xcolordepth

E.

cat /etc/X11

Question 3

What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)

Options:

Question 4

Which of the following statements is correct regarding the command foo 1> bar?

Options:

A.

The stdout from the command foo is appended to the file bar.

B.

The stdout from the command foo overwrites the file bar.

C.

The commandfoo receives its stdin from the file bar.

D.

The command foo receives its stdin from the stdout of the command bar.

E.

The stderr from the command foo is saved to the file bar.

Question 5

Which command, available with all MTAs, is used to list the contents of the MTA's mail queue? (Specify ONLY the command without any path or parameters.)

Options:

Question 6

Which of the following commands will create an archive file, named backup.tar, containing all the files from the directory /home?

Options:

A.

tar /home backup.tar

B.

tar -cf /home backup.tar

C.

tar -xf /home backup.tar

D.

tar -xf backup.tar /home

E.

tar -cf backup.tar /home

Question 7

What is the correct command to extract the contents of the archive file download.bz2?

Options:

A.

unpack download.bz2

B.

unzip2 download.bz2

C.

bunzip2 download.bz2

D.

unzip download.bz2

E.

uncompress download.bz2

Question 8

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 9

What happens after issuing the command vi without any additional parameters?

Options:

A.

vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited.

B.

vi starts and requires the user to explicitly either create a new or load an existing file.

C.

vi exits with an error message as it cannot be invoked without a file name to operate on.

D.

vi starts in command mode and opens a new empty file.

E.

vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.

Question 10

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

Options:

A.

shutdown -r now

B.

shutdown -r "rebooting"

C.

telinit 6

D.

telinit 0

E.

shutdown -k now "rebooting"

Question 11

Whenremoving a package, which of the following dpkg options will completely remove the files including configuration files?

Options:

A.

--clean

B.

--delete

C.

--purge

D.

–remove

Question 12

Which of the following is correct when talking about mountpoints?

Options:

A.

Every existing directory can be used as a mount point.

B.

Only empty directories can be used as a mount point.

C.

Directories need to have the SetUID flag set to be used as a mount point.

D.

Files within a directory are deleted when the directory is used as a mount point.

Question 13

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

Options:

A.

mkcache

B.

soconfig

C.

mkldconfig

D.

lddconfig

E.

ldconfig

Question 14

In which file, if present, must all users be listed that are allowed to use the cron scheduling system? (Specify the full name of the file, including path.)

Options:

Question 15

What is the difference between the i and a commands of the vi editor?

Options:

A.

i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically.

B.

i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.

C.

i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line.

D.

i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.

Question 16

What is the default nice level when a process is started using the nice command?

Options:

A.

-10

B.

10

C.

20

D.

0

Question 17

What two character sequence is present at the beginning of an interpreted script? (Please specify the TWO correct characters only)

Options:

Question 18

Which RPM command will output the name of the package which supplied the file /etc/exports?

Options:

A.

rpm -F /etc/exports

B.

rpm -qf /etc/exports

C.

rpm -Kl /etc/exports

D.

rpm -qp /etc/exports

E.

rpm -qi /etc/exports

Question 19

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 20

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 21

The presence of what file will temporarily prevent all users except root from logging into the system? (Specify the full name of the file, including path.)

Options:

Question 22

On a regular users workstation the route command takes a long time before printing out the routing table. Which of the following errors does that indicate?

Options:

A.

The local routing information may be corrupted and must be re-validated using a routing protocol.

B.

One of the routers in the routing table is not available which causes the automatic router failure detection mechanism (ARF-D) to wait for a timeout.

C.

There may accidentally be more than one default router in which case a default router election has to be done on the network in order to choose one router as the default.

D.

DNS resolution may not be working as route by default tries to resolve names of routers and destinations and may run into a timeout.

Question 23

Which of the following file permissions belong to a symbolic link?

Options:

A.

-rwxrwxrwx

B.

+rwxrwxrwx

C.

lrwxrwxrwx

D.

srwxrwxrwx

Question 24

Which of the following commands lists all defined variables and functions within Bash?

Options:

A.

env

B.

set

C.

env -a

D.

echo $ENV

Question 25

The script, script.sh, consists of the following lines:

#!/bin/bash

echo $2 $1

Which output will appear if the command, ./script.sh test1 test2, is entered?

Options:

A.

test1 test2

B.

test2 test1

C.

script.sh test2

D.

script.sh test1

E.

test1 script.sh

Question 26

When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?

Options:

A.

-10

B.

0

C.

10

D.

20

Question 27

In which directory must definition files be placed to add additional repositories to yum?

Options:

Question 28

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

Options:

A.

/etc/keys

B.

/proc/keys

C.

/etc/inittab

D.

/proc/inittab

E.

/etc/reboot

Question 29

Given the following routing table:

Question # 29

How would an outgoing packet to the destination 192.168.2.150 be handled?

Options:

A.

It would be passed to the default router 192.168.178.1 on wlan0.

B.

It would be directly transmitted on the device eth0.

C.

It would be passed to the default router 255.255.255.0 on eth0.

D.

It would be directly transmitted on the device wlan0.

E.

It would be passed to the router 192.168.1.1 on eth0.

Question 30

Which of the following keywords can be used in the file /etc/resolv.conf? (Choose TWO correct answers.)

Options:

A.

substitute

B.

nameserver

C.

search

D.

lookup

E.

method

Question 31

Which command is used to create and initialize the files used to store quota information? (Specify ONLY the commandwithout any path or parameters.)

Options:

Question 32

Which command, depending on its options, can display the open network connections, the routing tables, as well as network interface statistics. (Specify ONLY the command without any path or parameters.)

Options:

Question 33

When running the command

sed -e "s/a/b/" /tmp/file >/tmp/file

While /tmp/file contains data, why is /tmp/file empty afterwards?

Options:

A.

The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.

B.

The command sed did not match anything in that file therefore the output is empty.

C.

When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.

D.

Redirection for shell commands do not work using the > character. It only works using the | character instead.

Question 34

Which of the following commands will help identify a broken router between the local and the remote machine?

Options:

A.

ps

B.

netstat

C.

nslookup

D.

ifconfig

E.

traceroute

Question 35

Which of the following commands should be added to /etc/bash_profile in order to change the language of messages for an internationalized program to Portuguese (pt)?

Options:

A.

export LANGUAGE="pt"

B.

export MESSAGE="pt"

C.

export UI_MESSAGES="pt"

D.

export LC_MESSAGES="pt"

E.

export ALL_MESSAGES="pt"

Question 36

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

Options:

A.

!

B.

+

C.

&

D.

%

E.

#

Question 37

When the command echo $ outputs 1, which of the following statements is true?

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 exit value of the command executed immediately before echo.

D.

It is the exit value of the echo command.

Question 38

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 39

Which of the following commands can be used to display the local routing table? (Choose TWO correct answers.)

Options:

A.

ifconfig

B.

dig

C.

netstat

D.

route

E.

trackroute

Page: 1 / 26
Total 260 questions