Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Number: 101-500 Passing Score: 800 Time Limit: 120 Min

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

101-500.

59q

Number: 101-500
Passing Score: 800
Time Limit: 120 min

101-500

https://www.gratisexam.com/

LPIC-1 Exam 101

https://www.gratisexam.com/
Exam A

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

https://www.gratisexam.com/

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

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 2
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

https://www.gratisexam.com/
C. chgrp –p sales sales
D. chown --persistent *.sales sales
E. chmod 2775 sales

Correct Answer: CE
Section: (none)
Explanation

Explanation/Reference:

QUESTION 3
Which chown command changes the ownership to dave and the group to staff on a file named data.txt?

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
E. chown dave:staff data.txt

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

QUESTION 4
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

Correct Answer: C
Section: (none)

https://www.gratisexam.com/
Explanation

Explanation/Reference:

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

A. /opt/man/
B. /usr/doc/
C. /usr/share/man/
D. /var/pkg/man
E. /var/man/

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 6
FILL BLANK

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

Correct Answer: cmdline


Section: (none)
Explanation

Explanation/Reference:

QUESTION 7
What is the process ID number of the init process on a System V init based system?

A. -1
B. 0
C. 1

https://www.gratisexam.com/
D. It is different with each reboot
E. It is set to the current run level

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 8
Which daemon handles power management events on a Linux system?

A. acpid
B. batteryd
C. pwrmgntd
D. psd
E. inetd

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:

QUESTION 9
Which of the following statements are true about the boot sequence of a PC using a BIOS? (Choose two.)

A. Some parts of the boot process can be configured from the BIOS
B. Linux does not require the assistance of the BIOS to boot a computer
C. The BIOS boot process starts only if secondary storage, such as the hard disk, is functional
D. The BIOS initiates the boot process after turning the computer on
E. The BIOS is started by loading hardware drivers from secondary storage, such as the hard disk

Correct Answer: AD
Section: (none)
Explanation

https://www.gratisexam.com/
Explanation/Reference:

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

A. Using lsmod --remove --autoclean without specifying the name of a specific module
B. Using modinfo –k followed by the name of the offending module
C. Using modprobe –r followed by the name of the offending module
D. Adding a blacklist line including the name of the offending module to the file /etc/modprobe.d/blacklist.conf
E. Deleting the kernel module’s directory from the file system and recompiling the kernel, including its modules

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

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

A. When the ring buffer is explicitly reset using the command dmesg --clear
B. When the ring buffer is read using dmesg without any additional parameters
C. When a configurable amount of time, 15 minutes by default, has passed
D. When the kernel loads a previously unloaded kernel module
E. When the system is shut down or rebooted

Correct Answer: AE
Section: (none)
Explanation

Explanation/Reference:

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

https://www.gratisexam.com/
A. /lib/init.so
B. /proc/sys/kernel/init
C. /etc/rc.d/rcinit
D. /sbin/init
E. /boot/init

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 13
A Debian package creates several files during its installation. Which of the following commands searches for packages owning the file /etc/debian_version?

A. apt-get search /etc/debian_version


B. apt –r /etc/debian_version
C. find /etc/debian_version -dpkg
D. dpkg –S /etc/debian_version
E. apt-file /etc/debian_version

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

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

A. The partitioning scheme


B. The file system
C. The D-Bus Machine ID
D. The permissions of /root/
E. The SSH host keys

https://www.gratisexam.com/
Correct Answer: CE
Section: (none)
Explanation

Explanation/Reference:

QUESTION 15
Which of the following commands installs GRUB 2 into the master boot record on the third hard disk?

A. grub2 install /dev/sdc


B. grub-mkrescue /dev/sdc
C. grub-mbrinstall /dev/sdc
D. grub-setup /dev/sdc
E. grub-install /dev/sdc

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

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

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

Correct Answer: CD
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
QUESTION 17
Which of the following apt-get subcommands installs the newest versions of all currently installed packages?

