Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

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

Demo: 87 questions
Total 293 questions

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

Question 1

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 2

: 6

The /etc/_______ file lists currently mounted devices.

Options:

Question 3

You are trying to make a hard link to an ordinary file but ln returns an error. Which of the following could cause this?

Options:

A.

The source file is hidden.

B.

The source file is read-only.

C.

The source file is a shell script.

D.

You do not own the source file.

E.

The source and the target are on different filesystems.

Question 4

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?

Options:

A.

i (lowercase)

B.

P (uppercase)

C.

p (lowercase)

D.

U (uppercase)

E.

u (lowercase)

Question 5

Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?

Options:

A.

kill -PIPE 123

B.

kill -KILL 123

C.

kill -STOP 123

D.

kill -TERM 123

Question 6

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 7

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 8

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 9

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 10

What is the effect of the egrep command when the -v option is used?

Options:

A.

It enables color to highlight matching parts.

B.

It only outputs non-matching lines.

C.

It shows the command's version information.

D.

It changes the output order showing the last matching line first.

Question 11

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 12

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 13

Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?

Options:

A.

<<

B.

<|

C.

!<

D.

&<

Question 14

Regarding the command:

nice -5 /usr/bin/prog

Which of the following statements is correct?

Options:

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.

Question 15

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

Options:

A.

&

B.

bg

C.

cont

D.

exec

E.

:&

Question 16

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 17

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

Question 18

What is the difference between the i and a command 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 19

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 20

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 21

The system is having trouble and the engineer wants to bypass the usual /sbin/init start up and run /bin/sh. What is the usual way to pass this change to the kernel from your boot loader?

Options:

A.

Start in runlevel 1.

B.

Pass init=/bin/sh on the kernel parameter line.

C.

Pass /bin/sh on the kernel parameter line.

D.

Pass start=/bin/sh on the kernel parameter line.

Question 22

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 23

You suspect that a new ethernet card might be conflicting with another device. Which file should you check within the /proc tree to learn which IRQs are being used by which kernel drivers?

Options:

Question 24

Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.)

Options:

A.

0

B.

1

C.

3

D.

5

E.

6

Question 25

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 26

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 27

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 28

During a system boot cycle, what program is executed after the BIOS completes its tasks?

Options:

A.

The bootloader

B.

The inetd program

C.

The init program

D.

The kernel

Question 29

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 30

You are having some trouble with a disk partition and you need to do maintenance on this partition but your users home directories are on it and several are logged in. Which command would disconnect the users and allow you to safely execute maintenance tasks?

Options:

A.

telinit 1

B.

shutdown -r now

C.

killall -9 inetd

D.

/bin/netstop --maint

E.

/etc/rc.d/init.d/network stop

Question 31

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 32

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 33

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 34

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 35

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 36

What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?

Options:

A.

/lib/init.so

B.

/sbin/init

C.

/etc/rc.d/rcinit

D.

/proc/sys/kernel/init

E.

/boot/init

Question 37

Which of the following commands updates the already installed RPM package rpmname?

Options:

A.

rpm --update rpmname

B.

rpm –U rpmname

C.

rpm –q rpmname

D.

rpm --force rpmname

E.

rpm –u rpmname

Question 38

Which of the following shell commands makes the already defined variable TEST visible to new child processes? (Choose two.)

Options:

A.

visible TEST

B.

declare +x TEST

C.

declare –x TEST

D.

export TEST

E.

export –v TEST

Question 39

What is the process ID number of the init process on a SysV init based system?

Options:

A.

-1

B.

0

C.

1

D.

It is different with each reboot.

E.

It is set to the current run level.

Question 40

In the vi editor, what vi command will copy (but not paste) from the current line at the cursor and the following 16 lines (17 lines total)? Specify the correct vi command without spaces.

Options:

Question 41

What is the purpose of the xargs command?

Options:

A.

It passes arguments to an X server.

B.

It reads standard input (STDIN) and builds up command lines to execute.

C.

It helps shell scripts take variable argument lists.

D.

It asks a question, graphically, and returns the answer to the shell.

E.

It allows users to specify long options for commands that normally only accept short options.

Question 42

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

Options:

