101-500 Deutsch 無料問題集「Lpi LPIC-1 Exam 101, Part 1 of 2, version 5.0 (101-500 Deutsch Version)」
Welches Programm aktualisiert die vom Befehl locate verwendete Datenbank?
正解:
updated
Explanation
The program that updates the database that is used by the locate command is updatedb. The updatedb command creates or updates a database of filenames and directories that can be searched by the locate command. The updatedb command is usually run daily by cron to update the default database, which is stored in /var/lib/mlocate/mlocate.db. The updatedb command can also take some options, such as the filesystem type, the prune list, and the output file. For more information, see the updatedb man page1 or the Ubuntu man page2.
Explanation
The program that updates the database that is used by the locate command is updatedb. The updatedb command creates or updates a database of filenames and directories that can be searched by the locate command. The updatedb command is usually run daily by cron to update the default database, which is stored in /var/lib/mlocate/mlocate.db. The updatedb command can also take some options, such as the filesystem type, the prune list, and the output file. For more information, see the updatedb man page1 or the Ubuntu man page2.
Welche Bash-Umgebungsvariable definiert, in welcher Datei der Benutzerverlauf beim Beenden eines Bash-Prozesses gespeichert wird?
(Geben Sie NUR den Variablennamen an.)
(Geben Sie NUR den Variablennamen an.)
正解:
HISTFILE
The HISTFILE environment variable defines in which file the user history is stored when exiting a Bash process. The user history is a list of commands that the user has entered in the Bash shell. By default, the HISTFILE variable is set to ~/.bash_history, which means that the history is stored in a hidden file called
.bash_history in the user's home directory. The user can change the value of the HISTFILE variable to store the history in a different file or location. For example, the following command will set the HISTFILE variable to ~/my_history:
export HISTFILE=~/my_history
This will cause the history to be stored in a file called my_history in the user's home directory. The user can also unset the HISTFILE variable to disable the history saving feature. For example, the following command will unset the HISTFILE variable:
unset HISTFILE
This will prevent the history from being written to any file when the Bash process exits. The user can view the value of the HISTFILE variable by using the echo command. For example, the following command will display the value of the HISTFILE variable:
echo $HISTFILE
The output will be something like:
/home/user/.bash_history
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.
* How To Read and Set Environmental and Shell Variables on Linux, Topic: How the Environment and Environmental Variables Work.
The HISTFILE environment variable defines in which file the user history is stored when exiting a Bash process. The user history is a list of commands that the user has entered in the Bash shell. By default, the HISTFILE variable is set to ~/.bash_history, which means that the history is stored in a hidden file called
.bash_history in the user's home directory. The user can change the value of the HISTFILE variable to store the history in a different file or location. For example, the following command will set the HISTFILE variable to ~/my_history:
export HISTFILE=~/my_history
This will cause the history to be stored in a file called my_history in the user's home directory. The user can also unset the HISTFILE variable to disable the history saving feature. For example, the following command will unset the HISTFILE variable:
unset HISTFILE
This will prevent the history from being written to any file when the Bash process exits. The user can view the value of the HISTFILE variable by using the echo command. For example, the following command will display the value of the HISTFILE variable:
echo $HISTFILE
The output will be something like:
/home/user/.bash_history
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.
* How To Read and Set Environmental and Shell Variables on Linux, Topic: How the Environment and Environmental Variables Work.
Welche Option zum Befehl yum aktualisiert das gesamte System? (Geben Sie NUR den Optionsnamen ohne zusätzliche Parameter an.)
正解:
* update
* upgrade
update/upgrade
Explanation
The yum command is a tool for managing software packages on Red Hat Enterprise Linux and other RPM-based systems. The yum update option will update the entire system by checking the versions of the installed packages and installing the latest available versions from the repositories. The yum upgrade option will do the same, but it will also remove any obsolete packages that are no longer needed by the system. Both options will prompt the user to confirm before proceeding with the update or upgrade process. References:
* Yum Command Cheat Sheet for Red Hat Enterprise Linux
* "yum update" Explained for Beginners!
* How to Install Updates on CentOS 7
* Which option to the yum command will update the entire system?
* upgrade
update/upgrade
Explanation
The yum command is a tool for managing software packages on Red Hat Enterprise Linux and other RPM-based systems. The yum update option will update the entire system by checking the versions of the installed packages and installing the latest available versions from the repositories. The yum upgrade option will do the same, but it will also remove any obsolete packages that are no longer needed by the system. Both options will prompt the user to confirm before proceeding with the update or upgrade process. References:
* Yum Command Cheat Sheet for Red Hat Enterprise Linux
* "yum update" Explained for Beginners!
* How to Install Updates on CentOS 7
* Which option to the yum command will update the entire system?
Welche Datei aus dem / proc-Dateisystem enthält eine Liste aller aktuell gemounteten Geräte?
(Geben Sie NUR den Befehl ohne Pfad oder Parameter an.)
(Geben Sie NUR den Befehl ohne Pfad oder Parameter an.)
正解:
mounts
Explanation
The file /proc/mounts contains a list of all currently mounted devices in the system. It is a pseudo-file that is dynamically generated by the kernel and reflects the actual state of the mount table. It has a similar format to
/etc/fstab, but shows the actual mount options and file system types used by the kernel. The file/proc/mounts can be read by any user, but only the root user can modify it. The file /proc/mounts is also known as
/proc/self/mounts, which is a symbolic link to the mounts file for the current process. References:
* Understanding the /proc/mounts, /etc/mtab and /proc/partitions files
* How to get the complete and exact list of mounted filesystems in Linux?
* The /proc Filesystem
Explanation
The file /proc/mounts contains a list of all currently mounted devices in the system. It is a pseudo-file that is dynamically generated by the kernel and reflects the actual state of the mount table. It has a similar format to
/etc/fstab, but shows the actual mount options and file system types used by the kernel. The file/proc/mounts can be read by any user, but only the root user can modify it. The file /proc/mounts is also known as
/proc/self/mounts, which is a symbolic link to the mounts file for the current process. References:
* Understanding the /proc/mounts, /etc/mtab and /proc/partitions files
* How to get the complete and exact list of mounted filesystems in Linux?
* The /proc Filesystem
Das Dateisystem des USB-Geräts finden Sie unter / proc / ______ / usb /.
(Bitte füllen Sie die Lücke nur mit einem Wort aus)
(Bitte füllen Sie die Lücke nur mit einem Wort aus)
正解:
bus
Explanation The USB device filesystem can be found under /proc/bus/usb/1. This is a virtual filesystem that provides information about the USB devices and buses connected to the system12. It contains files and directories that correspond to the USB host controllers, hubs, and devices12. For example, the following output shows the contents of /proc/bus/usb/ on a system with one USB host controller and two USB devices:
The directories 001 and 002 represent the USB buses, and each contain files that represent the USB devices on that bus. The file devices contains a summary of all the USB devices and their configurations. The file drivers contains a list of the USB drivers and the devices they are bound to12.
The /proc/bus/usb/ filesystem is deprecated and should not be used anymore3. It has been replaced by the
/sys/bus/usb/ filesystem, which is a sysfs mount that provides more detailed and structured information about the USB devices and buses3 .
References:
1: USB in a NutShell - Chapter 5 - Linux USB 2: Linux USB FAQ 3: Alternative to /proc/bus/usb/devices - Super User : [What is the difference between /dev/usb, /proc/bus/usb and /sys/bus/usb? - Super User]
Explanation The USB device filesystem can be found under /proc/bus/usb/1. This is a virtual filesystem that provides information about the USB devices and buses connected to the system12. It contains files and directories that correspond to the USB host controllers, hubs, and devices12. For example, the following output shows the contents of /proc/bus/usb/ on a system with one USB host controller and two USB devices:
The directories 001 and 002 represent the USB buses, and each contain files that represent the USB devices on that bus. The file devices contains a summary of all the USB devices and their configurations. The file drivers contains a list of the USB drivers and the devices they are bound to12.
The /proc/bus/usb/ filesystem is deprecated and should not be used anymore3. It has been replaced by the
/sys/bus/usb/ filesystem, which is a sysfs mount that provides more detailed and structured information about the USB devices and buses3 .
References:
1: USB in a NutShell - Chapter 5 - Linux USB 2: Linux USB FAQ 3: Alternative to /proc/bus/usb/devices - Super User : [What is the difference between /dev/usb, /proc/bus/usb and /sys/bus/usb? - Super User]