A. auto-update
B. dist-upgrade
C. full-upgrade
D. install
E. update

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

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

A. dpkg –s pkgname
B. dpkg –L pkgname
C. dpkg –P pkgname
D. dpkg –v pkgname
E. dpkg –r pkgname

https://www.gratisexam.com/

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
QUESTION 19
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

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:

QUESTION 20
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. 15
C. 19
D. 49
E. 99

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 21
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

https://www.gratisexam.com/
C. find /tmp –uid root -print
D. find /tmp –user root
E. find –path /tmp –user root -print

Correct Answer: AD
Section: (none)
Explanation

Explanation/Reference:

QUESTION 22
Which of the following are valid stream redirection operators within Bash? (Choose two.)

A. <
B. #>
C. %>
D. >>>
E. 2>&1

Correct Answer: AE
Section: (none)
Explanation

Explanation/Reference:

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

A. d2
B. 2d
C. 2dd
D. dd2
E. de12

Correct Answer: C
Section: (none)

https://www.gratisexam.com/
Explanation

Explanation/Reference:

QUESTION 24
The command dbmaint & was used to run dbmaint in the background. However, dbmaint is terminated after logging out of the system. Which alternative
dbmaint invocation lets dbmaint continue to run even when the user running the program logs out?

A. job –b dmaint
B. dbmaint &>/dev/pts/null
C. nohup dbmaint &
D. bg dbmaint
E. wait dbmaint

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 25
From a Bash shell, which of the following commands directly execute the instructions from the file /usr/local/bin/runme.sh without starting a subshell?
(Choose two.)

A. source /usr/local/bin/runme.sh
B. /usr/local/bin/runme.sh
C. /bin/bash /usr/local/bin/runme.sh
D. . /usr/local/bin/runme.sh
E. run /usr/local/bin/runme.sh

Correct Answer: AD
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
QUESTION 26
FILL BLANK

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

Correct Answer: watch


Section: (none)
Explanation

Explanation/Reference:

QUESTION 27
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?

A. i (lowercase)
B. p (lowercase)
C. P (uppercase)
D. U (uppercase)
E. u (lowercase)

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

QUESTION 28
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?

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


B. tr –c ‘\n\r’ ‘’ <newlist.txt> userlist.txt
C. tr ‘\r\n’ ‘’ <userlist.txt> newlist.txt
D. tr ‘\r’ ‘\n’ userlist.txt newlist.txt
E. tr –s ‘/^M/^J/’ userlist.txt newlist.txt

https://www.gratisexam.com/
Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:

QUESTION 29
What output will be displayed when the user fred executes the following command?
echo ‘fred $USER’

A. fred fred
B. fred /home/fred/
C. ‘fred $USER’
D. fred $USER
E. ‘fred fred’

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

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

A. lsattr foo
B. apropos foo
C. locate foo
D. whatis foo
E. which foo

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
QUESTION 31
When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?

A. –rep-space
B. -printnul
C. -nospace
D. –ignore-space
E. –print0

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

QUESTION 32
Which of the following commands can be used to determine how long the system has been running? (Choose two.)

A. uptime
B. up
C. time --up
D. uname –u
E. top

Correct Answer: AE
Section: (none)
Explanation

Explanation/Reference:

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

A. .bashrc_history

https://www.gratisexam.com/
B. .bash_histfile
C. .history
D. .bash_history
E. .history_bash

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 34
Which wildcards will match the following filenames? (Choose two.)
ttyS0
ttyS1
ttyS2

A. ttyS[1-5]
B. tty?[0-5]
C. tty*2
D. tty[A-Z][012]
E. tty[Ss][02]

Correct Answer: BD
Section: (none)
Explanation

Explanation/Reference:

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

A. ls >-1
B. ls <<ERR
C. ls >&2
D. ls >>2

https://www.gratisexam.com/
E. ls |error

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 36
Which of the following commands displays the contents of a gzip compressed tar archive?