Question 43

Which of the following command lines creates or, in case it already exists, overwrites a file called data with the output of ls?

Options:

A.

ls 3> data

B.

ls >& data

C.

ls > data

D.

ls >> data

Question 44

Which type of filesystem is created by mkfs when it is executed with the block device name only and without any additional parameters?

Options:

A.

ext2

B.

ext3

C.

ext4

D.

XFS

E.

VFAT

Question 45

Which command reads and displays the current contents of the Kernel Ring Buffer on the command line? (Specify ONLY the command without any path or parameters.)

Options:

Question 46

Which of the following commands is used to modify quota settings? (Choose two.)

Options:

A.

editquota

B.

setquota

C.

edquota

D.

quotaedit

E.

quotaset

Question 47

Which of the following commands creates an ext3 filesystem on /dev/sdb1? (Choose TWO correct answers.)

Options:

A.

/sbin/mke2fs -j /dev/sdb1

B.

/sbin/mkfs -t ext3 /dev/sdb1

C.

/sbin/mkfs -c ext3 /dev/sdb1

D.

/sbin/mke3fs -j /dev/sdb1

Question 48

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 49

Which of the following commands shows the definition of a given shell command?

Options:

A.

where

B.

stat

C.

type

D.

case

Question 50

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 51

Which of the following commands changes all occurrences of the word “bob” in file data to “Bob” and prints the result to standard output?

Options:

A.

sed‘/bob/Bob’ data

B.

sed‘s/bob/Bob/g’ data

C.

sed‘s/bob/Bob/’ data

D.

sed‘/bob/Bob/’ data

E.

sed‘s/bob,Bob/’ data

Question 52

How can the list of files that would be installed by the RPM package file apache-xml.rpm be previewed?

Options:

A.

rpm –qp apache-xml.rpm

B.

rpm –qv apache-xml.rpm

C.

rpm –ql apache-xml.rpm

D.

rpm –qpl apache-xml.rpm

Question 53

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.

Question 54

Which umask value will result in the default access permissions of 600 (rw-------) for files and 700 (rwx------) for directories? (Specify only the numerical umask value.)

Options:

Question 55

Which of the following properties of a Linux system should be changed when a virtual machine is cloned? (Choose two.)

Options:

A.

The partitioning scheme

B.

The file system

C.

The D-Bus Machine ID

D.

The permissions of /root/

E.

The SSH host keys

Question 56

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 57

Which of the following is true regarding the command sendmail?

Options:

A.

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

B.

When using systemd, sendmail is an alias to relayctl.

C.

The sendmail command prints the MTA's queue history of which mails have been sent successfully.

D.

It is only available when the sendmail MTA is installed.

E.

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

Question 58

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

Options:

A.

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

B.

Start and prepare the desktop environment for the user

C.

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

D.

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

E.

Handle the login of a user

Question 59

Which command displays the current disk space usage for all mounted file systems? (Specify ONLY the command without any path or parameters.)

Options:

Question 60

Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?

Options:

A.

tr –d ‘\r’ < userlist.txt > newlist.txt

B.

tr –c ‘\n\r’ ‘’ userlist.txt

C.

tr ‘\r\n’ ‘’ newlist.txt

D.

tr ‘\r’ ‘\n’ userlist.txt newlist.txt

E.

tr –s ‘/^M/^J/’ userlist.txt newlist.txt

Question 61

Which of the following states can NetworkManager show regarding the system's network connectivity? (Choose TWO correct answers.)

Options:

A.

up

B.

portal

C.

full

D.

login-required

E.

firewalled

Question 62

Which of the following files, located in a user’s home directory, contains the Bash history?

Options:

A.

.bashrc_history

B.

.bash_histfile

C.

.history

D.

.bash_history

E.

.history_bash

Question 63

What information related to a user account is modified using the chage command?

Options:

A.

Default ownership for new files

B.

Group membership

C.

Set of commands available to the user

D.

Password expiry information

E.

Default permissions for new files

Question 64

What is true regarding the statement beginning with #! that is found in the first line of a script? (Choose TWO correct answers.)

Options:

A.

It prevents the script from being executed until the \ is removed

B.

