Winter Special Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

LFCS Sample Questions Answers

Questions 4

By default, the contents of which directory will be copied to a new user's home directory when the account is created by passing the -m option to the useradd command? (Specify the full path to the directory.)

Options:

Buy Now
Questions 5

Which of the following commands connects to the remote host example.com which has OpenSSH listening on TCP port 2222? (Choose TWO correct answers.)

Options:

A.

ssh --port 2222 example.com

B.

ssh -p 2222 example.com

C.

ssh -o Port=2222 example.com

D.

ssh -o GatewayPort=2222 example.com

E.

ssh example.com:2222

Buy Now
Questions 6

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

Options:

A.

LD_LOAD_PATH

B.

LD_LIB_PATH

C.

LD_LIBRARY_PATH

D.

LD_SHARE_PATH

E.

LD_RUN_PATH

Buy Now
Questions 7

After modifying GNU GRUB's configuration file, which command must be run for the changes to take effect?

Options:

A.

kill -HUP $(pidof grub)

B.

grub-install

C.

grub

D.

No action is required

Buy Now
Questions 8

Which option to the yum command will update the entiresystem? (Specify ONLY the option name without any additional parameters.)

Options:

Buy Now
Questions 9

What is the output of the following command?

for token in a b c; do

echo -n ${token};

done

Options:

A.

anbncn

B.

abc

C.

$token$token$token

D.

{a}{b}{c}

E.

a b c

Buy Now
Questions 10

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

Options:

A.

;

B.

*

C.

#

D.

/

Buy Now
Questions 11

Which file specifies the user accounts that can NOT submit jobs via at or batch? (Provide the full path and filename)

Options:

Buy Now
Questions 12

Which of the following commands will set the variable text to olaf is home?(Choose two)

Options:

A.

text=olaf\ is\ home

B.

text=$olaf is home

C.

$text='olaf is home'

D.

text=='olaf is home'

E.

text="olaf is home"

Buy Now
Questions 13

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.

Buy Now
Questions 14

How can the existing environment variable FOOBAR be suppressedfor the execution of the script./myscript only?

Options:

A.

unset -v FOOBAR;./myscript

B.

set -a FOOBAR="";./myscript

C.

env -u FOOBAR./myscript

D.

env -i FOOBAR./myscript

Buy Now
Questions 15

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types?

Options:

A.

magic

B.

type

C.

file

D.

pmagic

E.

hash

Buy Now
Questions 16

With X11 forwarding in ssh, what environment variable is automatically set in the remote host shell that is not set when X11 forwarding is not enabled? (Specify only the environment variable without any additional commands or values.)

Options:

Buy Now
Questions 17

Which of the following options for the kernel's command line changes the systemd boot target to rescue.target instead of the default target?

Options:

A.

systemd.target=rescue.target

B.

systemd.runlevel=rescue.target

C.

systemd.service=rescue.target

D.

systemd.default=rescue.target

E.

systemd.unit=rescue.target

Buy Now
Questions 18

What is the lowest numbered unprivileged TCP port? (Specify the number in digits only.)

Options:

Buy Now
Questions 19

In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?

Options:

A.

By using the command :repeat followed by the number and the command.

B.

By specifying the number right in front of a command such as 4l or 2yj.

C.

By selecting all affected lines using the shift and cursor keys before applying the command.

D.

By issuing acommand such as :set repetition=4 which repeats every subsequent command 4 times.

Buy Now
Questions 20

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

Buy Now
Questions 21

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.

Buy Now
Questions 22

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

Options:

A.

cat < myapp | cat > file1.log

B.

myapp 0>&1 | cat > file1.log

C.

myapp | cat > file1.log

D.

myapp | teefile1.log

E.

tee myapp file1.log

Buy Now
Questions 23

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

Buy Now
Questions 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:

Buy Now
Questions 25

Which configuration file would be edited to change the default options for outbound SSH sessions?

Options:

A.

/etc/ssh/sshd_config

B.

/etc/ssh/ssh

C.

/etc/ssh/client

D.

/etc/ssh/ssh_config

E.

/etc/ssh/ssh_client

Buy Now
Questions 26

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

Buy Now
Questions 27

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"

Buy Now
Questions 28

Which of the following commands will output all of the lines with the name Fred in upper or lower case but not the word red from the file data_file?(Choose two)

Options:

A.

grep -v fred data_file

B.

grep '[f]red' data_file

C.

egrep fred data_file

D.

grep '[Ff]red' data_file

E.

grep -i fred data_file

Buy Now
Questions 29

In Bash, inserting 1>&2 after a command redirects

Options:

A.

standard error to standard input.

B.

standard input to standard error.

C.

standard output to standard error.

D.

standard error to standardoutput.

E.

standard output to standard input.

Buy Now
Questions 30

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:

Buy Now
Questions 31

Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.)

