{"id":18642,"date":"2026-09-22T08:58:23","date_gmt":"2026-09-22T08:58:23","guid":{"rendered":"https:\/\/www.examlabs.com\/certification\/?p=18642"},"modified":"2026-09-22T08:58:23","modified_gmt":"2026-09-22T08:58:23","slug":"lpi-101-500-practice-test-questions-and-exam-dumps-part-19-q361-380","status":"publish","type":"post","link":"https:\/\/www.examlabs.com\/certification\/lpi-101-500-practice-test-questions-and-exam-dumps-part-19-q361-380\/","title":{"rendered":"LPI 101-500 Practice Test Questions and Exam Dumps Part 19 Q361-380"},"content":{"rendered":"<p><b>View Full<\/b> <a href=\"https:\/\/www.examlabs.com\/101-500-exam-dumps\"><b>LPI 101-500<\/b><b> Exam Dumps<\/b><\/a><b> and Practice Test Dumps<\/b><\/p>\n<p>&nbsp;<\/p>\n<p><b>Question: 361. Which command can display the current value of the <\/b><b>HOME<\/b><b> environment variable?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">echo $HOME<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">print-home<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">home &#8211;show<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">show HOME<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. echo $HOME<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">HOME<\/span><span style=\"font-weight: 400;\"> environment variable normally contains the pathname of the current user&#8217;s home directory. The command <\/span><span style=\"font-weight: 400;\">echo $HOME<\/span><span style=\"font-weight: 400;\"> expands the variable and displays its value. This is useful in shell scripts and interactive sessions when a command needs to refer to the user&#8217;s home directory without hard-coding a specific pathname. The tilde character <\/span><span style=\"font-weight: 400;\">~<\/span><span style=\"font-weight: 400;\"> also commonly represents the current user&#8217;s home directory in shell pathname expansion, but <\/span><span style=\"font-weight: 400;\">$HOME<\/span><span style=\"font-weight: 400;\"> directly accesses the variable. Environment variables can influence the behavior of many commands and applications, making them an important part of the Linux shell environment.<\/span><\/p>\n<p><b>Question: 362. Which environment variable normally contains the current user&#8217;s login shell?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">$USER<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">$SHELL<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">$LOGIN<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">$TERM<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. $SHELL<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">SHELL<\/span><span style=\"font-weight: 400;\"> environment variable commonly contains the pathname of the user&#8217;s default login shell, such as <\/span><span style=\"font-weight: 400;\">\/bin\/bash<\/span><span style=\"font-weight: 400;\"> or another supported shell. It can be inspected with <\/span><span style=\"font-weight: 400;\">echo $SHELL<\/span><span style=\"font-weight: 400;\">. The <\/span><span style=\"font-weight: 400;\">USER<\/span><span style=\"font-weight: 400;\"> variable identifies the current username, while <\/span><span style=\"font-weight: 400;\">TERM<\/span><span style=\"font-weight: 400;\"> identifies the terminal type or terminal environment. Although <\/span><span style=\"font-weight: 400;\">$SHELL<\/span><span style=\"font-weight: 400;\"> commonly represents the user&#8217;s configured login shell, it should not always be interpreted as proof of which shell process is currently executing a particular command or script. Linux environments can contain multiple shells and processes, each potentially having different execution contexts.<\/span><\/p>\n<p><b>Question: 363. Which command can print the current value of the shell&#8217;s <\/b><b>PATH<\/b><b> variable?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">showpath<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">path &#8211;print<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">echo $PATH<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">printenv-path<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. echo $PATH<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">PATH<\/span><span style=\"font-weight: 400;\"> environment variable contains a list of directories that the shell searches when resolving executable command names. The command <\/span><span style=\"font-weight: 400;\">echo $PATH<\/span><span style=\"font-weight: 400;\"> displays the current value of this variable, normally showing directory names separated by colons. When a user types a command without an explicit pathname, the shell can search these directories according to its command-resolution rules. Modifying <\/span><span style=\"font-weight: 400;\">PATH<\/span><span style=\"font-weight: 400;\"> can change which executable is selected when multiple programs have the same name. Administrators should therefore understand its contents before troubleshooting unexpected command resolution.<\/span><\/p>\n<p><b>Question: 364. Which shell command can display environment variables and their values?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">env<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">vars<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">environment<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">showenv<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. env<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">env<\/span><span style=\"font-weight: 400;\"> command can display the environment variables available to the current process environment. It can also be used to run a command with a modified environment. Environment variables provide configuration information to programs and can influence behavior such as command lookup, locale, terminal settings, and user-specific directories. <\/span><span style=\"font-weight: 400;\">set<\/span><span style=\"font-weight: 400;\"> in some shells can display additional shell variables and functions, so its output is not identical to <\/span><span style=\"font-weight: 400;\">env<\/span><span style=\"font-weight: 400;\">. Understanding the distinction between shell variables and exported environment variables is important when troubleshooting scripts and determining which values are inherited by child processes.<\/span><\/p>\n<p><b>Question: 365. Which shell variable contains the number of positional arguments supplied to a script?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">$@<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">$0<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">$?<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. $#<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The special shell parameter <\/span><span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"> contains the number of positional parameters supplied to a shell script or function. For example, if a script is invoked with three arguments, <\/span><span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"> evaluates to <\/span><span style=\"font-weight: 400;\">3<\/span><span style=\"font-weight: 400;\">. This is useful when a script needs to validate how many arguments were provided before performing an operation. <\/span><span style=\"font-weight: 400;\">$0<\/span><span style=\"font-weight: 400;\"> normally represents the script&#8217;s invocation name, <\/span><span style=\"font-weight: 400;\">$@<\/span><span style=\"font-weight: 400;\"> represents the positional arguments, and <\/span><span style=\"font-weight: 400;\">$?<\/span><span style=\"font-weight: 400;\"> contains the exit status of the most recently completed command. Correctly using these special parameters is fundamental to writing reliable shell scripts.<\/span><\/p>\n<p><b>Question: 366. Which shell expansion preserves each positional parameter as a separate word when quoted?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">&#8220;$*&#8221;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">&#8220;$@&#8221;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">**4. <\/span><span style=\"font-weight: 400;\">$$<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. &#8220;$@&#8221;<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">When used inside double quotes, <\/span><span style=\"font-weight: 400;\">&#8220;$@&#8221;<\/span><span style=\"font-weight: 400;\"> expands positional parameters while preserving each parameter as a separate word. This behavior is especially important in shell scripts that need to pass all supplied arguments to another command without incorrectly combining arguments containing spaces. By contrast, <\/span><span style=\"font-weight: 400;\">&#8220;$*&#8221;<\/span><span style=\"font-weight: 400;\"> generally expands the positional parameters as a single word, with the first character of <\/span><span style=\"font-weight: 400;\">IFS<\/span><span style=\"font-weight: 400;\"> used as the separator. The distinction becomes important when writing functions and scripts that forward arbitrary user-supplied arguments. Proper quoting helps prevent unintended word splitting and glob expansion.<\/span><\/p>\n<p><b>Question: 367. Which command can display the exit status of the most recently executed command?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">echo $?<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">echo $!<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">echo $$<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">echo $#<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. echo $?<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The special shell parameter <\/span><span style=\"font-weight: 400;\">$?<\/span><span style=\"font-weight: 400;\"> contains the exit status of the most recently executed command or pipeline, subject to shell semantics. The command <\/span><span style=\"font-weight: 400;\">echo $?<\/span><span style=\"font-weight: 400;\"> can therefore be used immediately afterward to inspect whether the preceding operation succeeded or failed. Conventionally, an exit status of zero indicates success, while a nonzero status generally indicates some form of failure or other condition. <\/span><span style=\"font-weight: 400;\">$!<\/span><span style=\"font-weight: 400;\"> relates to the most recently started background process, <\/span><span style=\"font-weight: 400;\">$$<\/span><span style=\"font-weight: 400;\"> identifies the current shell process, and <\/span><span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"> counts positional arguments. Exit statuses are central to conditional shell execution and scripting.<\/span><\/p>\n<p><b>Question: 368. Which shell builtin can display or modify shell options and positional parameters?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">set<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">options<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">shellctl<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">configure<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 4. set<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">set<\/span><span style=\"font-weight: 400;\"> shell builtin has several roles, including changing shell options and assigning positional parameters. Options such as <\/span><span style=\"font-weight: 400;\">set -e<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">set -u<\/span><span style=\"font-weight: 400;\"> alter shell behavior, while other forms of <\/span><span style=\"font-weight: 400;\">set<\/span><span style=\"font-weight: 400;\"> can affect positional parameters. In many shells, running <\/span><span style=\"font-weight: 400;\">set<\/span><span style=\"font-weight: 400;\"> without suitable options can also display shell variables and functions. Because <\/span><span style=\"font-weight: 400;\">set<\/span><span style=\"font-weight: 400;\"> has multiple purposes, its exact behavior depends on the arguments supplied and the shell implementation. Administrators should consult the shell&#8217;s documentation when using advanced options, especially in scripts where option changes can affect subsequent commands.<\/span><\/p>\n<p><b>Question: 369. Which command can remove an alias definition from the current shell?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">removealias<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">unalias<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">delalias<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">alias -d<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. unalias<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">unalias<\/span><span style=\"font-weight: 400;\"> shell builtin removes an alias from the current shell. Aliases provide short names or substitutions for commands, but they can sometimes cause confusion when a command behaves differently from its expected executable form. Using <\/span><span style=\"font-weight: 400;\">unalias<\/span><span style=\"font-weight: 400;\"> allows an administrator or user to remove a particular alias or, with supported syntax, multiple aliases. Alias definitions normally affect the current shell environment and do not automatically modify the underlying executable files. The <\/span><span style=\"font-weight: 400;\">alias<\/span><span style=\"font-weight: 400;\"> builtin is used to create or inspect aliases, while <\/span><span style=\"font-weight: 400;\">unalias<\/span><span style=\"font-weight: 400;\"> is specifically intended for removing them.<\/span><\/p>\n<p><b>Question: 370. Which command can show the shell&#8217;s command history with command numbers?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">history<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">commands<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">log<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">recall<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. history<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">history<\/span><span style=\"font-weight: 400;\"> shell builtin displays previously entered commands maintained by the shell&#8217;s history mechanism. Entries are commonly shown with numbers, allowing users to refer to earlier commands using history expansion or other shell-specific mechanisms. History is useful for repeating commands, reviewing recent administrative actions, and reducing the need to retype long commands. The exact amount of stored history depends on shell configuration and variables such as <\/span><span style=\"font-weight: 400;\">HISTSIZE<\/span><span style=\"font-weight: 400;\">. History should not be confused with system logs, which record events independently of the interactive shell&#8217;s command history.<\/span><\/p>\n<p><b>Question: 371. Which command can temporarily change the shell&#8217;s working directory to the directory stored in the <\/b><b>OLDPWD<\/b><b> variable?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">cd &#8211;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">cd &#8211;old<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">cd previous<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">back<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. cd &#8211;<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">cd &#8211;<\/span><span style=\"font-weight: 400;\"> command changes the current working directory to the previous working directory, commonly represented by the <\/span><span style=\"font-weight: 400;\">OLDPWD<\/span><span style=\"font-weight: 400;\"> shell variable. It is useful when a user needs to switch between two directories repeatedly. After changing directories, the shell generally updates variables such as <\/span><span style=\"font-weight: 400;\">PWD<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">OLDPWD<\/span><span style=\"font-weight: 400;\"> to reflect the current and previous locations. This is different from <\/span><span style=\"font-weight: 400;\">cd ..<\/span><span style=\"font-weight: 400;\">, which moves to the parent directory, and <\/span><span style=\"font-weight: 400;\">cd ~<\/span><span style=\"font-weight: 400;\">, which moves to the current user&#8217;s home directory. Understanding these shortcuts can make interactive shell navigation more efficient.<\/span><\/p>\n<p><b>Question: 372. Which pathname refers to the current user&#8217;s home directory through shell tilde expansion?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">~<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">..<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">\/home<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. ~<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The tilde character <\/span><span style=\"font-weight: 400;\">~<\/span><span style=\"font-weight: 400;\"> is expanded by many Unix-like shells to the current user&#8217;s home directory when used in an appropriate unquoted pathname context. For example, <\/span><span style=\"font-weight: 400;\">cd ~<\/span><span style=\"font-weight: 400;\"> normally changes to the user&#8217;s home directory. The notation <\/span><span style=\"font-weight: 400;\">~user<\/span><span style=\"font-weight: 400;\"> can also refer to another user&#8217;s home directory when the shell can resolve that account. The single dot <\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"> represents the current directory, while <\/span><span style=\"font-weight: 400;\">..<\/span><span style=\"font-weight: 400;\"> represents its parent. <\/span><span style=\"font-weight: 400;\">\/home<\/span><span style=\"font-weight: 400;\"> is the conventional location containing user home directories on many systems but is not itself necessarily the current user&#8217;s home directory.<\/span><\/p>\n<p><b>Question: 373. Which command can display the current user&#8217;s identity and associated groups in a compact account-information format?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">id<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">account<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">userinfo<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">who<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. id<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">id<\/span><span style=\"font-weight: 400;\"> command displays identity information associated with a user account, commonly including the numeric user ID, primary group ID, username, and supplementary group memberships. This makes it useful when troubleshooting permission problems or determining which groups a process or user belongs to. The <\/span><span style=\"font-weight: 400;\">who<\/span><span style=\"font-weight: 400;\"> command instead focuses on users currently logged into the system. The <\/span><span style=\"font-weight: 400;\">groups<\/span><span style=\"font-weight: 400;\"> command can provide group membership information but does not normally present the same complete identity information as <\/span><span style=\"font-weight: 400;\">id<\/span><span style=\"font-weight: 400;\">. Understanding user and group IDs is fundamental to Linux ownership and permission management.<\/span><\/p>\n<p><b>Question: 374. Which permission mode allows the owner to read and write a file while allowing others only to read it?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">755<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">644<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">600<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">666<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. 644<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The numeric permission mode <\/span><span style=\"font-weight: 400;\">644<\/span><span style=\"font-weight: 400;\"> gives the owner read and write permissions, represented by <\/span><span style=\"font-weight: 400;\">6<\/span><span style=\"font-weight: 400;\">, while the group and other users receive read-only permissions, represented by <\/span><span style=\"font-weight: 400;\">4<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">4<\/span><span style=\"font-weight: 400;\">. In symbolic form, this is commonly represented as <\/span><span style=\"font-weight: 400;\">rw-r&#8211;r&#8211;<\/span><span style=\"font-weight: 400;\">. The first digit applies to the owner, the second to the group, and the third to others. <\/span><span style=\"font-weight: 400;\">755<\/span><span style=\"font-weight: 400;\"> additionally grants execute permission to all three categories, while <\/span><span style=\"font-weight: 400;\">600<\/span><span style=\"font-weight: 400;\"> restricts access to the owner. Numeric permission notation is a concise way to manage Linux filesystem access.<\/span><\/p>\n<p><b>Question: 375. Which permission mode is commonly appropriate for a private file that should be readable and writable only by its owner?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">644<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">755<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">600<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">666<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. 600<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The permission mode <\/span><span style=\"font-weight: 400;\">600<\/span><span style=\"font-weight: 400;\"> gives the owner read and write permissions while granting no permissions to the group or other users. In symbolic notation, it is <\/span><span style=\"font-weight: 400;\">rw&#8212;&#8212;-<\/span><span style=\"font-weight: 400;\">. This mode is commonly used for private files that should not be accessible by other accounts on the system. The first numeric digit represents owner permissions, while the second and third represent group and other permissions. A mode such as <\/span><span style=\"font-weight: 400;\">644<\/span><span style=\"font-weight: 400;\"> would allow group and other users to read the file, while <\/span><span style=\"font-weight: 400;\">755<\/span><span style=\"font-weight: 400;\"> would additionally provide execute permissions. Correct permission selection is important for protecting sensitive data.<\/span><\/p>\n<p><b>Question: 376. Which command changes a file&#8217;s permission bits using symbolic notation?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">chmod<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">chperm<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">permset<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">access<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. chmod<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">chmod<\/span><span style=\"font-weight: 400;\"> command changes the permission bits of files and directories. It supports both numeric modes and symbolic notation. For example, <\/span><span style=\"font-weight: 400;\">chmod u+x script.sh<\/span><span style=\"font-weight: 400;\"> adds execute permission for the owner, while <\/span><span style=\"font-weight: 400;\">chmod go-w file<\/span><span style=\"font-weight: 400;\"> removes write permission for the group and others. Symbolic notation can be useful when only a specific permission change is needed without redefining every permission bit. <\/span><span style=\"font-weight: 400;\">chown<\/span><span style=\"font-weight: 400;\"> changes ownership rather than permissions, while <\/span><span style=\"font-weight: 400;\">chgrp<\/span><span style=\"font-weight: 400;\"> changes group ownership. Understanding <\/span><span style=\"font-weight: 400;\">chmod<\/span><span style=\"font-weight: 400;\"> is essential for controlling read, write, and execute access on Linux filesystem objects.<\/span><\/p>\n<p><b>Question: 377. Which command changes the owner of a file while also allowing a group to be specified?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">chmod<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">chgrp<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">chown<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">own<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. chown<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">chown<\/span><span style=\"font-weight: 400;\"> command changes the ownership of files and directories and can also specify a group depending on its syntax. For example, an administrator can use a form such as <\/span><span style=\"font-weight: 400;\">chown alice:developers project.txt<\/span><span style=\"font-weight: 400;\"> to set the owner to <\/span><span style=\"font-weight: 400;\">alice<\/span><span style=\"font-weight: 400;\"> and the group to <\/span><span style=\"font-weight: 400;\">developers<\/span><span style=\"font-weight: 400;\">. This makes <\/span><span style=\"font-weight: 400;\">chown<\/span><span style=\"font-weight: 400;\"> broader than <\/span><span style=\"font-weight: 400;\">chgrp<\/span><span style=\"font-weight: 400;\">, which specifically changes group ownership. Changing ownership usually requires appropriate administrative privileges. Because ownership directly affects access-control decisions, administrators should verify the intended pathname and ownership values before applying recursive ownership changes.<\/span><\/p>\n<p><b>Question: 378. Which command displays the names of groups to which the current user belongs?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">members<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">groups<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">group-list<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">showgroups<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. groups<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">groups<\/span><span style=\"font-weight: 400;\"> command displays the group memberships associated with the current user or, when supplied with a username, another specified account. Group membership is important because Linux permission checks can use the user&#8217;s group memberships when determining access to files and other resources. The <\/span><span style=\"font-weight: 400;\">id<\/span><span style=\"font-weight: 400;\"> command provides more detailed identity information, including numeric user and group IDs. <\/span><span style=\"font-weight: 400;\">groups<\/span><span style=\"font-weight: 400;\"> is therefore a convenient command when the primary question is simply which groups an account belongs to. Group configuration can vary between local accounts and directory-based authentication systems.<\/span><\/p>\n<p><b>Question: 379. Which command can display the contents of a text file with line numbers added to each line?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">cat -n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">cat -l<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">number<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">lines<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. cat -n<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">-n<\/span><span style=\"font-weight: 400;\"> option of <\/span><span style=\"font-weight: 400;\">cat<\/span><span style=\"font-weight: 400;\"> numbers the output lines when displaying a file. For example, <\/span><span style=\"font-weight: 400;\">cat -n script.sh<\/span><span style=\"font-weight: 400;\"> can make it easier to refer to specific lines while troubleshooting a script or reviewing configuration content. The option changes the displayed output but does not modify the underlying file. Other tools can also number lines, such as <\/span><span style=\"font-weight: 400;\">nl<\/span><span style=\"font-weight: 400;\">, which is specifically designed for numbered output. <\/span><span style=\"font-weight: 400;\">cat -n<\/span><span style=\"font-weight: 400;\"> is convenient when a user is already using <\/span><span style=\"font-weight: 400;\">cat<\/span><span style=\"font-weight: 400;\"> and wants a simple numbered representation of the file&#8217;s contents.<\/span><\/p>\n<p><b>Question: 380. Which command can display the first line of a file followed by the remaining lines unchanged when used with the appropriate options?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">head<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">sed<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">tail<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">cut<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. sed<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">sed<\/span><span style=\"font-weight: 400;\"> stream editor can process input line by line and selectively perform operations on particular lines while passing other content through unchanged. This makes it suitable for tasks where only a specific line or range needs to be modified or displayed differently. For example, a <\/span><span style=\"font-weight: 400;\">sed<\/span><span style=\"font-weight: 400;\"> address can target line 1 while the remainder of the input continues through the processing stream. <\/span><span style=\"font-weight: 400;\">head<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">tail<\/span><span style=\"font-weight: 400;\"> are primarily used to select the beginning or end of input, while <\/span><span style=\"font-weight: 400;\">cut<\/span><span style=\"font-weight: 400;\"> extracts selected fields or character positions. <\/span><span style=\"font-weight: 400;\">sed<\/span><span style=\"font-weight: 400;\"> provides considerably more flexible line-oriented transformations.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>View Full LPI 101-500 Exam Dumps and Practice Test Dumps &nbsp; Question: 361. Which command can display the current value of the HOME environment variable? echo $HOME 2. print-home 3. home &#8211;show 4. show HOME Correct Answer: 1. echo $HOME Explanation: The HOME environment variable normally contains the pathname of the current user&#8217;s home directory. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1648,1647],"tags":[],"_links":{"self":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/18642"}],"collection":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/comments?post=18642"}],"version-history":[{"count":1,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/18642\/revisions"}],"predecessor-version":[{"id":18643,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/18642\/revisions\/18643"}],"wp:attachment":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/media?parent=18642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/categories?post=18642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/tags?post=18642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}