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

Free and Premium LPI 101-500 Dumps Questions Answers

Page: 1 / 22
Total 293 questions

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

Question 1

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.

Buy Now
Question 2

: 6

The /etc/_______ file lists currently mounted devices.

Options:

Question 3

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

      mkdir

      /usr/bin/mkdir

Options:

Question 4

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

Options:

A.

BASHEXEC

B.

BASHRC

C.

PATH

D.

EXECPATH

E.

PATHRC

Question 5

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 6

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 7

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 8

Which grep command will print only the lines that do not end with a / in the file foo?

Options:

A.

grep'/$' foo

B.

grep '/#' foo

C.

grep -v '/$' foo

D.

grep -v '/#' foo

Question 9

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 10

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 11

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 12

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 13

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 14

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 15

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

Options:

A.

9

B.

19

C.

49

D.

99

Question 16

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 17

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 18

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 19

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 20

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 21

Which parameter is missing in the command

ip link set _dev eth0

to activate the previously inactive network interface eth0? (Specify the parameter only without any command, path or additional options)

Options:

Question 22

Given the following input stream:

txt1.txt

atxt.txt

txtB.txt

Which of the following regular expressions turns this input stream into the following output stream?

txt1.bak.txt

atxt.bak.txt

txtB.bak.txt

Options:

A.

s/^.txt/.bak/

B.

s/txt/bak.txt/

C.

s/txt$/bak.txt/

D.

s/^txt$/.bak^/

E.

s/[.txt]/.bak$1/

Question 23

Given the following routing table:

How would an outgoing packet to the destination 192 168 2 150 be handled?

Options:

A.

It would be passed to the default router 192 168 178 1 onwIan0.

B.

It would be directly transmitted on the device eth0

C.

It would be passed to the default router 255 255 255 0 on eth0

D.

It would be passed to the router 192 168.1.1 oneth0

E.

It would be directly transmitted on the device wlan0.

Question 24

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 25

What is contained on the EFI System Partition?

Options:

A.

The Linux root file system

B.

The first stage boot loader

C.

The default swap space file

D.

The Linux default shell binaries

E.

The user home directories

Question 26

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 27

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 28

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 29

Which file contains the date of the last change of a user's password?

Options:

A.

/etc/gshadow

B.

/etc/passwd

C.

/etc/pwdlog

D.

/var/log/shadow

E.

/etc/shadow

Question 30

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 31

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 32

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 33

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 34

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 35

What is true about the file .profile in a user's home directory?

Options:

A.

It must be executable

B.

It must call the binary of the login shell

C.

It must use a valid shell script syntax

D.

It must start with a shebang

E.

It must be readable for its owner only

Question 36

Which of the following keywords can be used in the die /etc/resolv.conf? (Choose TWO correct answers.)

Options:

A.

substitute

B.

lookup

C.

search

D.

nameserver

E.

method

Question 37

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

Options:

A.

The bootloader

B.

The inetd program

C.

The init program

D.

The kernel

Question 38

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 39

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 40

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 41

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 42

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 43

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

Options:

Question 44

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

Options:

Question 45

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 46

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 47

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 48

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 49

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 50

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 51

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 52

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

Following the Filesystem Hierarchy Standard (FHS), where should binaries that have been compiled by the system administrator be placed in order to be made available to all users on the system?

Options:

Question 56

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

Options:

A.

reinit

B.

initreload

C.

telinit 7

D.

telinit q

E.

init reinit

Question 57

What is the purpose of the Filesystem Hierarchy Standard?

Options:

A.

It is a security model used to ensure files are organized according to their permissions and accessibility.

B.

It provides unified tools to create, maintain and manage multiple filesystems in a common way.

C.

It defines a common internal structure of inodes for all compliant filesystems.

D.

Itis a distribution neutral description of locations of files and directories.

Question 58

Which of the following are modes of the vi editor? (Choose two.)

Options:

A.

edit mode

B.

insert mode

C.

change mode

D.

review mode

E.

command mode

Question 59

Which of the following is true for hard linked files? (Choose three.)

Options:

A.

The output of stat will report hard instead of regular file.

B.

The hard linked files have the same permissions and owner.

C.

The hard linked files share the same inode.

D.

The hard linked files are indicated by a -> when listed withls -1.

E.

The hard linked files must be on the same filesystem.

Question 60

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 61

Which of the following commands will produce the following output?

Options:

A.

jobs

B.

proclist

C.

netstat

D.

ps

Question 62

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.

Question 63

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 64

Which of the following commands will print important system information such as the kernel version and machine hardware architecture?

Options:

A.

sysinfo

B.

uname

C.

lspci

D.

arch

E.

info

Question 65

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 66

In order to display all currently mounted filesystems, which of the following commands could be used? (Choose TWO correct answers.)

Options:

A.

cat /proc/self/mounts

B.

free

C.

mount

D.

lsmounts

E.

cat /proc/filesystems

Question 67

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

Options:

A.

chmod +s /tmp

B.

chmod +t /tmp

C.

chmod 1775 /tmp

D.

chmod 4775 /tmp

E.

chmod 2775 /tmp

Question 68

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 69

Which of the following commands prints a list of available package updates when using RPM-based package management?

Options:

A.

dpkg list

B.

yum list

C.

dpkg check-update

D.

yum check-update

E.

yum list-update

Question 70

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 71

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 72

Which of the following are filesystems which can be used on Linux root partitions? (Choose two.)

Options:

A.

NTFS

B.

ext3

C.

XFS

D.

VFAT

E.

swap

Question 73

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 74

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 75

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)

Options:

A.

/custom-grub/boot/grub/

B.

/custom-grub/boot/grub

Question 76

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 77

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 78

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 79

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 80

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 81

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 82

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 83

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 84

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 85

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 86

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 87

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

Page: 1 / 22
Total 293 questions