101-500 Free Exam Study Guide! (Updated 246 Questions) [Q142-Q167]

Share

101-500 Free Exam Study Guide! (Updated 246 Questions)

101-500 Dumps for LPIC Level1 Certified Exam Questions and Answer


Lpi 101-500 exam is a computer-based test that consists of 60 multiple-choice and fill-in-the-blank questions. 101-500 exam duration is 90 minutes, and the passing score is 500 out of 800. 101-500 exam is available in multiple languages, including English, German, Spanish, and Portuguese.

 

NEW QUESTION # 142
Which wildcards will match the following filenames? (Choose two.)
ttyS0
ttyS1
ttyS2
ttyS[1-5]

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

Answer: A,C


NEW QUESTION # 143
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. nohup dbmaint &
  • B. dbmaint &>/dev/pts/null
  • C. wait dbmaint
  • D. job -b dmaint
  • E. bg dbmaint

Answer: E


NEW QUESTION # 144
What command will generate a list of user names from /etc/passwd along with their login shell?

  • A. cut -d: -f1,7 /etc/passwd
  • B. column -s : 1,7 /etc/passwd
  • C. chop -c 1,7 /etc/passwd
  • D. colrm 1,7 /etc/passwd

Answer: A

Explanation:
Explanation
The cut command is used to extract sections from each line of a file or input stream. The -d option specifies the delimiter that separates the fields in each line. The -f option specifies the fields to select. In this case, the delimiter is a colon (:) and the fields are 1 and 7. The first field is the user name and the seventh field is the login shell. Therefore, the cut command with these options will generate a list of user names and their login shells from /etc/passwd. References:
* Linux cut Command Explained with 6 Examples
* How to Use the Linux cut Command
* cut command in Linux with examples


NEW QUESTION # 145
What does the command mount --bind do?

  • A. It mounts all user mountable filesystems to the user's home directory
  • B. It mounts all file systems listed in /etc/fstab which have the option userbind set
  • C. It mounts all available filesystems to the current directory
  • D. It permanently mounts a regular file to a directory
  • E. It makes the contents of one directory available in another directory

Answer: E

Explanation:
Explanation
The mount --bind command is used to create a bind mount, which is an alternate view of a directory tree. A bind mount takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data. For example, after issuing the command:
mount --bind /some/where /else/where
the directories /some/where and /else/where have the same content, which is the content of /some/where. A bind mount can be useful for accessing hidden files, creating chroot environments, or changing the permissions or ownership of files.
The other options are not correct because:
* B. It mounts all available filesystems to the current directory: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all available filesystems to the current directory, one would need to use the mount -a command with the -t option and specify the current directory as the target.
* C. It mounts all user mountable filesystems to the user's home directory: This is not what the mount
--bind command does. The mount --bind command only creates a bind mount for a single directory tree.
To mount all user mountable filesystems to the user's home directory, one would need to use the mount
-a command with the -t option and specify the user's home directory as the target. However, this is not a common or recommended practice, as it may cause conflicts or errors with the existing files and directories in the user's home directory.
* D. It mounts all file systems listed in /etc/fstab which have the option userbind set: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all file systems listed in /etc/fstab which have the option userbind set, one would need to use the mount -a command with the -O option and specify userbind as the option.
However, this is not a standard or supported option for the mount command or the /etc/fstab file, and it may not work as expected.
* E. It permanently mounts a regular file to a directory: This is not what the mount --bind command does.
The mount --bind command only creates a bind mount for a directory tree, not a regular file. To mount a regular file to a directory, one would need to use the mount command with the -o loop option and specify the file and the directory as the source and the target. However, this is only possible for files that contain a valid filesystem image, such as an ISO file or a disk image. A bind mount is not permanent, and it can be unmounted with the umount command.
References:
* Understanding Bind Mounts | Baeldung on Linux
* What is a bind mount? - Unix & Linux Stack Exchange
* mount(8) - Linux manual page


NEW QUESTION # 146
When removing a package on a system using dpkg package management, which dpkgoption ensures configuration files are removed as well?
--clean

  • A. --purge
  • B. --vacuum
  • C. --declare
  • D. --remove
  • E.

Answer: B


NEW QUESTION # 147
Which of the following files, located in the user home directory, is used to store the Bash history?

  • A. .bash_histfile
  • B. .history_bash
  • C. .bash_history
  • D. .history
  • E. .bashrc_history

Answer: C


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

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

Answer: D


