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

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

Page: 1 / 29
Total 293 questions

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

Question 1

Which of the commands below might have produced the following output?

Question # 1

Options:

A.

dig -t rax www.example.org

B.

dig www.example.org

C.

dig -t ns www.example.org

D.

dig -t a www.example.org

E.

dig -t soa www.example.org

Question 2

Which environment variable is used by an X11 client to determine the X Server to connect to1? (Specify ONLY the variable name without any preceding commands or values.)

Options:

Question 3

What is true regarding public and pnvate SSH keys? (Choose TWO correct answers.)

Options:

A.

For each user account, there is exactly one key pair that can be used to log into that account

B.

The private key must never be revealed to anyone

C.

Several different public keys may be generated for the same private key

D.

To maintain the private key's confidentiality, the SSH key pair must be created by its owner

E.

To allow remote logins, the user's private key must be copied to the remote server

Question 4

Which directory holds configuration files for xinetd services? (Specify the full path to the directory)

Options:

Question 5

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 6

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

Options:

A.

env

B.

export

C.

env -a

D.

set

E.

echo $ENV

Question 7

Which of the following sections exists in a systemd timer unit?

Options:

A.

[Events]

B.

[Timer]

C.

[cron]

D.

[Schedule]

E.

[Trigger]

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 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 10

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 11

What command is used to add OpenSSH private keys to a running ssh-agent instance? (Specify the command name only without any path.)

Options:

Question 12

Which of the following getent invocations lists all existing users?

Options:

A.

getent homes

B.

getent uids

C.

getent passwd

D.

getent users

E.

getent logins

Question 13

Which of the following protocols is designed to access the video card output of a virtual machine?

Options:

A.

KDE

B.

X11

C.

Xfce

D.

SPICE

E.

XDMCP

Question 14

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 15

How do shadow passwords improve the password security in comparison to standard non-shadow passwords'?

Options:

A.

Regular users do not have access to the password hashes of shadow passwords

B.

Every shadow password is valid for 45 days and must be changed afterwards

C.

The system's host key is used to encrypt all shadow passwords.

D.

Shadow passwords are always combined with a public key that has to match the user's private key

E.

Shadow passwords are stored in plain text and can be checked for weak passwords

Question 16

Where is the systemd journal stored?

Options:

A.

/var/jlog and /var/jlogd/

B.

/proc/log and /proc/klog

C.

/run/log/journal/ or /var/log/journal/

D.

/var/log/syslog.bin or /var/log/syslog.jrn

E.

/etc/systemd/journal/ or /usr/lib/systemd/journal/

Question 17

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?

Options:

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'

Question 18

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

Options:

A.

/lib/init.so

B.

/proc/sys/kernel/init

C.

/etc/rc.d/rcinit

D.

/sbin/init

E.

/boot/init

Question 19

Which of the following commands makes /bin/foo executable by everyone but writable only by its owner?

Options:

A.

chmod u=rwx,go=rx /bin/foo

B.

chmod o+rwx,a+rx /bin/foo

C.

chmod 577 /bin/foo

D.

chmod 775 /bin/foo

Question 20

Which of the following statements is correct for a command line ending with a & character?

Options:

A.

The command’s output is redirected to/dev/null.

B.

The result of the command defines if the next command will be run.

C.

Thecommand is run in background of the current shell.

D.

The command is run as a direct child of theinitprocess.

Question 21

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 22

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 23

Which of the following commands changes the number of days before the ext3 filesystem on /dev/sda1 has to run through a full filesystem check while booting?

Options:

A.

tune2fs -d 200 /dev/sda1

B.

tune2fs -c 200 /dev/sda1

C.

tune2fs -i 200 /dev/sda1

D.

tune2fs -n 200 /dev/sda1

E.

tune2fs --days 200 /dev/sda1

Question 24

Pressing the Ctrl-C combination on the keyboard while a command is executing in the foreground sends which of the following signal codes?

Options:

A.

1(SIGHUP)

B.

2(SIGINT)

C.

3(SIGQUIT)

D.

9(SIGKILL)

E.

15(SIGTERM)

Question 25

When using regular expressions, which of the following characters match the beginning of a line?

Options:

A.

^

B.

?

C.

*

D.

+

E.

$

Question 26

Which of the following commands will change all CR-LF pairs in an imported text file, userlist.txt, to Linux standard LF characters and store it as newlist.txt?

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Question 27

Which of the following commands will mount an already inserted CD-ROM in /dev/sr0 onto an existing directory /mnt/cdrom when issued with root privileges?

Options:

A.

mount /dev/cdrom /mnt/cdrom

B.

mount /dev/sr0 /mnt/cdrom

C.

mount –t cdrom /dev/sr0 /mnt/cdrom

D.

mount –l cdrom /dev/sr0 /mnt/cdrom

E.

mount –f /dev/sr0/mnt/cdrom

Question 28

Which of the following commands changes the ownership of file.txt to the user dan and the group staff?

Options:

A.

chown dan/staff file.txt

B.

chown dan:staff file.txt

C.

chown -u dan -g staff file.txt

D.

chown dan -g staff file.txt

Question 29

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 30

Which SysV init configuration file is commonly used to set the default run level? (Specify the full name of the file, including path.)

Options:

Question 31

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 32

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 33

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 34

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 35

Which of the following commands will display the inode usage of each mounted filesystem?

Options:

A.

du –i

B.

df –i

C.

lsfs –i

D.

printfs –i

Question 36

When planning a partition scheme, which of the following directories could be considered for separate partitions? (Choose three.)

Options:

A.

/etc

B.

/home

C.

/var

D.

/lib

E.

/opt

Question 37

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 38

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 39

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 40

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 devices are 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 orcharacter devices in /dev/ using mknod.

D.

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

E.

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

Question 41

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 42

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 43

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 44

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 45

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

Options:

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

Question 46

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 47

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

Options:

Question 48

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 49

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 50

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 51

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 52

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 53

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 54

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

Options:

Question 55

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 56

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 57

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 58

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 59

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 60

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

Options:

A.

apt-cache depends-onpackage

B.

apt-cache dependencies package

C.

apt-cache depends package

D.

apt-cache requires package

Question 61

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

    Swapoff

    /sbin/swapoff

Options:

Question 62

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

Options:

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.

Question 63

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 64

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

Options:

Question 65

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 66

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 67

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 68

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

      update

      upgrade

Options:

Question 69

Which file should be edited to select the network locations from which Debian installation package files are loaded?

Options:

A.

/etc/dpkg/dpkg.cfg

B.

/etc/apt/apt.conf

C.

/etc/apt/apt.conf.d

D.

/etc/apt/sources.list

E.

/etc/dpkg/dselect.cfg

Question 70

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

Question 71

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 72

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 73

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 74

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

Question 75

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 76

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 standard output.

E.

standard output to standard input.

Question 77

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 78

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 79

Which of the following files, located in the user home directory, is used to store the Bash history?

Options:

A.

.bash_history

B.

.bash_histfile

C.

.history

D.

.bashrc_history

E.

.history_bash

Question 80

What is the default action of the split command on an input file?

Options:

A.

It will break the file into new files of 1,024 byte pieces each.

B.

It will break the file into new files of 1,000 line pieces each.

C.

It will break the file into new files of 1,024 kilobyte pieces each.

D.

It will break the file into new files that are no more than 5% of the size of the original file.

Question 81

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 82

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 83

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

Options:

A.

history

B.

set

C.

bashconf

D.

setsh

E.

envsetup

Question 84

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 85

What does the? symbol within regular expressions represent?

Options:

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.

Question 86

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 87

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)

Page: 1 / 29
Total 293 questions