It triggers the installation of the scripts interpreter

C.

It specifies the path and the arguments of the interpreter used to run the script

D.

It defines the character encoding of the script

E.

It is a comment that is ignored by the script interpreter

Question 65

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="$ ((dare))"

D.

mydate=$(date)"

E.

mydate="${date}"

Question 66

When considering the use of hard links, what are valid reasons not to use hard links?

Options:

A.

Hard links are not available on all Linux systems because traditional filesystems, such as ext4, do not support them

B.

Each hard link has individual ownership, permissions and ACLs which can lead to unintended disclosure of file content

C.

Hard links are specific to one filesystem and cannot point to files on another filesystem

D.

If users other than root should be able to create hard links, suln has to be installed and configured

E.

When a hard linked file is changed, a copy of the file is created and consumes additional space

Question 67

Which of the following commands sets the system's time zone to the Canadian Eastern Time?

Options:

A.

localegen -t -f /usr/share/zoneinfo/Canada/Eastern > /etc/locale.tz

B.

tzconf /etc/localtime

C.

sysctl -w clock.tz='Canada/Eastern'

D.

modprobe tz_ca_est

E.

ln -sf /usr/share/zoneinfo/Canada/Eastern /etc/localtime

Question 68

After editing the TCP wrapper configuration to grant specific hosts access to a service when do these changes become effective?

Options:

A.

The new configuration becomes effective after restarting the respective service

B.

The new configuration becomes effective at the next system reboot

C.

The new configuration becomes effective when the last established connection to the service is closed

D.

The new configuration becomes effective after restarting the tcpd service

E.

The new configuration becomes effective immediately for all new connections

Question 69

Consider the following directory:

drwxrwxr-x 2 root sales 4096 Jan 1 15:21 sales

Which command ensures new files created within the directory sales are owned by the group sales? (Choose two.)

Options:

A.

chmod g+s sales

B.

setpol –R newgroup=sales sales

C.

chgrp –p sales sales

D.

chown --persistent *.sales sales

E.

chmod 2775 sales

Question 70

What is true regarding UEFI firmware? (Choose two.)

Options:

A.

It can read and interpret partition tables

B.

It can use and read certain file systems

C.

It stores its entire configuration on the /boot/ partition

D.

It is stored in a special area within the GPT metadata

E.

It is loaded from a fixed boot disk position

Question 71

What does the term Braille Display refer to?

Options:

A.

A standardized high contract graphical theme for desktop applications

B.

A Linux desktop environment similar to KDE and GNOME

C.

A legacy display technology superseded by LCD

D.

A physical representation of characters using small dots

E.

A standard file format for data exchange, similar to XML

Question 72

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 73

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 74

When removing 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 75

When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.)

Options:

A.

Timestamps

B.

MD5 checksums

C.

Inodes

D.

File sizes

E.

GnuPG signatures

Question 76

Which of the following commands can be used to perform a full text search on all available packages on a Debian system?

Options:

A.

apt

B.

apt-cache

C.

apt-get

D.

apt-search

E.

dpkg

Question 77

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

      update

      upgrade

Options:

Question 78

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 79

You want to preview where the package file, apache-xml.i386.rpm, will install its files before installing it. What command do you issue?

Options:

A.

rpm -qp apache-xml.i386.rpm

B.

rpm -qv apache-xml.i386.rpm

C.

rpm -ql apache-xml.i386.rpm

D.

rpm -qpl apache-xml.i386.rpm

Question 80

To prevent users from being able to fill up the / partition, the ____________ directory should be on a separate partition if possible because it is world writeable.

Options:

A.

/tmp

B.

tmp

Question 81

Which of the following options is used in a GRUB Legacy configuration file to define the amount of time that the GRUB menu will be shown to the user?

Options:

A.

hidemenu

B.

splash

C.

timeout

D.

showmenu

Question 82

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 83

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 84

Which function key is used to start Safe Mode in Windows NT?

Options:

A.

F10

B.

F8

C.

F6

D.

Windows NT does not support Safe Mode

Question 85

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

Question 86

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 87

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

    Swapoff

    /sbin/swapoff

Options:

Demo: 87 questions
Total 293 questions