[Jun 23, 2026] Pass Your 101-500 Dumps Free Latest Lpi Practice Tests
Get Top-Rated Lpi 101-500 Exam Dumps Now
NEW QUESTION # 83
Which of the following files, located in the user home directory, is used to store the Bash history?
- A. .history
- B. .bashrc_history
- C. .bash_history
- D. .bash_histfile
- E. .history_bash
Answer: C
Explanation:
The .bash_history file, located in the user home directory, is used to store the Bash history. The Bash history is a list of commands that the user has entered in the Bash shell. The .bash_history file is created when the user first starts a Bash session, and is updated when the user exits the session or runs the history command with the -a or -w option. The user can view the contents of the .bash_history file with the cat command, or use the history command to see the numbered list of commands. The user can also edit, delete, or clear the .
bash_history file with various commands and options. The location and name of the history file can be changed by setting the HISTFILE environment variable to a different value. References:
* [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.1: Work on the command line, Weight: 4, Key Knowledge Areas: Use of history and HISTFILE.
* Where is bash's history stored?, Topic: Bash maintains the list of commands internally in memory while it's running.
NEW QUESTION # 84
Given the following output:
Prompt > myapp
[1]+ Stopped myapp
prompt>
Which of the following commands will resume executing the stopped process while allowing the user to continue to type commands at the command prompt?
- A. exec myapp
- B. bg myapp
- C. fg myapp
- D. continue myapp
- E. myapp &
Answer: B
NEW QUESTION # 85
Which of the following tools can show the complete path of an executable file that the current shell would execute when starting a command without specifying its complete path? (Choose two.) find
- A. locate
- B. which
- C. type
- D. pwd
- E.
Answer: A,E
NEW QUESTION # 86
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. /usr/local/bin/runme.sh
- B. run /usr/local/bin/runme.sh
- C. /bin/bash /usr/local/bin/runme.sh
- D. source /usr/local/bin/runme.sh
- E. . /usr/local/bin/runme.sh
Answer: D,E
Explanation:
The commands that directly execute the instruction from the file /usr/local/bin/runme.sh without starting a subshell are source /usr/local/bin/runme.sh and . /usr/local/bin/runme.sh. These commands use the source or dot builtins, which read and execute commands from the given file in the current shell environment. This means that any changes made by the file, such as setting variables, defining functions, or changing directories, will affect the current shell. This is different from running the file as a script, which will create a new shell process and execute the commands in a separate environment. The source or dot commands are useful for loading configuration files, such as ~/.bashrc or /etc/profile, or for running scripts that modify the current state of the shell.
The other commands are incorrect for the following reasons:
* C. /bin/bash /usr/local/bin/runme.sh: This command will run the file as a script using the /bin/bash interpreter. This will create a new shell process and execute the commands in a separate environment.
Any changes made by the file will not affect the current shell.
* D. /usr/local/bin/runme.sh: This command will also run the file as a script, but using the interpreter specified by the shebang line (#!) at the beginning of the file. If the file does not have a shebang line, it will use the default shell interpreter, which may or may not be /bin/bash. This will also create a new shell process and execute the commands in a separate environment. Any changes made by the file will not affect the current shell.
* E. run /usr/local/bin/runme.sh: This command is not valid, as there is no builtin or external command called run. This will produce an error message.
References:
[LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.1: Work on the command line, Weight: 4, Key Knowledge Areas: Use of source and ..
[Bash Reference Manual], Section 4.2: Bash Builtin Commands, Subsection 4.2.5: Bourne Shell Builtins.
NEW QUESTION # 87
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.) source /usr/local/bin/runme.sh
- A. /usr/local/bin/runme.sh
- B. /bin/bash /usr/local/bin/runme.sh
- C. run /usr/local/bin/runme.sh
- D. . /usr/local/bin/runme.sh
- E.
Answer: A,C
NEW QUESTION # 88
What do the permissions -rwSr-xr-x mean for a binary file when it is executed as a command?
- A. The command will be executed with the effective rights of the owner and group.
- 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 is SetUID and it will be executed with the effective rights of the owner.
Answer: C
Explanation:
The permissions -rwSr-xr-x mean that the file is readable and writable by the owner, readable and executable by the group, and readable and executable by others. The S in the owner's permissions indicates that the file has the SetUID bit set, which means that when the file is executed as a command, it will run with the effective user ID of the file owner, rather than the user who executed it. This allows the command to perform privileged operations that the user normally cannot do. For example, the /bin/passwd command has the SetUID bit set, so that it can modify the /etc/shadow file, which is only writable by root. References: LPI Linux Administrator, File Permissions and Attributes
NEW QUESTION # 89
Which option to the tee command will cause the output to be concatenated on the end of the output file instead of overwriting the existing file contents?
- A. -c
- B. -a
- C. --continue
- D. --no-clobber
Answer: B
Explanation:
Explanation
The -a option to the tee command will cause the output to be appended to the end of the output file instead of overwriting the existing file contents. The tee command reads from standard input (STDIN) and writes to standard output (STDOUT) and one or more files simultaneously. For example, ls | tee file.txt will display the output of the ls command and also write it to file.txt. If file.txt already exists, it will be overwritten unless the
-a option is used. References: LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.3: Perform basic file management, tee command
NEW QUESTION # 90
Which of the following commands displays the contents of a gzip compressed tar archive?
- A. tar cf archive.tgz
- B. gzip archive.tgz | tar xvf -
- C. gzip -d archive.tgz | tar tvf -
- D. tar ztf archive.tgz
Answer: D
Explanation:
Explanation
The command that displays the contents of a gzip compressed tar archive is tar ztf archive.tgz. This command uses the following options:
-z: Tells tar to read or write archives through gzip, allowing it to work on compressed files directly. -t: Lists the contents of an archive without extracting it. -f archive.tgz: Specifies the name of the archive file.
The output of this command will show the names of the files and directories stored in the archive, one per line.
For example, if the archive contains three files named file1, file2, and file3, the output will be:
file1 file2 file3
The other commands are incorrect for the following reasons:
* gzip archive.tgz | tar xvf -: This command will decompress the archive using gzip and pipe it to tar, which will extract the files to the current directory. The - option tells tar to read the archive from the standard input. This command does not display the contents of the archive, but rather extracts them.
* gzip -d archive.tgz | tar tvf -: This command is similar to the previous one, except that it uses the -d option for gzip to decompress the archive instead of compressing it, and the -t option for tar to list the contents instead of extracting them. However, this command is redundant and inefficient, as tar can handle compressed archives directly with the -z option. Also, the -d option for gzip will delete the original archive file after decompression, which may not be desirable.
* tar cf archive.tgz: This command will create a new archive named archive.tgz from the files and directories given as arguments. However, this command does not use the -z option, so the archive will not be compressed with gzip. Also, this command does not display the contents of the archive, but rather creates it.
NEW QUESTION # 91
After modifying GRUB's configuration file, what command should you run for the changes to take effect?
- A. grub
- B. kill HUP `pidof grub`
- C. grubinstall
- D. no action is required
Answer: D
NEW QUESTION # 92
Which of the following directories on a 64 bit Linux system typically contain shared libraries? (Choose two.)
- A. /opt/lib64/
- B. ~/.lib64/
- C. /var/lib64/
- D. /lib64/
- E. /usr/lib64/
Answer: B,D
NEW QUESTION # 93
What is the disadvantage of using the command kill -9 ?
- A. It affects the entire process group.
- B. It makes excessive use of systemresources.
- C. The action can be blocked by buggy or malicious processes.
- D. The affected process is unable to clean up before exiting.
- E. A core dump file will be created.
Answer: D
NEW QUESTION # 94
Which of the following commands will produce the following output?
- A. ps
- B. proclist
- C. jobs
- D. netstat
Answer: A
Explanation:
The ps command will produce the output shown in the image. The ps command displays information about the processes running on the system. The output format can be customized by using different options. For example, ps -aux will show all processes with detailed information, such as user, PID, CPU, memory, command, and so on. The output in the image matches the format of ps -aux. The jobs command will show the status of jobs in the current shell. The proclist command is not a valid Linux command. The netstat command will show network connections, routing tables, and statistics. References: LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.3: Perform basic file management, ps command, jobs command, netstat command
NEW QUESTION # 95
What command will print a list of usernames (first column) and their corresponding user id (uid, third column) from /etc/passwd?
- A. tac l-3 /etc/passwd
- B. chop -c l,3 /etc/passwd
- C. cut -d: -fl,3 /etc/passwd
- D. fmt -u /etc/passwd
Answer: C
NEW QUESTION # 96
Which of the following commands lists all currently installed packages when using RPM package management?
- A. yum --list --installed
- B. rpm --query --list
- C. rpm --query --all
- D. rpm --list --installed
- E. yum --query --all
Answer: C
NEW QUESTION # 97
Which of the following commands puts the output of the command date into the shell variable mydate?
- A. mydate=$(date)"
- B. mydate=''date"
- C. mydate="exec date"
- D. mydate="$ ((dare))"
- E. mydate="${date}"
Answer: A
NEW QUESTION # 98
Which of the following properties of a Linux system should be changed when a virtual machine is cloned?
(Choose two.)
- A. The file system
- B. The permissions of /root/
- C. The partitioning scheme
- D. The SSH host keys
- E. The D-Bus Machine ID
Answer: D,E
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 # 99
......
Passing Key To Getting 101-500 Certified Exam Engine PDF: https://torrentpdf.validvce.com/101-500-exam-collection.html