Options:

A.

find /tmp -uid root -print

B.

find -path /tmp -uid root

C.

find /tmp -user root -print

D.

find/tmp -user root

E.

find -path /tmp -user root –print

Buy Now
Questions 32

Which of the following commands lists all currently installedpackages when using RPM package management?

Options:

A.

yum --query --all

B.

yum --list --installed

C.

rpm --query --all

D.

rpm --list –installed

Buy Now
Questions 33

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

Buy Now
Questions 34

Which of the following commands puts the output of the command date into the shell variable mydate?

Options:

A.

mydate="$(date)"

B.

mydate="exec date"

C.

mydate="$((date))"

D.

mydate="date"

E.

mydate="${date}"

Buy Now
Questions 35

What output will the following command sequence produce?

echo '1 2 3 4 5 6' | while read a b c; do

echo result: $c $b $a;

done

Options:

A.

result: 3 4 5 6 2 1

B.

result: 1 2 3 4 5 6

C.

result: 6 5 4

D.

result: 6 5 4 3 2 1

E.

result: 3 2 1

Buy Now
Questions 36

What does the command mount -a do?

Options:

A.

It mounts all available filesystems onto the current directory.

B.

It shows all mounted filesystems.

C.

It mounts all user mountable filesystems for the current user.

D.

It mounts all filesystems listed in /etc/fstab which have the option auto set.

E.

It mounts all filesystems listed in /etc/fstab which have the option noauto set.

Buy Now
Questions 37

What entry can be added to the syslog.conf file to have all syslog messages generated by a system displayed on console 12?

Options:

A.

*.* /dev/tty12

B.

/var/log/messages | /dev/tty12

C.

| /dev/tty12

D.

syslog tty12

E.

mail.* /dev/tty12

Buy Now
Questions 38

How can the current directory and its subdirectories be searched for the file named MyFile.xml?

Options:

A.

find . -name MyFile.xml

B.

grep MyFile.xml | find

C.

grep -r MyFile.xml .

D.

less MyFile.xml

E.

search Myfile.xml ./

Buy Now
Questions 39

What command displays all aliases defined in the current shell? (Specify the command without any path information)

Options:

Buy Now
Questions 40

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

Options:

A.

cat -n 10 filename

B.

dump -n 10 filename

C.

head -n 10 filename

D.

tail -n 10 filename

Buy Now
Questions 41

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.

Buy Now
Questions 42

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.

Buy Now
Questions 43

Which of the following details is NOT provided in any output from the netstat utility?

Options:

A.

broadcast services

B.

interface statistics

C.

masquerading connections

D.

network connections

E.

routing tables

Buy Now
Questions 44

Which file contains a set of services and hosts that will be allowed to connect to the server by going through a TCP Wrapper program such as tcpd? (Specify the full name of the file, including path.)https://lh3.googleusercontent.com/-5cd-clmKnbk/AAAAAAAAAAI/AAAAAAAAADM/-SXesH19Ido/s46-c-k-no/photo.jpg

Options:

Buy Now
Questions 45

Which of the following statements is valid in the file /etc/nsswitch.conf?

Options:

A.

multi on

B.

192.168.168.4 dns-server

C.

hosts: files dns

D.

include /etc/nsswitch.d/

Buy Now
Questions 46

What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)

Options:

A.

Entries for all possible devices get created on boot even if those devicesare not connected.

B.

Additional rules for udev can be created by adding them to /etc/udev/rules.d/.

C.

When using udev, it is not possible to create block or character devices in /dev/ using mknod.

D.

The /dev/ directory is a filesystem of type tmpfs andis mounted by udev during system startup.

E.

The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

Buy Now
Questions 47

Which command is used to add an empty group to the system? (Specify ONLY the command without any path or parameters.)

Options:

Buy Now
Questions 48

Which world-writable directory should be placed on a separate partition inorder to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)

Options:

Buy Now
Questions 49

Which of the following is observed and corrected by a NTP client?

Options:

A.

The skew in time between the system clock and the hardware clock.

B.

The skew in time between the system clock and the reference clock.

C.

Changes in the time zone of the current computer's location.

D.

Adjustments needed to support Daylight Saving Time.

Buy Now
Questions 50

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

Buy Now
Questions 51

What is true regarding the file ~/.forward?

Options:

A.

As it is owned by the MTA and not writable by the user, it must be edited using the editaliases command.

B.

After editing ~/.forward the user must run newaliases to make the mail server aware of the changes.

C.

Using ~/.forward, root may configure any email address whereas all other users may configure only their own addresses.

D.

When configured correctly, ~/.forward can be used to forward each incoming mail to more than one other recipient.

Buy Now
Questions 52

Which of the following commands is used to rotate, compress, and mail system logs?

Options:

A.

rotatelog

B.

striplog

C.

syslogd --rotate

D.

