
2025 New Training Course 101-500 Tutorial Preparation Guide
Dumps of 101-500 Cover all the requirements of the Real Exam
NEW QUESTION # 61
Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)
- A. SysV init
- B. startd
- C. Upstart
- D. SysInit
- E. systemd
Answer: A,C,E
Explanation:
systemd, Upstart, and SysV init are all init systems used within Linux systems. An init system is the first process executed by the kernel at boot time, which has a process ID (PID) of 1, and is responsible for starting and managing all other processes on the system. Different init systems have different features, advantages, and disadvantages. Some of the most common init systems are:
* systemd: A relatively new and modern init system that aims to provide a unified and efficient way of managing system and service states. It is compatible with SysV and LSB init scripts, and supports features such as parallel processing, socket activation, logging, job scheduling, and more. It is the default init system for many popular Linux distributions, such as Fedora, Debian, Ubuntu, Arch Linux, and others12.
* Upstart: An event-based init system developed by Ubuntu as a replacement for SysV init. It starts and stops system tasks and processes based on events, such as hardware changes, network availability, filesystem mounting, etc. It is a hybrid init system that uses both SysV and systemd scripts, and supports features such as parallel processing, dependency tracking, logging, and more. It is the default init system for some older versions of Ubuntu, and some other Linux distributions, such as Linux Mint and Chrome OS12.
* SysV init: A mature and traditional init system that follows the System V (SysV) design of Unix operating systems. It uses a series of runlevels to define the state of the system, and executes scripts in the /etc/rc.d or /etc/init.d directories according to the current runlevel. It is simple and stable, but lacks some features of modern init systems, such as parallel processing, event handling, dependency tracking, etc. It is still used by some Linux distributions, such as Slackware, Gentoo, and others12.
1: 6 Best Modern Linux 'init' Systems (1992-2023) - Tecmint 2: 10 Best Linux init systems as of 2023 - Slant.
NEW QUESTION # 62
Which of the following commands sets the SetUID permission on the executable /bin/foo?
chmod 4755 /bin/foo
- A. chmod u-s /bin/foo
- B. chmod 2755 /bin/foo
- C. chmod 1755 /bin/foo
- D.
- E. chmod 755+s /bin/foo
Answer: C
NEW QUESTION # 63
Which daemon handles power management events on a Linux system?
acpid
- A. pwrmgntd
- B. batteryd
- C. psd
- D.
- E. inetd
Answer: B
NEW QUESTION # 64
Which of the following commands redirects the output of lsto standard error?
ls >-1
- A. ls |error
- B. ls >&2
- C. ls >>2
- D.
- E. ls <<ERR
Answer: C
NEW QUESTION # 65
Which of the following explanations are valid reasons to run a command in the background of your shell?
- A. The command has to run immediately but the user needs to log out.
- B. The command does not need to execute immediately.
- C. The command can run at a lower priority than normal commands run on the command line.
- D. The system is being shut down and the command needs to restart execution immediately after the reboot.
Answer: A
Explanation:
Running a command in the background of your shell means that the command will execute asynchronously, without blocking the shell prompt or waiting for user input. This can be useful for commands that take a long time to complete, or that do not require user interaction. One of the valid reasons to run a command in the background is when the command has to run immediately but the user needs to log out. For example, if the user wants to start a backup process that will take several hours, but also wants to close the terminal session and log out from the system, they can run the backup command in the background by appending an ampersand (&) to the command line. This way, the backup command will continue to run even after the user logs out, and the user can check the status or output of the command later. The other options are either incorrect or not applicable. Running a command in the background does not affect the execution priority of the command, which is determined by the nice value and the scheduler. Running a command in the background does not delay the execution of the command, which will start as soon as possible. Running a command in the background does not guarantee that the command will survive a system shutdown or reboot, unless the command is configured to do so with a service manager or a startup script. References:
* LPIC-1 Exam 101 Objectives, Topic 103: GNU and Unix Commands, 103.1 Work on the command line
* LPIC-1 Linux Administrator 101-500 Exam FAQ, LPIC-1 Exam 101 Objectives, GNU and Unix Commands (Total Weight: 25)
NEW QUESTION # 66
Which of the following commands will print important system information such as the kernel version and machine hardware architecture?
- A. sysinfo
- B. info
- C. uname
- D. arch
- E. lspci
Answer: C,D
Explanation:
Explanation
The commands that will print important system information such as the kernel version and machine hardware architecture are uname and arch. The uname command prints system information, such as the kernel name, release, version, machine, processor, hardware platform, and operating system. The arch command prints the machine hardware name, which is equivalent to uname -m. For example, uname -a will print Linux
5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux, and arch will print x86_64. The sysinfo command is not a valid Linux command. The lspci command prints information about PCI buses and devices in the system. The info command prints documentation for a given topic or command. References:
LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.1:
Work on the command line, uname command, arch command, lspci command, info command
NEW QUESTION # 67
A Debian package creates several files during its installation. Which of the following commands searches for packages owning the file /etc/debian_version?
apt-get search /etc/debian_version
- A. dpkg -S /etc/debian_version
- B. apt-file /etc/debian_version
- C. apt -r /etc/debian_version
- D. find /etc/debian_version -dpkg
- E.
Answer: B
NEW QUESTION # 68
What command would help you identify the I/O address range being used by the network card?
- A. cat/proc/devices
- B. cat/proc/ioports
- C. cat/proc/meminfo
- D. cat/proc/modules
- E. cat/io/dma
Answer: B
NEW QUESTION # 69
What command changes the nice level of a running process?
(Specify ONLY the command without any path or parameters)
Answer:
Explanation:
renice
NEW QUESTION # 70
Which of the following commands will print the first few lines of a text file to the shell?
- A. print -n 10 filename
- B. cat -n 10 filename
- C. dump -n 10 filename
- D. head -n 10 filename
Answer: D
NEW QUESTION # 71
In which directory must definition files be placed to add additional repositories to yum?
Answer:
Explanation:
/etc/yum.repos.d
/etc/yum.repos.d/
yum.repos.d
yum.repos.d/
NEW QUESTION # 72
Which of the following directories on a 64 bit Linux system typically contain shared libraries? (Choose two.)
~/.lib64/
- A. /usr/lib64/
- B. /opt/lib64/
- C. /lib64/
- D. /var/lib64/
- E.
Answer: B,D
NEW QUESTION # 73
What file contains kernel level logging information such as output from a network driver module when it is loaded?
Answer:
Explanation:
/var/log/kern.log
/var/log/messages/kern.log
messages/kern.log
NEW QUESTION # 74
Which of the following commands shows the definition of a given shell command?
- A. case
- B. type
- C. where
- D. stat
Answer: B
Explanation:
The type command shows the type of a given shell command, which can be one of the following: alias, keyword, function, builtin, or file. For example, type ls will show that ls is an alias for ls --color=auto. The type command can also show the full path of a file command, such as type grep will show that grep is /bin
/grep. References: LPI Linux Essentials, type command
NEW QUESTION # 75
Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)
- A. chmod +t /tmp
- B. chmod +s /tmp
- C. chmod 2775 /tmp
- D. chmod 4775 /tmp
- E. chmod 1775 /tmp
Answer: A,E
Explanation:
Explanation
The sticky bit is a special permission bit that can be set for directories. It prevents users from deleting or renaming files in the directory that they do not own, even if they have write permission on the directory. This is useful for shared directories like /tmp, where users can create temporary files but not interfere with other users' files12. The command chmod +t /tmp sets the sticky bit for the directory /tmp by adding the letter t to the end of the permission string. The command chmod 1775 /tmp also sets the sticky bit for the directory /tmp by adding the number 1 to the beginning of the octal mode. The number 1 represents the sticky bit in the octal notation34. The commands chmod +s /tmp, chmod 4775 /tmp, and chmod 2775 /tmp do not set the sticky bit, but rather the setuid or setgid bits, which are different special permission bits that affect how programs are executed5. References: 1: Sticky bit - Wikipedia 2: Linux Sticky Bit Concept Explained with Examples 3:
chmod(1) - Linux man page 4: Understanding Linux File Permissions 5: Setuid and Setgid on Linux - GeeksforGeeks
NEW QUESTION # 76
Which of the following commands can be used to display the inode number of a given file?
- A. cp
- B. ls
- C. inode
- D. ln
Answer: B
Explanation:
The command ls can be used to display the inode number of a given file by using the -i option. The inode number is a unique identifier for each file in a Linux file system. It contains information about the file's attributes, such as size, permissions, ownership, timestamps, and location on the disk12. For example, ls -i file.
txt will show the inode number of the file file.txt in the current directory. The command inode does not exist in Linux. The command ln can be used to create links to files, but not to display their inode numbers. The command cp can be used to copy files, but not to display their inode numbers3. References: 1: What is an Inode in Linux? 2: Understanding Linux File System Inodes 3: Linux Commands Cheat Sheet
NEW QUESTION # 77
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 loga.log ':08:[0-9]+:[0-9]+'
- B. grep -E ':08:[09]+:[09]+' loga.log
- C. grep loga.log ':08:[0-9]:[0-9]'
- D. grep -E ':08:[00]+' loga.log
- E. grep -E ':08:[0-9]+:[0-9]+' loga.log
Answer: E
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 # 78
Which of the following regular expressions represents a single upper-case letter?
- A. !a-z
- B. %C
- C. :UPPER:
- D. {AZ}
- E. [A-Z]
Answer: E
Explanation:
Explanation
The regular expression that represents a single upper-case letter is [A-Z]. This is a character class that matches any one character from the range A to Z, which are the 26 upper-case letters of the English alphabet. A character class is enclosed in square brackets and can contain a list or a range of characters to match. For example, [abc] matches any one of the letters a, b, or c, and [0-9] matches any one digit from 0 to 9. The other options are not valid regular expressions for a single upper-case letter. The :UPPER: option is not a valid syntax for a character class, and it would be interpreted as a literal string of seven characters. The !a-z option is not a valid syntax for a negated character class, and it would be interpreted as a literal string of four characters. The %C option is not a valid syntax for a character class, and it would be interpreted as a literal string of two characters. The {AZ} option is not a valid syntax for a character class, and it would be interpreted as a literal string of four characters. The curly braces are used for interval expressions, which specify the number of repetitions of a character or a group of characters. For example, a{2,4} matches the letter a repeated two, three, or four times. References:
* How to Use Regular Expressions (regexes) on Linux1
* How to Use Regular Expressions (RegEx) on Linux2
* A beginner's guide to regular expressions with grep3
NEW QUESTION # 79
Which one of the following programs will only find files that are in your PATH?
- A. slocate
- B. locate
- C. find
- D. which
Answer: D
NEW QUESTION # 80
......
Sample Questions of 101-500 Dumps With 100% Exam Passing Guarantee: https://www.dumpstillvalid.com/101-500-prep4sure-review.html
Correct Practice Tests of 101-500 Dumps with Practice Exam: https://drive.google.com/open?id=13TdeqUtMSoIy9zSShPooPuUqlUMT2JD6
