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

LPI 101-500 LPIC-1 Exam 101, Part 1 of 2, version 5.0 Exam Practice Test

Demo: 72 questions
Total 243 questions

LPIC-1 Exam 101, Part 1 of 2, version 5.0 Questions and Answers

Question 1

A faulty kernel module is causing issues with a network interface card. Which of the following actions ensures that this module is not loaded automatically when the system boots?

Options:

A.

Using lsmod --remove --autoclean without specifying the name of a specific module

B.

Using modinfo –k followed by the name of the offending module

C.

Using modprobe –r followed by the name of the offending module

D.

Adding a blacklist line including the name of the offending module to the file /etc/modprobe.d/blacklist.conf

E.

Deleting the kernel module’s directory from the file system and recompiling the kernel, including its modules

Question 2

Which command must be entered before exiting vi to save the current file as filea.txt?

Options:

A.

%s filea.txt

B.

%w filea.txt

C.

:save filea.txt

D.

:w filea.txt

E.

:s filea.txt

Question 3

Which command uninstalls a package but keeps its configuration files in case the package is re-installed?

Options:

A.

dpkg –s pkgname

B.

dpkg –L pkgname

C.

dpkg –P pkgname

D.

dpkg –v pkgname

E.

dpkg –r pkgname

Question 4

Which daemon handles power management events on a Linux system?

Options:

A.

acpid

B.

batteryd

C.

pwrmgntd

D.

psd

E.

inetd

Question 5

Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?

Options:

A.

lsattr foo

B.

apropos foo

C.

locate foo

D.

whatis foo

E.

which foo

Question 6

Which of the following apt-get subcommands installs the newest versions of all currently installed packages?

Options:

A.

auto-update

B.

dist-upgrade

C.

full-upgrade

D.

install

E.

update

Question 7

Which of the following commands redirects the output of ls to standard error?

Options:

A.

ls >-1

B.

ls <

C.

ls >&2

D.

ls >>2

E.

ls |error

Question 8

What is true regarding the configuration of yum? (Choose two.)

Options:

A.

Changes to the repository configuration become active after running yum confupdate

B.

Changes to the yum configuration become active after restarting the yumd service

C.

The configuration of package repositories can be divided into multiple files

D.

Repository configurations can include variables such as $basearch or $releasever

E.

In case /etc/yum.repos.d/ contains files, /etc/yum.conf is ignored

Question 9

Which of the following is true when a file system, which is neither listed in /etc/fstab nor known to system, is mounted manually?

Options:

A.

systemd ignores any manual mounts which are not done using the systemctl mount command

B.

The command systemctl mountsync can be used to create a mount unit based on the existing mount

C.

systemd automatically generates a mount unit and monitors the mount point without changing it

D.

Unless a systemd mount unit is created, systemd unmounts the file system after a short period of time

E.

systemctl unmount must be used to remove the mount because system opens a file descriptor on the mount point

Question 10

Which of the following directories on a 64-bit Linux system typically contain shared libraries? (Choose two.)

Options:

A.

~/.lib64/

B.

/usr/lib64/

C.

/var/lib64/

D.

/lib64/

E.

/opt/lib64/

Question 11

When is the content of the kernel ring buffer reset? (Choose two.)

Options:

A.

When the ring buffer is explicitly reset using the command dmesg --clear

B.

When the ring buffer is read using dmesg without any additional parameters

C.

When a configurable amount of time, 15 minutes by default, has passed

D.

When the kernel loads a previously unloaded kernel module

E.

When the system is shut down or rebooted

Question 12

Which wildcards will match the following filenames? (Choose two.)

ttyS0

ttyS1

ttyS2

Options:

A.

ttyS[1-5]

B.

tty?[0-5]

C.

tty*2

D.

tty[A-Z][012]

E.

tty[Ss][02]

Question 13

Which of the following vi commands deletes two lines, the current and the following line?