logrotate

E.

logger

Buy Now
Questions 53

Which command will display messages from the kernel that were output during the normal boot sequence?

Options:

Buy Now
Questions 54

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:

Buy Now
Questions 55

Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem?

Options:

A.

mod2fs

B.

fsck

C.

tune2fs

D.

mke2fs

E.

fixe2fs

Buy Now
Questions 56

Why is the correct configuration of a system's time zone important?

Options:

A.

Because the conversion of Unix timestamps to local time relies on the time zone configuration.

B.

Because the time zone is saved as part of the modification times of files and cannot be changed after a file is created.

C.

Because the environment variables LANG and LC_MESSAGES are, by default, set according to the time zone.

D.

Because NTP chooses servers nearby based on the configured time zone.

Buy Now
Questions 57

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.

Buy Now
Questions 58

In the vi editor, which of the following commands will copy the current line into the vi buffer?

Options:

A.

c

B.

cc

C.

1c

D.

yy

E.

1y

Buy Now
Questions 59

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:

Buy Now
Questions 60

Which of the following may occur as a consequence of using the command ifconfig? (Choose THREE correct answers.)

Options:

A.

New name servers may be added to the resolver configuration.

B.

Network interfaces may become active or inactive.

C.

The routing table may change.

D.

IP addresses may change.

E.

The system's host name may change.

Buy Now
Questions 61

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.

Buy Now
Questions 62

Which command will disable swapping on a device? (Specify ONLY the command without any path or parameters.)

Options:

Buy Now
Questions 63

In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?

Options:

A.

-dirmax

B.

-maxdepth

C.

-maxlevels

D.

-n

E.

-s

Buy Now
Questions 64

Creating a hard link to an ordinary file returns an error. What could be the reason for this?

Options:

A.

The source file is hidden.

B.

The source file is read-only.

C.

The source file is a shell script.

D.

The source file is already a hard link.

E.

The source and the target are on different filesystems.

Buy Now
Questions 65

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

Options:

A.

run

B.

bg

C.

fg

D.

back

Buy Now
Questions 66

Which of the following are syslog facilities? (Choose TWO correct answers.)

Options:

A.

local7

B.

mail

C.

advanced

D.

postmaster

E.

remote

Buy Now
Questions 67

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.

Buy Now
Questions 68

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

Buy Now
Questions 69

Which character in the password field of /etc/passwd is used to indicate that the encrypted password is stored in /etc/shadow?

Options:

A.

*

B.

-

C.

s

D.

x

Buy Now
Questions 70

How can the normal output of a command be written to a file while discarding the error output?

Options:

A.

command >2>file 1&>/dev/null

B.

command < output > /dev/null

C.

command > discard-error > file

D.

command > /dev/null 2&>1 output

E.

command >file 2>/dev/null

Buy Now
Questions 71

Which of the following fields are available in both the global /etc/crontab file as well as in user-specific crontab files? (Select TWO correct answers)

Options:

A.

Year

B.

Minute

C.

Username

D.

Command

Buy Now
Questions 72

Which keyword must be listed in the hosts option of the Name Service Switch configuration file in order to make host lookups consult the /etc/hosts file?

Options:

Buy Now
Questions 73

Which of the following commands is used to change options and positional parameters for a runningBash?

Options:

A.

history

B.

set

C.

bashconf

D.

setsh

E.

envsetup

Buy Now
Questions 74

The system's timezone may be set by linking /etc/localtime to an appropriate file in which directory? (Provide the full path to the directory, without any country information)

Options:

Buy Now
Questions 75

Which of the following keywords can be used in the file /etc/nsswitch.conf to specify a source for host name lookups? (Choose TWO correct answers.)

Options:

A.

resolv

B.

dns

C.

remote

D.

files

E.

hosts

Buy Now
Questions 76

What is the purpose of the file /etc/profile?

Options:

A.

It contains the welcome message that is displayed after login.

B.

It contains security profiles defining which users are allowed to log in.

C.

It contains environment variables that are set when a user logs in.

D.

It contains default application profiles for users that run an application for the first time.

Buy Now
Questions 77

What is the purpose of a screen reader?

Options:

A.

It reads text displayed on the screen to blind or visually impaired people.

B.

It reads the parameters of the attached monitors and creates an appropriate X11 configuration.

C.

It displays lines and markers to help people use speed reading techniques.

D.

It manages and displays files that contain e-books.

Buy Now
Questions 78

What is the output of the following command?

echo "Hello World" | tr -d aieou

Options:

A.

Hello World

B.

eoo

C.

Hll Wrld

D.

eoo Hll Wrld

Buy Now
Exam Code: LFCS
Exam Name: Linux Foundation Certified System Administrator
Last Update: Nov 20, 2024
Questions: 260
$64  $159.99
$48  $119.99
$40  $99.99
buy now LFCS