
Pass Lpi 101-500 Exam With Practice Test Questions Dumps Bundle
2025 Valid 101-500 test answers & Lpi Exam PDF
NEW QUESTION # 121
Which of the following commands can be used to search for the executable file foo when it has been placed in a directory not included in $PATH?
- A. query
- B. apropos
- C. which
- D. whereis
- E. find
Answer: E
NEW QUESTION # 122
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.)
- A. shutdown -single now
- B. init 1
- C. telinit 1
- D. runlevel 1
- E. shutdown -R 1 now
Answer: B,C
NEW QUESTION # 123
What happens after issuing the command vi without any additional parameters?
- A. vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
- B. vi exits with an error message as it cannot be invoked without a file name to operate on.
- C. vi starts and loads the last file used andmoves the cursor to the position where vi was when it last exited.
- D. vi starts and requires the user to explicitly either create a new or load an existing file.
- E. vi starts in command mode and opens a new empty file.
Answer: E
NEW QUESTION # 124
When redirecting the output of findto the xargscommand, what option to findis useful if the filenames contain spaces?
- A. -nospace
- B. -rep-space
- C. -ignore-space
- D. c-printnul
- E. -print0
Answer: E
NEW QUESTION # 125
What would the following line accomplish if run as root? chown -R bert /home/bert/*
- A. It would revoke bert's ownership of all files in /home/bert to bert.
- B. Nothing, this command is invalid.
- C. It would set the group ownership of the directory /home/bert to bert
- D. It would change user ownership of all files in /home/bert to bert.
- E. It would set ownership of all files and subdirectories in /home/bert to bert
Answer: E
NEW QUESTION # 126
You have a text file with tab-separated values, but your application needs them space- separated.
What command would you use from the Bash shell to achieve this? Please fill in the command only, without any options.
Answer:
Explanation:
expand
NEW QUESTION # 127
Which of the following properties of a Linux system should be changed when a virtual machine is cloned?
(Choose two.)
- A. The permissions of /root/
- B. The partitioning scheme
- C. The SSH host keys
- D. The D-Bus Machine ID
- E. The file system
Answer: C,D
Explanation:
Explanation
The properties of a Linux system that should be changed when a virtual machine is cloned are the D-Bus Machine ID and the SSH host keys. The D-Bus Machine ID is a unique identifier for the system that is used by the D-Bus message bus system to communicate between applications. The D-Bus Machine ID is stored in the
/etc/machine-id or /var/lib/dbus/machine-id file and it is generated during the first boot of the system. If a virtual machine is cloned without changing the D-Bus Machine ID, it can cause conflicts and errors with the D-Bus services on the clone and the original system. To change the D-Bus Machine ID, the file containing it must be deleted or emptied and the system must be rebooted12. The SSH host keys are cryptographic keys that are used by the SSH protocol to authenticate the identity of the system and establish a secure connection. The SSH host keys are stored in the /etc/ssh directory and they are generated during the first boot of the system or the installation of the openssh-server package. If a virtual machine is cloned without changing the SSH host keys, it can compromise the security and integrity of the SSH connections, as the clone and the original system will have the same keys. To change the SSH host keys, the files containing them must be deleted and the ssh-keygen command must be run to generate new keys34.
The other options are false or irrelevant. The partitioning scheme and the file system are not properties of a Linux system that need to be changed when a virtual machine is cloned, as they do not affect the functionality or the identity of the system. The permissions of /root/ are also not properties of a Linux system that need to be changed when a virtual machine is cloned, as they do not affect the security or the communication of the system. References:
* Linux Essentials - Linux Professional Institute Certification Programs1
* Exam 101 Objectives - Linux Professional Institute2
* How to Clone Virtual Machine in VirtualBox - UbuntuMint3
* Chapter 4. Cloning Virtual Machines Red Hat Enterprise Linux 7 | Red ...4
NEW QUESTION # 128
Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.)
- A. <<<
- B. <
- C. %>
- D. >>>
- E. >
Answer: B,C
Explanation:
Explanation
The <, > and %> are valid stream redirection operators within Bash. The < operator redirects the standard input of a command from a file or another command. For example, sort < names.txt will sort the lines of the file names.txt and print them to the standard output. The > operator redirects the standard output of a command to a file or another command, overwriting the file if it exists. For example, echo "Hello World" > greeting.txt will write the string "Hello World" to the file greeting.txt. The %> operator redirects the standard error of a command to a file or another command, overwriting the file if it exists. For example, ls foo %> errors.log will list the contents of the directory foo and write any error messages to the file errors.log. The other options are either invalid or do not perform the desired task. The <<< operator is not a valid Bash operator, but it is used in some other shells like Zsh to redirect a string literal as the standard input of a command. The >>> operator is not a valid Bash operator, but it is used in some programming languages like Python to denote a bitwise right shift operation. References:
* LPIC-1 Exam 101 Objectives, Topic 103: GNU and Unix Commands, 103.4 Use streams, pipes and redirects
* LPIC-1 Linux Administrator 101-500 Exam FAQ, LPIC-1 Exam 101 Objectives, GNU and Unix Commands (Total Weight: 25)
NEW QUESTION # 129
You have run out of disk space on a partition. Which of the following would be an easy way to move data to a new partition without reconfiguring the path to the data in existing applications?
- A. Create a block device offset.
- B. Use the loopback device.
- C. Run ext2fs ACL.
- D. Use a symbolic link.
- E. Use a hard link.
Answer: D
NEW QUESTION # 130
What program is needed to establish a PPP link to another computer?
- A. kppp
- B. wvdial
- C. pppd
- D. papd
Answer: C
NEW QUESTION # 131
The command echo $! will produce what output?
- A. the exit status of the last command
- B. the process id of last background command
- C. the process id of the current shell
- D. the exit status of the last background command
- E. the name of the command being executed
Answer: B
NEW QUESTION # 132
What command will display all of the background tasks running in the current shell?
- A. list
- B. kill -l
- C. jobs
- D. history
Answer: C
NEW QUESTION # 133
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:[0-9]+:[0-9]+' loga.log
- B. grep -E ':08:[09]+:[09]+' loga.log
- C. grep -E loga.log ':08:[0-9]+:[0-9]+'
- D. grep -E ':08:[00]+' loga.log
- E. grep loga.log ':08:[0-9]:[0-9]'
Answer: A
Explanation:
Explanation
The command that filters out all log entries in the time period between 8:00 am and 8:59 am is grep -E
':08:[0-9]+:[0-9]+' loga.log. The grep command is used to search for a pattern in a file or standard input and print the matching lines. The -E or --extended-regexp option enables the use of extended regular expressions, which support more operators and syntax than the basic regular expressions. The pattern ':08:[0-9]+:[0-9]+' is an extended regular expression that matches a colon followed by 08, followed by another colon, followed by one or more digits, followed by another colon, followed by one or more digits. This pattern matches any timestamp that has 08 as the hour part, which corresponds to the time period between 8:00 am and 8:59 am.
The loga.log file is the name of the log file that contains the timestamps of the format DD/MM/YYYY:hh:mm:ss. For example, running grep -E ':08:[0-9]+:[0-9]+' loga.log will produce an output like this:
01/01/2023:08:00:01 User logged in 01/01/2023:08:15:23 User performed an action 01/01/2023:08:30:45 User logged out 01/01/2023:08:45:12 User logged in again The other commands are either invalid or do not perform the desired task. The grep -E ':08:[09]+:[09]+' loga.log command will only match timestamps that have 0 or 9 as the minute and second parts, which is too restrictive. The grep -E ':08:[00]+' loga.log command will only match timestamps that have 0 as the minute and second parts, which is too specific. The grep -E loga.log ':08:[0-9]+:[0-9]+' command will not work, as the file name should come after the pattern, not before it. The grep loga.log ':08:[0-9]:[0-9]' command will not work, as it uses a basic regular expression without the -E option, and it will only match timestamps that have one digit as the minute and second parts, which is too narrow.
NEW QUESTION # 134
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)
Answer:
Explanation:
HISTFILE
NEW QUESTION # 135
Which of the following commands generates a list of user names from /etc/passwdalong with their login shell?
column -s : 1,7 /etc/passwd
- A. sort -t: -k1,7 /etc/passwd
- B. cut -d: -f1,7 /etc/passwd
- C.
- D. chop -c 1,7 /etc/passwd
- E. colrm 1,7 /etc/passwd
Answer: C
NEW QUESTION # 136
Which of the following is the default Xorg configuration file?
- A. /etc/X11/xorg.conf
- B. /usr/X11R6/etc/xorg.conf
- C. /usr/etc/X11/xorg.conf
- D. /var/X11/xorg.conf
Answer: A
NEW QUESTION # 137
In the vi editor, which of the following commands will copy the current line into the vi buffer?
- A. c
- B. cc
- C. yy
- D. 1y
- E. 1c
Answer: C
NEW QUESTION # 138
What umask will set the file permissions on a newly created file to -rw-r--r-- (644)?
- A. 0224
- B. 0002
- C. 0246
- D. 0022
Answer: D
NEW QUESTION # 139
Which of the following commands are valid in the GRUB 2 configuration file? (Choose two.) menuentry
- A. insmod
- B. uefi
- C.
- D. kpartx
- E. pxe-ifconfig
Answer: B,D
NEW QUESTION # 140
Which of the following apt-get subcommands installs the newest versions of all currently installed packages?
- A. update
- B. install
- C. dist-upgrade
- D. auto-update
- E. full-upgrade
Answer: C
Explanation:
Explanation
The apt-get subcommand that installs the newest versions of all currently installed packages is dist-upgrade.
The dist-upgrade subcommand performs the same function as the upgrade subcommand, which is to install the latest versions of the packages that are already installed on the system, but it also intelligently handles the dependencies and removes the obsolete packages if necessary. The dist-upgrade subcommand is useful when upgrading the entire system to a new release or distribution12.
The other options are either invalid or do not perform the desired task. The auto-update subcommand does not exist, and the update subcommand only updates the list of available packages from the repositories, but does not install any packages. The full-upgrade subcommand is an alias for the dist-upgrade subcommand, so it performs the same function, but it is not the standard name for the subcommand. The install subcommand installs new packages or specific versions of packages, but it does not upgrade all the currently installed packages. References:
* Linux Essentials - Linux Professional Institute Certification Programs1
* Exam 101 Objectives - Linux Professional Institute2
* APT-GET Command in Linux {Detailed Tutorial With Examples} - phoenixNAP3
* How do I get help on apt-get's install subcommand?
* APT Cheat Sheet | Packagecloud Blog
NEW QUESTION # 141
......
The LPIC-1 Exam 101, Part 1 of 2, version 5.0 covers a wide range of topics, including system architecture, Linux installation and package management, GNU and Unix commands, devices, Linux filesystems, and file system hierarchy standard. 101-500 exam consists of 60 multiple-choice and fill-in-the-blank questions, and the candidate has 90 minutes to complete the exam.
Top Lpi 101-500 Courses Online: https://actualanswers.testsdumps.com/101-500_real-exam-dumps.html
