Summer Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: myex65

Home > LPI > LPIC Level 1 > 101-500

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

Question # 4

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

A.

The bootloader

B.

The inetd program

C.

The init program

D.

The kernel

Full Access
Question # 5

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

A.

startd

B.

systemd

C.

Upstart

D.

SysInit

E.

SysV init

Full Access
Question # 6

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

Full Access
Question # 7

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

A.

silent

B.

verbose=0

C.

nomesg

D.

quiet

Full Access
Question # 8

The message "Hard Disk Error" is displayed on the screen during Stage 1 of the GRUB boot process. What does this indicate?

A.

The kernel was unable to execute /bin/init

B.

The next Stage cannot be read from the hard disk because GRUB was unable to determine the size and geometry of the disk

C.

One or more of the filesystems on the hard disk has errors and a filesystem check should be run

D.

The BIOS was unable to read the necessary data from the Master Boot Record to begin the boot process

Full Access
Question # 9

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)

Full Access
Question # 10

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

A.

shutdown -r now

B.

shutdown -r "rebooting"

C.

telinit 6

D.

telinit 0

E.

shutdown -k now "rebooting"

Full Access
Question # 11

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

A.

Device IRQ settings

B.

PCI bus speed

C.

System battery type

D.

Device vendor identification

E.

Ethernet MAC address

Full Access
Question # 12

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

A.

The bootloader

B.

The inetd program

C.

The init program

D.

The kernel

Full Access
Question # 13

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

Full Access
Question # 14

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?

Full Access
Question # 15

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?

A.

telinit 1

B.

shutdown -r now

C.

killall -9 inetd

D.

/bin/netstop --maint

E.

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

Full Access
Question # 16

Which signal is sent by the kill command by default?

A.

SIGHUP(1)

B.

SIGQUIT(3)

C.

SIGKILL(9)

D.

SIGTERM(15)

Full Access
Question # 17

What does the command mount -a do?

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.

Full Access
Question # 18

Which command creates a swap space on a block device or a file? (Specify ONLY the command without any path or parameters.)

Full Access
Question # 19

Which option to the tee command will cause the output to be concatenated on the end of the output file instead of overwriting the existing file contents?

A.

–a

B.

–c

C.

--no-clobber

D.

--continue

Full Access
Question # 20

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

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.

Full Access
Question # 21

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

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

Full Access
Question # 22

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

A.

where

B.

stat

C.

type

D.

case

Full Access
Question # 23

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

A.

/usr/share/documentation

B.

/usr/local/share/documentation

C.

/var/share/doc

D.

/usr/share/doc

E.

/etc/share/doc

Full Access
Question # 24

Which of the following commands instructs SysVinit to reload its configuration file?

A.

reinit

B.

initreload

C.

telinit 7

D.

telinit q

E.

init reinit

Full Access
Question # 25

Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)

A.

chmod +s /tmp

B.

chmod +t /tmp

C.

chmod 1775 /tmp

D.

chmod 4775 /tmp

E.

chmod 2775 /tmp

Full Access
Question # 26

Which command will uninstall a package but leave its configuration files in case the package is re-installed?

A.

dpkg –s pkgname

B.

dpkg –L pkgname

C.

dpkg –P pkgname

D.

dpkg –r pkgname

Full Access
Question # 27

Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?

A.

File size

B.

Modify timestamp

C.

Link count

D.

Inode number

E.

Permissions

Full Access
Question # 28

Where does the BIOS search for a bootloader?

A.

On all connected storage media regardless of the boot device order.

B.

On all connected storage media in the defined boot device order.

C.

Only on hard disk drives in the defined boot device order.

D.

Only on the last added storage media.

E.

The BIOS is not responsible to search for a valid bootloader.

Full Access
Question # 29

When piping the output of find to the xargs command, what option to find is useful if the filenames have spaces in them?

A.

–rep-space

B.

–print0

C.

–nospace

D.

–ignore-space

Full Access
Question # 30

What does the command grub-install /dev/sda do?

A.

GRUB creates partitions on the device/dev/sdato be used with Linux.

B.

GRUB sets the default BIOS boot device to/dev/sda.

C.

GRUB installs all required files and configures the boot loader on device/dev/sda.

D.

GRUB recompiles the Linux Kernel and installs it on the Master Boot Record of device/dev/sda.

Full Access
Question # 31

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

Full Access
Question # 32

After running the command umount /mnt, the following error message is displayed:

umount: /mnt: device is busy.

What is a common reason for this message?

A.

The kernel has not finished flushing disk writes to themounted device.

B.

A user has a file open in the /mnt directory.

C.

Another file system still contains a symlink to a file inside /mnt.

D.

The files in /mnt have been scanned and added to the locate database.

E.

The kernel thinks that a process is about to open a file in /mnt for reading.