Options:

A.

d2

B.

2d

C.

2dd

D.

dd2

E.

de12

Question 14

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

Options:

A.

fmt –f 1,4 /etc/passwd

B.

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

C.

sort –t : -k 1,4 /etc/passwd

D.

paste –f 1,4 /etc/passwd

E.

split –c 1,4 /etc/passwd

Question 15

Consider the following output from the command ls –i:

How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?

Options:

A.

ln –h a.txt c.txt

B.

ln c.txt a.txt

C.

ln a.txt c.txt

D.

ln –f c.txt a.txt

E.

ln –i 525385 c.txt

Question 16

Which of the following examples for Bash file globbing matches a file named root-can-do-this.txt when used in the directory holding that file? (Choose three correct answers.)

Options:

A.

root*can?do-this.{txt,odt}

B.

r[oOoO]t-can-do*.txt

C.

{root,user,admin}-can-??-this.txt

D.

root*can*do??this.txt

E.

root***{can,may}-do-this.[tT][xX][tT]

Question 17

Which of the following apt-get commands will install the newest versions of all currently installed packages?

Options:

A.

auto-update

B.

full-upgrade

C.

dist-upgrade

D.

install

E.

update

Question 18

Which file from the /proc file system contains a list of all currently mounted devices? (Specify ONLY the command without any path or parameters.)

Options:

Question 19

Which of the following commands converts spaces in a file to tab characters and prints the result to standard output?

Options:

A.

iconv

B.

expand

C.

unexpand

D.

tab

Question 20

Which of the following commands print the current working directory when using a Bash shell? (Choose two.)

Options:

A.

echo “${PWD}”

B.

echo “${WD}”

C.

pwd

D.

printwd

E.

echo “${pwd}”

Question 21

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

Options:

A.

/dev/hda1

B.

/dev/sda2

C.

/dev/sd0a2

D.

/dev/sd1p2

Question 22

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

Options:

A.

-rwxrwxrwx

B.

+rwxrwxrwx

C.

lrwxrwxrwx

D.

srwxrwxrwx

Question 23

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 24

The system configuration file named _______ is commonly used to set the default runlevel. (Please provide the file name with full path information)

Options:

Question 25

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

Question 26

Which chown command will change the ownership to dave and the group to staff on a file named data.txt?

Options:

A.

chown dave/staff data.txt

B.

chown –u dave –g staff data.txt

C.

chown --user dave --group staff data.txt

D.

chown dave:staff data.txt

Question 27

Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH?

Options:

A.

apropos

B.

which

C.

find

D.

query

E.

whereis

Question 28

In compliance with the FHS, in which of the following directories are documentation files found?

Options:

A.

/usr/share/documentation

B.

/usr/local/share/documentation

C.

/var/share/doc

D.

/usr/share/doc

E.

/etc/share/doc

Question 29

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 30

Which file in /proc describes the IRQs that are used by various kernel drivers? (Specify the file name only without any path.)

Options:

Question 31

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 32

When given the following command line.

echo "foo bar" | tee bar | cat

Which of the following output is created?

Options:

A.

cat

B.

foo bar

C.

tee bar

D.

bar

E.

foo

Question 33

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 | tee file1.log

E.

tee myapp file1.log

Question 34

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 35

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 command foo 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 36

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 37

Which shell command is used to continue background execution of a suspended command?

Options:

A.

&

B.

bg

C.

cont

D.

exec

E.

:&

Question 38

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

Question 39

In compliance with the FHS, in which of the directories are man pages found?

Options:

A.

/usr/share/man

B.

/opt/man

C.

/usr/doc/

D.

/var/pkg/man

E.

/var/man

Question 40

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

  • uk.co.certification.simulator.questionpool.PList@18e10a10

Options:

Question 41

Which of the following commands prints a list of 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 42

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

Question 43

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

Question 44

Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)

Options:

Question 45

While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?