A. gzip archive.tgz | tar xvf -


B. tar –fzt archive.tgz
C. gzip –d archive.tgz | tar tvf -
D. tar cf archive.tgz
E. tar ztf archive.tgz

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

QUESTION 37
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. cut –d : -f 1,4 /etc/passwd
C. sort –t : -k 1,4 /etc/passwd
D. paste –f 1,4 /etc/passwd
E. split –c 1,4 /etc/passwd

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
QUESTION 38
Which of the following regular expressions represents a single upper-case letter?

A. :UPPER:
B. [A-Z]
C. !a-z
D. %C
E. {AZ}

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

QUESTION 39
The installation of a local Debian package failed due to unsatisfied dependencies. Which of the following commands installs missing dependencies and completes
the interrupted package installation?

A. dpkg --fix --all


B. apt-get autoinstall
C. dpkg-reconfigure --all
D. apt-get all
E. apt-get install -f

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

QUESTION 40
Which of the following commands are valid in the GRUB 2 configuration file? (Choose two.)

A. menuentry

https://www.gratisexam.com/
B. uefi
C. pxe-ifconfig
D. insmod
E. kpartx

Correct Answer: AD
Section: (none)
Explanation

Explanation/Reference:

QUESTION 41
What is the purpose of the ldd command?

https://www.gratisexam.com/

A. It lists which shared libraries a binary needs to run.


B. It installs and updates installed shared libraries.
C. It turns a dynamically linked binary into a static binary.
D. It defines which version of a library should be used by default.
E. It runs a binary with an alternate library search path.

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:

QUESTION 42
What can the Logical Volume Manager (LVM) be used for? (Choose three.)

A. To create snapshots.

https://www.gratisexam.com/
B. To dynamically change the size of logical volumes.
C. To dynamically create or delete logical volumes.
D. To create RAID 9 arrays.
E. To encrypt logical volumes.

Correct Answer: ABC


Section: (none)
Explanation

Explanation/Reference:

QUESTION 43
What are the main differences between GPT and MBR partition tables regarding maximum number and size of partitions? (Choose two.)

A. MBR can handle partition sizes up to 4 TB, whereas GPT supports partition sizes up to 128 ZB.
B. By default, GPT can manage up to 128 partitions while MBR only supports four primary partitions.
C. By default, GPT can manage up to 64 partitions while MBR only supports 16 primary partitions.
D. MBR can handle partition sizes up to 2.2 TB, whereas GPT supports sizes up to 9.4 ZB.
E. Both GPT and MBR support up to four primary partitions, each with up to 4096 TB.

Correct Answer: BD
Section: (none)
Explanation

Explanation/Reference:

QUESTION 44
A backup software heavily uses hard links between files which have not been changed in between two backup runs. Which benefits are realized due to these hard
links? (Choose two.)

A. The old backups can be moved to slow backup media, such as tapes, while still serving as hard link target in new backups.
B. The backup runs faster because hard links are asynchronous operations, postponing the copy operation to a later point in time.
C. The backup is guaranteed to be uncharged because a hard linked file cannot be modified after its creation.
D. The backup consumes less space because the hard links point to the same data on disk instead of storing redundant copies.
E. The backup runs faster because, instead of copying the data of each file, hard links only change file system meta data.

https://www.gratisexam.com/
Correct Answer: AD
Section: (none)
Explanation

Explanation/Reference:

QUESTION 45
FILL BLANK

Which file from the /proc/ file system contains a list of all currently mounted devices? (Specify the full name of the file, including path.)

Correct Answer: /proc/mounts


Section: (none)
Explanation

Explanation/Reference:

QUESTION 46
How many fields are in a syntactically correct line of /etc/fstab?

A. 3
B. 4
C. 5
D. 6
E. 7

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 47
Running chmod 640 filea.txt as a regular user doesn’t update filea.txt’s permission. What might be a reason why chmod cannot modify the
permissions? (Choose two.)