Full Access
Question # 33

What does the? symbol within regular expressions represent?

A.

Match the preceding qualifier one or more times.

B.

Match the preceding qualifier zero or more times.

C.

Match the preceding qualifier zero or one times.

D.

Match a literal? character.

Full Access
Question # 34

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

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.

Full Access
Question # 35

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

A.

run

B.

bg

C.

fg

D.

back

Full Access
Question # 36

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?

A.

:r

B.

:n

C.

:w

D.

:e

Full Access
Question # 37

What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

A.

9

B.

19

C.

49

D.

99

Full Access
Question # 38

When given the following command line.

echo "foo bar" | tee bar | cat

Which of the following output is created?

A.

cat

B.

foo bar

C.

tee bar

D.

bar

E.

foo

Full Access
Question # 39

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

A.

vi starts and loads the last file used andmoves 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.

Full Access
Question # 40

Which of the following commands can be used to create a USB storage media from a disk image?

A.

gdisk

B.

dd

C.

cc

D.

fdisk

E.

mount

Full Access
Question # 41

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?

A.

<<

B.

<|

C.

!<

D.

&<

Full Access
Question # 42

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

A.

!

B.

+

C.

&

D.

%

E.

#

Full Access
Question # 43

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

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

Full Access
Question # 44

Which of the following explanations are valid reasons to run a command in the background of your shell?

A.

The command does not need to execute immediately.

B.

The command has to run immediately but the user needs to log out.

C.

The system is being shut down and the command needs to restart execution immediately after the reboot.

D.

The command can run at a lower priority than normal commands run on the command line.

Full Access
Question # 45

Which variable defines the directories in which a Bash shell searches for executable commands?

A.

BASHEXEC

B.

BASHRC

C.

PATH

D.

EXECPATH

E.

PATHRC

Full Access
Question # 46

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

A.

cat -n 10 filename

B.

dump -n 10 filename

C.

head -n 10 filename

D.

tail -n 10 filename

Full Access
Question # 47

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

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.

Full Access
Question # 48

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

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

Full Access
Question # 49

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

A.

rmdir '~/\dir'

B.

rmdir "~/\dir"

C.

rmdir ~/'dir'

D.

rmdir ~/\dir

E.

rmdir ~/\\dir

Full Access
Question # 50

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

A.

kill -PIPE 123

B.

kill -KILL 123

C.

kill -STOP 123

D.

kill -TERM 123

Full Access
Question # 51

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

Full Access
Question # 52

Which program runs a command in specific intervals and refreshes the display of the program’s output? (Specify ONLY the command without any path or parameters.)

Full Access
Question # 53

If an alias Is exists, which of the following commands updates the ai as to point to dig contmfl nd is -1 instead of the alias's current target?

A.

set ls-'ls -1"

B.

alias ls=,ls -1'

C.

alias --force ls='ls -1*

D.

alias --update Is ls='ls -1'

E.

realias Is-'Is -1'

Full Access
Question # 54

What is the first program the Linux kernel starts at boot time when using System V init?

A.

/lib/init.so

B.

/proc/sys/kernel/init

C.

/etc/rc.d/rcinit

D.

/sbin/init

E.

/boot/init

Full Access
Question # 55

Which of the following shell redirections will write standard output and standard error output to a file named filename?

A.

2>&1 >filename

B.

>filename 2>&1

C.

1>&2>filename

D.

>>filename

E.

1&2>filename

Full Access
Question # 56

What information is shown by the echo $ ? command?

A.

The process ID of the echo command

B.

The exit value of the command executed immediately before echo.

C.

The process ID which will be used for the next command

D.

The exit value of the echo command

E.

The process ID of the current shell

Full Access
Question # 57

How can a specific user be prevented from scheduling tasks with at?

A.

By adding the specific user to the/etc/at.allow file

B.

By adding the specific user to the 'deny] section in the/etc/atd.conf lile

C.

By adding the specific user to the no jobs group

D.

By adding the specific user to the /etc/at. deny file

E.

By executing the atd —deny [user] command

Full Access
Question # 58

Which mechanism does ssh use to interact with the SSH agent?

A.

Connecting to port 2222 which is used by the system-w»de SSH agent

B.

Using the fixed socket .ssh-agenc/ipc.

C.

Creating an alias replacing ssh with calls to ssh-agent

D.

Starting sab-agent as a child process for each ssh invocation

E.

Evaluating environment variables such as ssh_auth_sock.

Full Access
Question # 59

What is true regarding the command

ls > files

if files do not exist?

A.

The output of ls is printed to the terminal

B.

files is created and contains the output of ls

C.

An error message is shown and ls is not executed

D.

The command files is executed and receives the output of ls

E.

Any output of ls is discarded

Full Access
Question # 60

