LPIC-1 System Administrator Exam 102, Part 2 of 2, (version 5.0) 102-500 Exam Questions

Page: 1 / 14
Total 234 questions
Question 1

Which environment variable is used by an X11 client to determine the X Server to connect to? (Specify ONLY the variable name without any preceding commands or values.)



Answer : A


Question 2

Which of the following are tasks handled by a display manager like XDM or KDM? (Choose TWO correct answers.)



Answer : A, C

The tasks that are handled by a display manager like XDM or KDM are to start and prepare the desktop environment for the user and to handle the login of a user. A display manager is a software component that manages the graphical user interface of an operating system. It provides a login screen where the user can enter their credentials and choose their preferred desktop environment or window manager. After the user is authenticated, the display manager launches the selected desktop environment or window manager and sets up the graphical session. The display manager also handles the logout, shutdown, and reboot of the system.

The other options are incorrect because they are not tasks handled by a display manager:

B . Configure additional devices like new monitors or projectors when they are attached. This task is handled by the X server, which is the core component of the X Window System. The X server is responsible for communicating with the hardware devices, such as the keyboard, mouse, monitor, and graphics card. The X server can detect and configure new devices dynamically using tools like xrandr or xorg.conf.

D . Lock the screen when the user was inactive for a configurable amount of time. This task is handled by the screensaver program, which is a utility that runs in the background and activates when the user is idle for a certain period of time. The screensaver can display various animations or images on the screen, or it can blank the screen entirely. The screensaver can also lock the screen and require the user to enter their password to resume the session. The screensaver can be configured by the user using tools like xscreensaver or gnome-screensaver.

E . Create an X11 configuration file for the current graphic devices and monitors. This task is handled by the X server, which is the core component of the X Window System. The X server can create an X11 configuration file, which is a text file that contains the settings for the X server and the devices it communicates with. The X11 configuration file is usually located at /etc/X11/xorg.conf or /etc/X11/xorg.conf.d/. The X server can generate a default configuration file using the command Xorg -configure, or it can be edited manually by the user or the system administrator.Reference https://www.baeldung.com/linux/display-managers-explained

https://quizlet.com/185979426/lx0-104-flash-cards/


Question 3

After issuing:

function myfunction { echo $1 $2 ; }

in Bash, which output does:

myfunction A B C

Produce?



Answer : A

In Bash, a function is a block of code that can be invoked by its name. A function can take arguments, which are passed to the function as positional parameters. The$1variable refers to the first argument,$2to the second argument, and so on. The function can access the number of arguments passed to it by using the$#variable. In this case, the functionmyfunctionsimply echoes the first and second arguments to the standard output. Therefore, when the commandmyfunction A B Cis executed, the output isA B, since the third argumentCis ignored by the function.Reference:

[LPI Linux Essentials - Topic 103: Command Line Basics]

[Bash Functions]


Question 4

Your senior administrator asked you to change the default background of his machine, which uses XDM. Which file would you edit to achieve this?



Answer : A

The file /etc/X11/xdm/Xsetup contains commands that are executed by XDM before displaying the login screen. This file can be used to set the background image, color, or run other programs on the X display. The other files are either not related to XDM or do not exist by default.Reference:

XDM - ArchWiki

Customizing the XDM Login Screen | Linux Journal


Question 5

Which of the following commands shows the current color depth of the X Server?



Answer : C

The command that can be used to show the current color depth of the X Server isxwininfo. xwininfo is a command-line tool that provides information about X windows. When executed, it opens a small window and waits for the user to select a window by clicking on it. Then, it displays various characteristics about the window in question, such as its geometry, position, size, depth, class, name, id, and more. The depth value indicates the number of bits per pixel used to represent the colors of the window. xwininfo is part of the X Window System, which is a graphical user interface system for Unix-like operating systems. xwininfo can be useful for debugging, testing, or scripting purposes.

The other options are incorrect because they are either invalid commands or do not show the color depth of the X Server:

xcd is not a valid command in Linux. It may be confused with cd, which is used to change the current working directory.

xcdepth is not a valid command in Linux. It may be confused with xrandr, which is used to change the screen resolution and orientation.

xcolordepth is not a valid command in Linux. It may be confused with xcalib, which is used to load, alter, and query the color profile of the X display.

cat /etc/X11 is not a command, but a directory. cat is used to concatenate files and print them to the standard output. /etc/X11 is a directory that contains configuration files for the X Window System. However, these files do not necessarily show the current color depth of the X Server, as it may be overridden by other settings or options.Reference:

https://bing.com/search?q=command+to+show+color+depth+of+X+Server

https://x.org/releases/X11R7.5/doc/man/man5/xorg.conf.5.html


Question 6

An administrator wants to determine the geometry of a particular window in X, so she issues the __________ -metric command and then clicks on the window.



Answer : A

The xwininfo command is a utility for displaying information about windows in X. It can show various attributes of a window, such as its location, size, depth, border width, visual class, colormap, map state, and event masks. The -metric option specifies that all dimensions should be displayed in metric units (millimeters) rather than pixels. By issuing the xwininfo -metric command and then clicking on a window, the administrator can determine the geometry of that window, including the decorations, in millimeters.Reference:

xwininfo(1) --- Arch manual pages

[command line -


Question 7

Which command is used to add an empty group to the system? (Specify ONLY the command without any path or parameters.)



Answer : A

The groupadd command is used to add an empty group to the system. It takes the name of the group as an argument and creates an entry for it in the /etc/group file. The groupadd command also assigns a unique group ID (GID) to the new group. The groupadd command can take various options to specify the GID, the password, and other attributes of the new group. For example, groupadd -g 1000 mygroup will create a new group named mygroup with a GID of 1000.Reference:

Linux Groups - javatpoint

groupadd(8) - Linux manual page

How to Add and Delete User Groups on Linux


Page:    1 / 14   
Total 234 questions