1.
You need to create a symbolic link in the current user's home directory namedCertkiller to the file /data/foobar. Choose the command that will accomplish this.
Correct Answer
C. Ln -s /data/foobar ~/Certkiller
Explanation
ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
-s, --symbolic, make symbolic links instead of hard links
2.
What does the command "ln test bill" typically do?
Correct Answer
B. It will create a hard link from bill to test.
Explanation
ln without the -s option will make a hard link. -s specifies that ln
makes an symbolic link.
3.
What would cause a system to report having excess free space but very few availableinodes?
Correct Answer
D. Too many symbolic links are in use on /home.
Explanation
Fast symlinks allow storage of the link-text within the standard data
structures used for storing file information on disk (inodes).
4.
You are trying to make a hard link to an ordinary file butln returns an error. Which of the following could cause this?
Correct Answer
E. The source and the target are on different filesystems.
Explanation
Hard link creates a separate physical File means it point to the
original data then original filename. But hard link can't create for directory and
cann't span the multiple partitions.
5.
You are experimenting with a binary in /tmp/foo.d that expects its configuration fileat /etc/foo.conf. You don't want to save it there, but use a symbolic link to/tmp/foo.d/foo.conf instead.Which command would accomplish that?
Correct Answer
C. Ln -s /etc/foo.conf /tmp/foo.d/foo.conf
Explanation
Correct Answer is C. The ln command is used to create the link. There
are two types of link a. Soft link b. Hard link.
a. Soft link à Can create for directory also, can span multiple partitions but available until
and unless Original Files remain.
Syntax for Soft link
ln -s originalfile linkfile
b. Hard link à One separate Physical File, can't create for directory, can't span multiple
file but remains the link file if original file removed.
Syntax for Hard link
ln originalfile linkfile
6.
You have read/write permission on an ordinary file foo. You have just run ln foobar. What would happen if you ran rm foo?
Correct Answer
B. Foo would be removed while bar would remain accessible.
Explanation
Correct Answer is B. The ln command is used to create the link. There
are two types of link a. Soft link b. Hard link.
b. Softlink à Can create for directory also, can span multiple pratations but available until
and unless Original Files remain.
Syntax for Softlink
ln -s originalfile linkfile
b. Hardlink à One separate Physical File, can't create for directory, can't span multiple
file but remains the link file if original file removed.
Syntax for Hardlink
ln originalfile linkfile
In Question, created the bar hardlink of foo. That means bar is on separate physical file.
The file bar is accessible after removing the foo file also.
7.
You want to find the full path of a certain command. How would you do this?
Correct Answer
C. By using the 'which' command
Explanation
Which locates a program file in the user's path.
8.
You wish to find out the full path of the binary executable "cmd1". Type just thecommand that will show the first instance of the command.
Correct Answer
which cmd1
Explanation
Which locates a program file in the user's path.
9.
To locate all files that are less than 3 days old, you use the _____ -mtime -3command.
Correct Answer
find
Explanation
Find searches a folder hierarchy for filename(s) that meet a desired
criteria: Name, Size, File Type etc.
10.
What command can find the program file "bar" and it's associated man pages andany existing source files, but not return all files that have "bar" in the commandname or path?
Correct Answer
A. Whereis
Explanation
Whereis locates the binary, source, and manual page files for specified
commands/files.
11.
What file should you edit to exclude directories from being indexed by the slocatecommand?
Correct Answer
D. /etc/updatedb.conf
Explanation
/etc/updatedb.conf is configuration file for updatedb, that is used to
create the db that locate and slocate searches in.
12.
You want to make sure certain directories are excluded when you update yourlocate database file.Where would you typically store this configuration?
Correct Answer
D. /etc/updatedb.conf
Explanation
/etc/updatedb.conf is configuration file for updatedb, that is used to
create the db that locate and slocate searches in.
13.
Which of the following programs can be used to find the foo program in the PATHand associated man pages, but NOT list every file containing foo in the system?
Correct Answer
E. Whereis
Explanation
Whereis locates the binary, source, and manual page files for specified
commands/files.
14.
Which one of the following programs will only find files that are in your PATH?
Correct Answer
C. Which
Explanation
The locate command looks in a pre-built database for matches, like an
index. This database is updated on a schedule, and is sometimes outdated.
B. slocate securely searches its database of filenames. It works like locate, but it also
stores file permissions and ownership information so users cannot see files to which they
don't have access. In some distributions, locate is actually a symbolic link to slocate."
C. The which command parses every directory in the PATH environment variable,
returning the first match found. This is useful if you want to know which file gets
executed when you type a command, or if you need to know the full path of a file for
some reason. For example, security could be compromised by someone that puts an often
used executable in a directory that gets looked at earlier in your PATH statement. Thus,
every time you think you're executing a program, you're actually executing a possibly
malicious program. There is an option to make the which command return every found
result, but it will remain restricted to the PATH.
D. Finally, the find command just does a complete search. It accepts the starting directory
as an argument, and just looks at every file and directory it finds. It takes a long time, but
it's guaranteed to find anything that the user has read permission to.
15.
Which of the following programs can be used to the find the foo program in thePATH and associated man pages, but not list every file containing foo on thesystem?
Correct Answer
E. Whereis
Explanation
Whereis locates the binary, source, and manual page files for specified commands/files.
16.
Which command line option would you use to restrict the GNU findcommand to searching a particular number of subdirectories?
Correct Answer
C. -maxdepth
Explanation
Descend at most levels (a non-negative integer) levels of directories
below the command line arguments.
17.
How can you replace all tabs in a file named file1 with spaces?
Correct Answer
D. Expand FILE1
Explanation
expand command convert tabs in each FILE to spaces, writing to standard output.
18.
Which program finds only files that are in your path?
Correct Answer
slocate
Explanation
Secure Locate provides a secure way to index and quickly search for
files on your system. It uses incremental encoding just like GNU locate to compress
its database to make searching faster, but it will also store file permissions and
ownership so that users will not see files they do not have access to.
19.
After installing and configuring Xfree86, you notice that when you start X, thedisplay is not centered. What program can you run to find a better modeline setting?
Correct Answer
C. Xvidtune
Explanation
xvidtune - video mode tuner for XFree86.
Synopsis: xvidtune [ -show | -prev | -next | -unlock ] [ -toolkitoption ... ]
20.
The X program _________ is often used to make minor keyboard adjustments, likeproper Backspace/Delete mapping.
Correct Answer
B. Kbdmap
Explanation
kbdmap is the keyboard map file format for kbdcontrol
21.
What is the name of the X configuration tool that runs in graphical text mode?
Correct Answer
Xconfigurator
Explanation
Xconfigurator is the name of the X configuration tool that runs in graphical text mode. This tool allows users to configure the X Window System on Linux operating systems. It provides a user-friendly interface in text mode, making it easier for users to configure their display settings, such as screen resolution, color depth, and graphics drivers. Xconfigurator is commonly used on Linux distributions that use the X Window System, providing a convenient way to customize the graphical environment.
22.
What entry in the X configuration file specifies where the fonts are located for the Xsystem?
Correct Answer
C. Fontpath
Explanation
Xconfigurator - configure XFree86 server and display
23.
With Xfree86 3.3.5, what is the name of the default font server?
Correct Answer
A. Xfs
Explanation
The X font server (xfs) provides a standard mechanism for an X
server to communicate with a font renderer.
24.
What is the name of the default XFree86 Font Server?
Correct Answer
A. Xfs
Explanation
The X font server (xfs) provides a standard mechanism for an X
server to communicate with a font renderer.
25.
What must you type immediately after adding new fonts to an X window system, tomake them available to the system?
Correct Answer
mkfontdir
Explanation
mkfontdir - create an index of X font files in a directory.
26.
What is the entry in the XF86Config file that specifies the fonts are on the localmachine? Choose Two.
Correct Answer(s)
A. Unix/:-1
B. Unix/:7100
Explanation
In XF86Config FontPath "path" -
sets the search path for fonts. This path is a comma separated list of font path elements
which the X server searches for font databases. Multiple FontPath entries may be
specified, and they will be concatenated to build up the fontpath used by the server. Font
path elements may be either absolute directory paths, or a font server identifier. Font
server identifiers have the form: /:
where is the transport type to use to connect to the font server (e.g., unix for
UNIX-domain sockets or tcp for a TCP/IP connection), is the hostname of
the machine running the font server, and is the port number that the font
server is listening on (usually 7100).
27.
What section of the XF86Config file contains the entry to set the path for fontsused?
Correct Answer
B. Files
Explanation
In XF86Config FontPath "path" -
sets the search path for fonts. This path is a comma separated list of font path elements
which the X server searches for font databases. Multiple FontPath entries may be
specified, and they will be concatenated to build up the fontpath used by the server. Font
path elements may be either absolute directory paths, or a font server identifier. Font
server identifiers have the form: /:
where is the transport type to use to connect to the font server (e.g., unix for
UNIX-domain sockets or tcp for a TCP/IP connection), is the hostname of
the machine running the font server, and is the port number that the font
server is listening on (usually 7100).
28.
The screensize is already configured in X on a system. When started, the screendefaults to a certain size. The user wants to change it, what file should the user editmanually to accomplish this?
Correct Answer
C. /etc/X11/XF86Config
Explanation
XFree86 uses a configuration file called XF86Config for its initial
setup. This configuration file is searched for in the following places when the server
is started as a normal user:
/etc/X11/
/usr/X11R6/etc/X11/
/etc/X11/$XF86CONFIG
/usr/X11R6/etc/X11/$XF86CONFIG
/etc/X11/XF86Config-4
/etc/X11/XF86Config
/etc/XF86Config
/usr/X11R6/etc/X11/XF86Config.
/usr/X11R6/etc/X11/XF86Config-4
/usr/X11R6/etc/X11/XF86Config
/usr/X11R6/lib/X11/XF86Config.
/usr/X11R6/lib/X11/XF86Config-4
/usr/X11R6/lib/X11/XF86Config
The reason to why C is correct is the case sensitive spelling.
29.
Which of the following is true about the XF86Config file. Select all that apply?
Correct Answer(s)
A. Can set the screen resolution settings
B. Can set the bits per pixel (colour depth) setting
C. Includes keyboard and mouse selections
E. Contains information on where fonts are located
Explanation
XFree86 is unaware of which window manager that is installed on top of it.
30.
In XF86Config which section is concerned with fonts?
Correct Answer
B. The Files section
Explanation
The files section consist of FontPath, RGBPath and ModulePath.
31.
You are the system administrator for a small consulting company. One of yourconsultants recently installed Linux on a system in order to prepare for a project.What he performed the installation, he chose several different screen sizes (604x480,800x600, 1024x768). However, when he starts the system, it always goes into640x480 first, and he must manually toggle to get to the higher resolution. He wouldlike to change the setup so that he enters X at the higher resolution first.If you were to change this setting manually, which file would you edit?
Correct Answer
E. XF86Config
Explanation
Xfree86 uses a configuration file called XF86Config for its initial
setup.
32.
You are the system administrator for a consulting firm where several people useLinux as their desktop operating system. One of your users has installed acommercial publishing program that works under X on a variety of UNIX andLinux platforms. The user made a series of configuration changes regarding theinitial window size, location and color.Now, he is having difficulty undoing these changes and is asking for your help. Inwhich file would you think you would most likely find the configuration settings youare seeking to change?
Correct Answer
E. /etc/X11/XF86Config
Explanation
XFree86 uses a configuration file called XF86Config for its initial
setup. This configuration file is searched for in the following places when the server
is started as a normal user:
/etc/X11/
/usr/X11R6/etc/X11/
/etc/X11/$XF86CONFIG
/usr/X11R6/etc/X11/$XF86CONFIG
/etc/X11/XF86Config-4
/etc/X11/XF86Config
/etc/XF86Config
/usr/X11R6/etc/X11/XF86Config.
/usr/X11R6/etc/X11/XF86Config-4
/usr/X11R6/etc/X11/XF86Config
/usr/X11R6/lib/X11/XF86Config.
/usr/X11R6/lib/X11/XF86Config-4
/usr/X11R6/lib/X11/XF86Config
33.
You are having problems with a particular font and you want to see if its directoryis included in XF86Config. Which section contains this information?
Correct Answer
C. Files
Explanation
The files section consist of FontPath, RGBPath and ModulePath.
34.
What is the name of the X configuration tool that runs in textmode from the command line, and has a large number ofQuestions?
Correct Answer
xf86config
Explanation
xf86config - An older X configuration program with a text based interface. It also modifies the "/etc/X11/XF86Config" configuration file.
35.
What is the name of the X configuration tool that runs in a simplified X-likeenvironment?
Correct Answer
XF86Setup
Explanation
XF86Setup - A newer X configuration program with a GUI interface which modifies the "/etc/X11/XF86Config" configuration file.
36.
Which of the following lines from /etc/X11/XF86Config indicates what fonts can befound on a font server?
Correct Answer
C. FontPath "unix/:7100"
Explanation
In XF86Config FontPath "path" -
sets the search path for fonts. This path is a comma separated list of font path elements
which the X server searches for font databases. Multiple FontPath entries may be
specified, and they will be concatenated to build up the fontpath used by the server. Font
path elements may be either absolute directory paths, or a font server identifier. Font
server identifiers have the form: /:
where is the transport type to use to connect to the font server (e.g., unix for
UNIX-domain sockets or tcp for a TCP/IP connection), is the hostname of
the machine running the font server, and is the port number that the font
server is listening on (usually 7100).
37.
Type in the command that would start an application to check for colour depth ofan X window.
Correct Answer
xwininfo
Explanation
Xwininfo is a utility for displaying information about windows. Various information is displayed depending on which options are selected.
38.
What command will tell you the color depth of your display?
Correct Answer
A. Xwininfo
Explanation
Xwininfo is a utility for displaying information about windows. Various information is displayed depending on which options are selected.
39.
Which of the following best describes the order in which X Window files areexecuted or read ?
Correct Answer
A. Startx -> xinit -> xinitrc -> Xclients
Explanation
The correct order in which X Window files are executed or read is as follows: startx -> xinit -> xinitrc -> Xclients. This means that the startx command is executed first, followed by the xinit command, then the xinitrc file is read, and finally, the Xclients file is executed.
40.
Your system boots into a typical runlevel 3, so users generally use startx to get agraphical shell. What file can users modify in their home directory to determine thewindow manager started by startx?
Correct Answer
B. .Xclients
Explanation
Users can modify the ".Xclients" file in their home directory to determine the window manager started by startx. This file contains the commands that are executed when the startx command is run, and by modifying it, users can specify the window manager they want to use for their graphical shell.
41.
Which series of programs and scripts most closely defines a standard X WindowSystem startup process as executed from a character-mode console?
Correct Answer
D. Startx -> xinit -> xinitrc -> Xclients
Explanation
The correct answer is "startx -> xinit -> xinitrc -> Xclients". This series of programs and scripts represents the standard X Window System startup process from a character-mode console. The "startx" command is used to start the X server, which then calls "xinit" to initialize the X session. "xinitrc" is the script that is executed to set up the user's environment, and finally, "Xclients" is the script that starts the user's chosen window manager or desktop environment.
42.
What command line tool can be used to display the window attributes of an Xwindow. Type in the command line without flags or path.
Correct Answer
xwininfo
Explanation
Xwininfo is a utility for displaying information about windows.
Various information is displayed depending on which options are selected.
43.
You have booted a desktop Linux system and logged in. When you type "startx", amouse error occurs almost immediately. What's the most likely cause of theproblem?
Correct Answer
C. The wrong mouse protocol is selected
Explanation
for a normal PS/2 mouse you should use
"Protocol" "IMPS/2"
44.
What command can be used to cause changes to the inittab file to take effectwithout a system reboot?
Correct Answer
A. Init q
Explanation
To provide for an instantaneous response, the init Q or q command can wake up init to re-examine the /etc/inittab file.
45.
Type in the full path and name of the file that you would edit to change the defaultstartup runlevel of the system so that it starts an X session on bootup instead of atext mode session.
Correct Answer
/etc/inittab
Explanation
The file /etc/inittab is read by init process to control system behavior in particular runlevel.
46.
You want to have the process /etc/myprocess to run when the system enters runlevel 2. You want the system to wait until the process completes. Which of thefollowing inittab entries would accomplish this?
Correct Answer
A. 7:2:wait:/etc/myprocess
Explanation
The first entry is the label, the second is runlevel. Therefore you should choose A before B.
47.
You want to have the process /etc/myprocess run when the system enters run level 3.Which of the following inittab entries would accomplish this?
Correct Answer
A. 5:3:once:/etc/myprocess
Explanation
The first entry is the label, the second is runlevel. Therefore you should choose A before B.
48.
Do changes to the inittab file require a reboot in order to take effect?
Correct Answer
A. No
Explanation
No, you can wake up init to re-examine the inittab file.
49.
You have just set up the X Display Manager.What file is typically used as the primary configuration file for XDM?
Correct Answer
E. Xdm-config
Explanation
xdm-config defines the names and locations of the other configuration files and the basic access permissions.
50.
What file is used to configure the XDM daemon?
Correct Answer
A. Xdm-config
Explanation
xdm-config defines the names and locations of the other configuration files and the basic access permissions.