Which of the following commands lists the dependencies of the RPM package file foo.rpm?

A.

rpm –qpR foo.rpm

B.

rpm –dep foo

C.

rpm –ld foo.rpm

D.

rpm –R foo.rpm

E.

rpm –pD foo

Full Access
Question # 61

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.)

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

Full Access
Question # 62

Which of the following commands list all files and directories within the /tmp/ directory and its subdirectories which are owned by the user root? (Choose two.)

A.

find /tmp –user root -print

B.

find –path /tmp –uid root

C.

find /tmp –uid root -print

D.

find /tmp –user root

E.

find –path /tmp –user root -print

Full Access
Question # 63

Which of the following commands finds all files owned by root that have the SetUID bit set?

A.

find / -user root -perm -4000

B.

find / -user 0 -mode +s

C.

find / -owner 0 -permits 0x100000000

D.

find / -owner root -setuid

E.

find / --filter uid=1 --filter pers=u+s

Full Access
Question # 64

Which of the following regular expressions represents a single upper-case letter?

A.

:UPPER:

B.

[A-Z]

C.

!a-z

D.

%C

E.

{AZ}

Full Access
Question # 65

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

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

Full Access
Question # 66

Given a log file loga.log with timestamps of the format DD/MM/YYYY:hh:mm:ss, which command filters out all log entries in the time period between 8:00 am and 8:59 am?

A.

grep –E ‘:08:[09]+:[09]+’ loga.log

B.

grep –E ‘:08:[00]+’ loga.log

C.

grep –E loga.log ‘:08:[0-9]+:[0-9]+’

D.

grep loga.log ‘:08:[0-9]:[0-9]’

E.

grep –E ‘:08:[0-9]+:[0-9]+’ loga.log

Full Access
Question # 67

Which of the following commands display the number of bytes transmitted and received via the eth0 network interfaced (Choose TWO correct answers.)

A.

route -v via eth0

B.

ip stats show dev eth0

C.

netstat -s -i eth0

D.

ifconfig eth0

E.

ip -s link show eth0

Full Access
Question # 68

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)?

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

Full Access
Question # 69

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?

A.

auto-update

B.

upgrade

C.

dist-upgrade

D.

install

E.

update

Full Access
Question # 70

If neither cron. allow nor cron. deny exist in /etc/, which of the following is true?

A.

Without additional configuration, all users may create user specific crontabs

B.

Without additional configuration, only root may create user specific crontabs

C.

The cron daemon will refuse to start and report missing files in the system's logfile

D.

When a user creates a user specific crontab the system administrator must approve it explicitly

E.

The default settings of /etc/crond.conf define whether or not user specific crontabs are generally allowed or not.

Full Access
Question # 71

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.)

Full Access
Question # 72

Which of the following commands lists the dependencies of a given dpkg package?

A.

apt-cache depends-onpackage

B.

apt-cache dependencies package

C.

apt-cache depends package

D.

apt-cache requires package

Full Access
Question # 73

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

A.

yum --query --all

B.

yum --list --installed

C.

rpm --query --all

D.

rpm --list –installed

Full Access
Question # 74

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

A.

kill -HUP $(pidof grub)

B.

grub-install

C.

grub

D.

No action is required

Full Access
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.)

A.

Timestamps

B.

MD5 checksums

C.

Inodes

D.

File sizes

E.

GnuPG signatures

Full Access
Question # 76

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

A.

apt-get update

B.

apt-get upgrade

C.

apt-cache update

D.

apt-get refresh

E.

apt-cache upgrade

Full Access
Question # 77

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

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

Full Access
Question # 78

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

      update

      upgrade

Full Access
Question # 79

The dpkg-____ command will ask configuration questions for a specified package, just as if the package were being installed for the first time.

Full Access
Question # 80

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

A.

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

B.

dd if=/dev/zero of=/dev/sda bs=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

Full Access
Question # 81

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

A.

--clean

B.

--delete

C.

--purge

D.

–remove

Full Access
Question # 82

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/

Full Access
Question # 83

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.)

Full Access
Question # 84

What can the Logical Volume Manager (LVM) be used for? (Choose THREE correct answers.)

A.

To create RAID 9 arrays.

B.

To dynamically change the size of logical volumes.

C.

To encrypt logical volumes.

D.

To create snapshots.

E.

To dynamically create or delete logical volumes.

Full Access
Question # 85

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

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

Full Access
Question # 86

An administrator has issued the following command:

grub-install --root-directory=/custom-grub /dev/sda

In which directory will new configuration files be found? (Provide the full directory path only without the filename)

A.

/custom-grub/boot/grub/

B.

/custom-grub/boot/grub

Full Access
Question # 87

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)

A.

/var

B.

/var/,

C.

Var

D.

var/

Full Access