Options:

A.

:r

B.

:n

C.

:w

D.

:e

Question 46

Which of the following commands can be used to download the RPM package kernel without installing it?

Options:

A.

yum download --no-install kernel

B.

yumdownloader kernel

C.

rpm --download --package kernel

D.

rpmdownload kernel

Question 47

Which Debian package management tool asks the configuration questions for a specific already installed package just as if the package were being installed for the first time? (Specify ONLY the command without any path or parameters.)

Options:

Question 48

Which of the following commands is used to update the list of available packages when using dpkg based package management?

Options:

A.

apt-get update

B.

apt-get upgrade

C.

apt-cache update

D.

apt-get refresh

E.

apt-cache upgrade

Question 49

What is the difference between the --remove and the --purge action with the dpkg command?

Options:

A.

--remove removes the program, --purge also removes the config files

B.

--remove only removes the program, --purge only removes the config files

C.

--remove removes a package, --purge also removes all packages dependent on it

D.

--remove removes only the package file itself, --purge removes all files related to the package

Question 50

Which of the following apt-get commands will install the newest versions of all currently installed packages without removing any packages or installing new packages that are not already installed?

Options:

A.

auto-update

B.

upgrade

C.

dist-upgrade

D.

install

E.

update

Question 51

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

  • uk.co.certification.simulator.questionpool.PList@190e5930

Options:

Question 52

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

Options:

A.

yum --query --all

B.

yum --list --installed

C.

rpm --query --all

D.

rpm --list –installed

Question 53

Typically, which top level system directory is used for files and data that change regularly while the system is running and are to be kept between reboots? (Specify only the top level directory)

Options:

A.

/var

B.

/var/,

C.

Var

D.

var/

Question 54

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

  • /etc/yum.repos.d
  • /etc/yum.repos.d/
  • yum.repos.d
  • yum.repos.d/

Options:

Question 55

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 56

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

Options:

A.

mkcache

B.

soconfig

C.

mkldconfig

D.

lddconfig

E.

ldconfig

Question 57

Which of the following is correct when talking about mount points?

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 58

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

Options:

Question 59

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

  • menu.lst
  • grub.conf
  • grub.cfg

Options:

Question 60

To what environment variable will you assign or append a value if you need to tell the dynamic linker to look in a build directory for some of a program's shared libraries?

Options:

A.

LD_LOAD_PATH

B.

LD_LIB_PATH

C.

LD_LIBRARY_PATH

D.

LD_SHARE_PATH

E.

LD_RUN_PATH

Question 61

The USB device filesystem can be found under /proc/______/usb/. (Please fill in the blank with the single word only)

Options:

Question 62

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

Options:

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.

Question 63

Which of the following commands brings a system running SysV init into a state in which it is safe to perform maintenance tasks? (Choose TWO correct answers.)

Options:

A.

shutdown -R 1 now

B.

shutdown -single now

C.

init 1

D.

telinit 1

E.

runlevel 1

Question 64

Which of the following information is stored within the BIOS? (Choose TWO correct answers.)

Options:

A.

Boot device order

B.

Linux kernel version

C.

Timezone

D.

Hardware configuration

E.

The system's hostname

Question 65

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

Question 66

Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)

Options:

A.

startd

B.

systemd

C.

Upstart

D.

SysInit

E.

SysV init

Question 67

What information can the lspci command display about the system hardware? (Choose THREE correct answers.)

Options:

A.

Device IRQ settings

B.

PCI bus speed

C.

System battery type

D.

Device vendor identification

E.

Ethernet MAC address

Question 68

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

Options:

A.

silent

B.

verbose=0

C.

nomesg

D.

quiet

Question 69

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

Options:

Question 70

Which command displays the contents of the Kernel Ring Buffer on the command line? (Provide only the command name without any options or path information)

Options:

Question 71

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 72

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

Options:

Demo: 72 questions
Total 243 questions