A. filea.txt is owned by another user and a regular user cannot change the permissions of another user’s file.

https://www.gratisexam.com/
B. filea.txt is a symbolic link whose permissions are a fixed value which cannot be charged.
C. filea.txt has the sticky bit set and a regular user cannot remove this permission.
D. filea.txt is a hard link whose permissions are inherited from the target and cannot be set directly.
E. filea.txt has the SetUID bit set which imposes the restriction that only the root user can make changes to the file.

Correct Answer: AB
Section: (none)
Explanation

Explanation/Reference:

QUESTION 48
Which of the following commands show how the shell handles a specific command?

A. where
B. type
C. stat
D. case
E. fileinfo

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

QUESTION 49
Which of the following commands displays the manual page command from section 1?

A. man command(1)
B. man command@1
C. man 1 command
D. man 1.command
E. man -s 1 command

Correct Answer: C

https://www.gratisexam.com/
Section: (none)
Explanation

Explanation/Reference:

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

A. ls 3> data
B. ls >& data
C. ls > data
D. ls >> data
E. ls >>> data

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 51
Which of the following commands is used to change options and positional parameters within a running Bash shell?

A. history
B. setsh
C. bashconf
D. set
E. envsetup

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 52

https://www.gratisexam.com/
Which of the following commands outputs test to the shell?

A. cat <!EOT
test
EOT
B. cat <|EOT
test
EOT
C. cat !<EOT
test
EOT
D. cat &<EOT
test
EOT
E. cat <<EOT
test
EOT

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

QUESTION 53
What is the default nice level when a process is started using the nice command?

A. -10
B. 0
C. 10
D. 15
E. 20

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
QUESTION 54
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remote that directory?

A. rmdir ~/\\dir
B. rmdir “~/\dir”
C. rmdir ~/’dir’
D. rmdir ~/\dir
E. rmdir ‘~/\dir’

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 55
Which of the following commands can perform searches on file contents using regular expressions?

A. find
B. locate
C. grep
D. reggrep
E. pgrep

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 56
Which of the following commands determines a file’s format by using a definition database file which contains information about all common file types?

A. type
B. file

https://www.gratisexam.com/
C. magic
D. pmagic
E. hash

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

QUESTION 57
Which of the following commands generates a list of user names from /etc/passwd along with their login shell?

A. column -s : 1,7 /etc/passwd


B. chop -c 1,7 /etc/passwd
C. colrm 1,7 /etc/passwd
D. sort -t: -k1,7 /etc/passwd
E. cut -d: -f1,7 /etc/passwd

Correct Answer: E
Section: (none)
Explanation

Explanation/Reference:

QUESTION 58
If the gzip compressed tar archive texts.tgz contains the files a.txt and b.txt, which files will be present in the current directory after running gunzip
texts.tgz?

A. Only a.txt, b.txt, and texts.tgz


B. Only texts.tar and texts.tgz
C. Only a.txt.gz and b.txt.gz
D. Only a.txt and b.txt
E. Only texts.tar

Correct Answer: B

https://www.gratisexam.com/
Section: (none)
Explanation

Explanation/Reference:

QUESTION 59
When booting from the hard disk, a computer successfully loads the Linux kernel and initramfs but hangs during the subsequent startup tasks. The system is
booted using a Linux based rescue CD to investigate the problem. Which of the following methods helps to identify the root cause of the problem?

A. Using the dmesg command from the rescue CD’s shell to view the original system’s boot logs.
B. Investigating the file /proc/kmsg on the computer’s hard disk for possible errors.
C. Investigating the file /var/log on the computer’s hard disk for possible errors.
D. Using chroot to switch to the file system on the hard disk and use dmesg to view the logs.
E. Rebooting again from the hard drive since the system successfully booted from the rescue CD.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/

https://www.gratisexam.com/

You might also like