
Free Lpi (101-500) Certification Sample Questions with Online Practice Test
101-500 Certification Study Guide Pass 101-500 Fast
NEW QUESTION # 30
Which of the following commands print the current working directory when using a Bash shell? (Choose two.) echo "${PWD}"
- A. printwd
- B.
- C. pwd
- D. echo "${WD}"
- E. echo "${pwd}"
Answer: D,E
NEW QUESTION # 31
Which of the following statements is correct for a command line ending with a & character?
- A. The result of the command defines if the next command will be run.
- B. Thecommand is run in background of the current shell.
- C. The command's output is redirected to/dev/null.
- D. The command is run as a direct child of theinitprocess.
Answer: B
Explanation:
Explanation
The statement that is correct for a command line ending with a & character is that the command is run in background of the current shell. The & character tells the shell to run the command in the background, which means that the shell does not wait for the command to finish and returns the prompt immediately. The command's output is not redirected to /dev/null, unless explicitly specified. The result of the command does not define if the next command will be run, unless the commands are separated by a logical operatorsuch as && or ||. The command is not run as a direct child of the init process, unless the shell is the init process itself. References: [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.1: Work on the command line, Background Processes
NEW QUESTION # 32
Which of the following is true for hard linked files? (Choose three.)
- A. The hard linked files share the same inode.
- B. The hard linked files must be on the same filesystem.
- C. The hard linked files are indicated by a -> when listed withls -1.
- D. The hard linked files have the same permissions and owner.
- E. The output of stat will report hard instead of regular file.
Answer: A,B,D
Explanation:
Explanation
A hard link is a directory entry that points to the same inode as another file. An inode is a data structure that stores the metadata and the location of the data blocks of a file. A hard link is not a separate file, but an additional name for an existing file. Therefore, the following statements are true for hard linked files:
* The hard linked files have the same permissions and owner. Since the hard linked files point to the same inode, they share the same attributes, such as the file type, the file size, the access permissions, the owner, the group, and the timestamps. Any changes made to one hard link will affect the other hard links as well. For example, if you change the permissions of one hard link, the other hard links will have the same permissions. You can use the stat command to view the attributes of a file or a hard link.
* The hard linked files share the same inode. This is the definition of a hard link. The inode number is a unique identifier for each file on a filesystem. The hard linked files have the same inode number, which means they point to the same data blocks on the disk. You can use the ls -i command to view the inode number of a file or a hard link.
* The hard linked files must be on the same filesystem. A hard link cannot cross different filesystems or partitions, because each filesystem has its own inode table. A hard link can only point to an inodethat exists on the same filesystem as the hard link. If you try to create a hard link to a file on a different filesystem, you will get an error message saying:
ln: failed to create hard link 'link' => 'file': Invalid cross-device link The other statements are not true for hard linked files, because:
* The output of stat will report hard instead of regular file. This is not true, because the stat command does not distinguish between a regular file and a hard link. The stat command will report the same file type for both the original file and the hard link, which is regular file. The only way to tell if a file is a hard link is to check the link count, which is the number of directory entries that point to the same inode. If the link count is more than one, it means there are hard links to the file. You can use the stat -c %h command to view the link count of a file or a hard link.
* The hard linked files are indicated by a -> when listed with ls -l. This is not true, because the -> symbol is used to indicate a symbolic link, not a hard link. A symbolic link, also known as a soft link, is a special type of file that contains a path to another file or directory. A symbolic link does not point to the same inode as the target file, but to the name of the target file. A symbolic link has its own inode number, file type, permissions, and timestamps, which can be different from the target file. You can use the ls -l command to view the file type, permissions, and name of a file or a symbolic link. A symbolic
* link will have the file type l and the name will be followed by a -> symbol and the path to the target file.
For example:
lrwxrwxrwx. 1 user user 9 Aug 29 15:10 link -> file
References:
* Hard links and soft links in Linux explained | Enable Sysadmin
* Hard Link in Linux: Everything Important You Need to Know
* A Brief Introduction to Hard and Soft Links in Linux - LinuxForDevices
* How to create links between files in the Linux? - Online Tutorials Library
* What is a hard link? - definition by The Linux Information Project (LINFO)
NEW QUESTION # 33
Which of the following files, located in the user home directory, is used to store the Bash history?
- A. .history
- B. .history_bash
- C. .bash_history
- D. .bash_histfile
- E. .bashrc_history
Answer: C
NEW QUESTION # 34
Which of the following commands print the current working directory when using a Bash shell? (Choose two.)
- A. pwd
- B. printwd
- C. echo "${WD}"
- D. echo "${PWD}"
- E. echo "${pwd}"
Answer: A,D
NEW QUESTION # 35
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. !<
Answer: B
NEW QUESTION # 36
Which of the following commands changes all CR-LFline breaks in the text file userlist.txtto Linux standard LF line breaks and stores the result in newlist.txt?
tr -d '\r' < userlist.txt > newlist.txt
- A.
- B. tr '\r\n' '' <userlist.txt> newlist.txt
- C. tr -c '\n\r' '' <newlist.txt> userlist.txt
- D. tr -s '/^M/^J/' userlist.txt newlist.txt
- E. tr '\r' '\n' userlist.txt newlist.txt
Answer: C
NEW QUESTION # 37
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
- A. /sbin/init
- B. /lib/init.so
- C. /etc/rc.d/rcinit
- D. /boot/init
- E. /proc/sys/kernel/init
Answer: A
NEW QUESTION # 38
What is the correct way to set the default systemd boot target to multi-user?
systemctl isolate multi-user.target
- A. systemctl set-default multi-user.target
- B.
- C. systemctl set-boot multi-user.target
- D. systemctl boot -p multi-user.target
- E. systemctl set-runlevel multi-user.target
Answer: D
NEW QUESTION # 39
Which of the following commands prints a list of available package updates when using RPM-based package management?
- A. dpkg list
- B. dpkg check-update
- C. yum list
- D. yum check-update
- E. yum list-update
Answer: D
NEW QUESTION # 40
Which file should be edited to select the network locations from which Debian installation package files are loaded?
- A. /etc/apt/apt.conf
- B. /etc/apt/sources.list
- C. /etc/dpkg/dpkg.cfg
- D. /etc/apt/apt.conf.d
- E. /etc/dpkg/dselect.cfg
Answer: B
NEW QUESTION # 41
The system configuration file named _______ is commonly used to set the default runlevel. (Please provide the file name with full path information)
Answer:
Explanation:
/etc/inittab
NEW QUESTION # 42
From a Bash shell, which of the following commands directly executes the instruction from the file
/usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)
- A. run /usr/local/bin/runme.sh
- B. source /usr/local/bin/runme.sh
- C. /bin/bash /usr/local/bin/runme.sh
- D. . /usr/local/bin/runme.sh
- E. /usr/local/bin/runme.sh
Answer: B,D
NEW QUESTION # 43
Which of the following commands will change the quota for a specific user?
- A. quota -e
- B. edquota
- C. repquota
- D. quota
Answer: B
NEW QUESTION # 44
What is true regarding UEFI firmware? (Choose two.)
- A. It is stored in a special area within the GPT metadata
- B. It can read and interpret partition tables
- C. It can use and read certain file systems
- D. It is loaded from a fixed boot disk position
- E. It stores its entire configuration on the /boot/ partition
Answer: C,D
Explanation:
Explanation
UEFI firmware is a software program that provides the interface between the hardware and the operating system on a computer. UEFI stands for Unified Extensible Firmware Interface and it is a replacement for the traditional BIOS (Basic Input/Output System). UEFI firmware has several advantages over BIOS, such asfaster boot times, better security, larger disk support, and graphical user interface. Some of the features of UEFI firmware are12:
* It can use and read certain file systems: UEFI firmware can access files on partitions formatted with FAT12, FAT16, or FAT32 file systems. This allows UEFI to load boot loaders, kernels, and
* configuration files from these partitions without relying on the legacy MBR (Master Boot Record) or boot sector code. UEFI firmware can also support other file systems, such as NTFS or ext4, with additional drivers.
* It is loaded from a fixed boot disk position: UEFI firmware is stored in a ROM chip on the motherboard, but it also requires a special partition on the boot disk to store additional files and drivers. This partition is called the EFI System Partition (ESP) and it is usually the first partition on the disk. The ESP must have a specific GUID (Globally Unique Identifier) and must be formatted with a FAT file system. The UEFI firmware will look for the ESP on the boot disk and load the files from there.
The other options are false or irrelevant. UEFI firmware does not read and interpret partition tables, it relies on the operating system to do that. UEFI firmware does not store its entire configuration on the /boot/ partition, it stores some of its settings in the NVRAM (Non-Volatile Random Access Memory) on the motherboard and some of its files on the ESP. UEFI firmware is not stored in a special area within the GPT (GUID Partition Table) metadata, it is stored in a ROM chip and an ESP. GPT is a partitioning scheme that supports larger disks and more partitions than the legacy MBR scheme. References:
* Linux Essentials - Linux Professional Institute Certification Programs1
* Exam 101 Objectives - Linux Professional Institute2
* How to Boot and Install Linux on a UEFI PC With Secure Boot3
* How to Access UEFI Settings From Linux - It's FOSS4
* UEFI firmware updates for linux-surface - GitHub5
NEW QUESTION # 45
Which of the following are modes of the vi editor? (Choose two.)
- A. command mode
- B. edit mode
- C. review mode
- D. insert mode
- E. change mode
Answer: A,D
NEW QUESTION # 46
Which of the following commands installs GRUB 2 into the master boot record on the third hard disk?
- A. grub-mbrinstall /dev/sdc
- B. grub-setup /dev/sdc
- C. grub2 install /dev/sdc
- D. grub-install /dev/sdc
- E. grub-mkrescue /dev/sdc
Answer: D
Explanation:
Explanation
The command that installs GRUB 2 into the master boot record on the third hard disk is grub-install /dev/sdc.
The grub-install command is the high-level tool for installing GRUB 2 on a disk or a partition. It takes a device name as an argument and writes the GRUB 2 boot loader information to the specified location. If the device name is a disk, such as /dev/sdc, the boot loader information is written to the master boot record (MBR) of the disk, which is the first sector that contains the boot code and the partition table. If the device name is a partition, such as /dev/sdc1, the boot loader information is written to the boot sectorof the partition, which is the first sector of the partition that contains the boot code and the file system information. The grub-install command is part of the 101.1 Determine and configure hardware settings topic of the LPI Linux Essentials certification program12.
The other commands are either invalid or do not perform the desired task. The grub2 install command does not exist, as grub2 is not a valid command name. The grub-mkrescue command is used to create a bootable GRUB
2 rescue image, not to install GRUB 2 on a disk or a partition3. The grub-mbrinstall command does not exist, as mbrinstall is not a valid subcommand for grub. The grub-setup command is a low-level tool for installing GRUB 2 on a disk or a partition, but it is not recommended for normal use, as it requires specifying the location of the GRUB 2 core image file4. References:
* Linux Essentials - Linux Professional Institute Certification Programs1
* Exam 101 Objectives - Linux Professional Institute2
* GNU GRUB Manual 2.06: Making a GRUB bootable CD-ROM3
* GNU GRUB Manual 2.06: Installing GRUB natively4
NEW QUESTION # 47
Which of the following are modes of the vi editor? (Choose two.)
- A. command mode
- B. edit mode
- C. review mode
- D. insert mode
- E. change mode
Answer: A,D
Explanation:
Explanation
The modes of the vi editor that are correct are insert mode and command mode. The vi editor is a modal editor, which means that it has different modes for different operations. The insert mode allows the user to insert text into the file. The command mode allows the user to execute commands, such as saving, quitting,moving the cursor, searching, replacing, and so on. The user can switch between the modes by pressing certain keys, such as Esc, i, a, o, and others. The edit mode, change mode, and review mode are not valid modes of the vi editor.
References: LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.8: Use vi to create and edit files, vi editor
NEW QUESTION # 48
From a Bash shell, which of the following commands directly execute the instructions from the file /usr/ local/bin/runme.shwithout starting a subshell? (Choose two.)
- A. run /usr/local/bin/runme.sh
- B. source /usr/local/bin/runme.sh
- C. /bin/bash /usr/local/bin/runme.sh
- D. /usr/local/bin/runme.sh
- E. /usr/local/bin/runme.sh
Answer: B,E
Explanation:
Explanation/Reference:
NEW QUESTION # 49
......
Get Perfect Results with Premium 101-500 Dumps Updated 246 Questions: https://www.testkingpdf.com/101-500-testking-pdf-torrent.html
101-500 Dumps PDF 2024 Program Your Preparation EXAM SUCCESS: https://drive.google.com/open?id=14xjlaiYFUwUdb8DHUNFFku9ihUb458Qz