NEW QUESTION # 149
Which umask value ensures that new directories can be read, written and listed by their owning user, read and listed by their owning group and are not accessible at all for everyone else?

  • A. 0036
  • B. 0027
  • C. 0
  • D. 0750
  • E. 0029

Answer: B


NEW QUESTION # 150
While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?

  • A. :r
  • B. :n
  • C. :e
  • D. :w

Answer: C

Explanation:
Explanation
The :e command in vi is used to edit a file. If the file name is not specified, it will edit the current file. If the file has been changed by another process, the :e command will reload the file with the new content, discarding any unsaved changes made in vi. Therefore, the :e command can be used to reopen the file for editing with the new content without exiting vi. The other options are either invalid or do not perform the desired task.
The :r command is used to read the content of another file or command and insert it into the current file.
The :n command is used to edit the next file in the argument list, if any. The :w command is used to write the current file to disk, optionally with a new name. References:
* LPIC-1 Exam 101 Objectives, Topic 103: GNU and Unix Commands, 103.7 Use and edit text files
* LPIC-1 Linux Administrator 101-500 Exam FAQ, LPIC-1 Exam 101 Objectives, GNU and Unix Commands (Total Weight: 25)


NEW QUESTION # 151
Which of the following settings for umask ensures that new files have the default permissions -rw-r----- ?

  • A. 0038
  • B. 0027
  • C. 0017
  • D. 0640

Answer: B


NEW QUESTION # 152
Which of the following commands installs all packages with a name ending with the string foo?

  • A. zypper install "*foo"
  • B. zypper force "foo*"
  • C. zypper get "*foo"
  • D. zypper update "foo?"
  • E. zypper add ".*foo"

Answer: A

Explanation:
Explanation
The command that installs all packages with a name ending with the string foo is zypper install "*foo". The zypper command is the command line interface of the ZYpp package manager for SUSE Linux. The install (in) subcommand is used to install packages with specified capabilities or RPM files with specified location.
The argument "*foo" is a glob pattern that matches any package name that ends with foo. For example, zypper install "foo" will install packages like barfoo, bazfoo, and foo itself. The other commands are either invalid or do not perform the desired task. The zypper get, zypper update, zypper force, and zypper add subcommands do not exist. The "foo?" and "foo" arguments are also invalid glob patterns, as they do not match the end of the package name. The ".*foo" argument is a valid glob pattern, but it matches any package name that contains foo, not just the ones that end with foo. References:
* Zypper package manager - SUSE Documentation1
* zypper(8) [suse man page] - The UNIX and Linux Forums2
* 45 Zypper Commands to Manage 'Suse' Linux Package Management - Tecmint


NEW QUESTION # 153
Which of the following commands will display the inode usage of each mounted filesystem?

  • A. printfs -i
  • B. df -i
  • C. du -i
  • D. lsfs -i

Answer: B

Explanation:
Explanation
The df command is used to report the disk space usage of the filesystems on a Linux system. The -i option is used to display the inode usage of each mounted filesystem. An inode is a data structure that stores the metadata of a file or directory, such as its size, owner, permissions, etc. Each filesystem has a fixed number of inodes, which limits the number of files and directories that can be created on it. The df -i command shows the total number of inodes, the number of used and free inodes, and the percentage of inode usage for each filesystem. For example:
[tcarrigan@rhel ~]$ df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda2 1310720 83167
1227553 7% / devtmpfs 249974 386 249588 1% /dev tmpfs 251374 1 251373 1% /dev/shm tmpfs 251374 570
250804 1% /run tmpfs 251374 16 251358 1% /sys/fs/cgroup /dev/sda1 524288 312 523976 1% /boot tmpfs
251374 1 251373 1% /run/user/1000
The other options are not valid commands or options. The du command is used to estimate the disk usage of files and directories, but it does not have an -i option. The lsfs and printfs commands do not exist on a standard Linux system. References:
* Inodes and the Linux filesystem | Enable Sysadmin
* filesystems - Find where inodes are being used - Unix & Linux Stack ...
* filesystems - How much space does an inode occupy? - Unix & Linux Stack ...


NEW QUESTION # 154
When using rpm --verify to check files created during the installation of RPM packages, which of the following information is taken into consideration? (Choose THREE correct answers.)

  • A. GnuPG signatures
  • B. Inodes
  • C. MD5 checksums
  • D. Timestamps
  • E. File sizes

Answer: C,D,E


NEW QUESTION # 155
FILL BLANK
Which command displays a list of all background tasks running in the current shell? (Specify ONLY the command without any path or parameters.)

Answer:

Explanation:
jobs


NEW QUESTION # 156
Which is the default percentage of reserved space for the root user on new ext4 filesystems?

  • A. 5%
  • B. 0%
  • C. 3%
  • D. 10%
  • E. 15%

Answer: A

Explanation:
Explanation
The reserved space is a portion of the filesystem that is only accessible to the root user or users with sudo privileges. The reserved space serves two purposes: to prevent ordinary users from filling up the filesystem completely and crashing the system, and to reduce fragmentation by leaving some free space. The reserved space is set by default to 5% of the total filesystem size when the filesystem is created with the mkfs.ext4 command. This means that 5% of the blocks are reserved for the root user and are not counted as available space by the df command. The reserved space can be changed or disabled by using the tune2fs command with the -m option. For example, to change the reserved space to 1%, use the following command:
sudo tune2fs -m 1 /dev/sdXY
where /dev/sdXY is the device name of the ext4 filesystem.
To disable the reserved space completely, use 0% instead of 1%. However, this is not recommended, as it may affect the performance and stability of the system, especially if the filesystem is almost full.
References:
* Reserved space for root on a filesystem - why?
* Linux : How to reduce the percentage of reserved blocks on ext4 filesystem
* tune2fs(8) - Linux manual page


NEW QUESTION # 157
Which file defines the network locations from where the Debian package manager downloads software packages?
/etc/dpkg/dpkg.cfg

  • A.
  • B. /etc/apt/apt.conf.d
  • C. /etc/apt/sources.list
  • D. /etc/dpkg/dselect.cfg
  • E. /etc/apt/apt.conf

Answer: A


NEW QUESTION # 158
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose two.) cat /proc/self/mounts

  • A. mount
  • B. free
  • C. lsmounts
  • D. cat /proc/filesystems
  • E.

Answer: B,D


NEW QUESTION # 159
Which of the following regular expressions represents a single upper-case letter?

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

Answer: D

Explanation:
Explanation/Reference:


NEW QUESTION # 160
Which of the following commands display the IDs of all processes owned by root? (Choose two.)

  • A. pgrep -U 0
  • B. pgrep -c root
  • C. pgrep -f root
  • D. pgrep -c 0
  • E. pgrep -u root

Answer: C,E


NEW QUESTION # 161
Which of the following commands displays the contents of a gzip compressed tar archive?
gzip archive.tgz | tar xvf -

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

Answer: A


NEW QUESTION # 162
What is true regarding the configuration of yum? (Choose two.)

  • A. Repository configurations can include variables such as $basearchor $releasever
  • B. Changes to the repository configuration become active after running yum confupdate
  • C. Changes to the yum configuration become active after restarting the yumdservice
  • D. The configuration of package repositories can be divided into multiple files
  • E. In case /etc/yum.repos.d/contains files, /etc/yum.confis ignored

Answer: A,D


NEW QUESTION # 163
Which of the following commands show how the shell handles a specific command?
where

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

Answer: C


NEW QUESTION # 164
Which of the following commands creates or, in case it already exists, overwrites a file called datawith the output of ls?

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

Answer: C


NEW QUESTION # 165
Which of the following apt-get commands will install the newest versions of all currently installed packages?

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

Answer: B

Explanation:
Explanation
The apt-get command is used to interact with the APT package management system on Debian-based Linux distributions. The apt-get command has several subcommands that perform different operations on packages.
One of these subcommands is full-upgrade, which is used to install the newest versions of all currently installed packages, along with their dependencies. The full-upgrade command also removes any packages that are no longer needed or that conflict with the upgraded packages. The full-upgrade command is equivalent to the dist-upgrade command, which is an older name for the same operation. The other options are not valid subcommands of apt-get. The auto-update option does not exist, the install option is used to install specific packages, not to upgrade them, the update option is used to update the list of available packages, not to install them, and the dist-upgrade option is the same as the full-upgrade option. References:
* APT-GET Command in Linux {Detailed Tutorial With Examples} - phoenixNAP
* Using apt-get Commands in Linux [Ultimate Guide] - It's FOSS
* Ubuntu 'apt-get' list of commands (list, update, upgrade, cheatsheet ...


NEW QUESTION # 166
In compliance with the FHS, in which of the following directories are documentation files found?

  • A. /var/share/doc
  • B. /usr/share/doc
  • C. /usr/local/share/documentation
  • D. /usr/share/documentation
  • E. /etc/share/doc

Answer: A


NEW QUESTION # 167
......

Use Real 101-500 Dumps - 100% Free 101-500 Exam Dumps: https://validdumps.free4torrent.com/101-500-valid-dumps-torrent.html