LPIC-2 Exam 201
Question No: 211 – (Topic 8)
You typed the following at the command line: ls -al /home/ hadden
What key strokes would you enter to remove the space between the ‘/’ and ‘hadden’
without having to retype the entire line?
Explanation: The Esc-b keystroke combination will move the curser back one word (to the start of the word ‘hadden’). The Del keystroke will delete the previous character; in this case, it will delete the space before the word ‘hadden’.
Reference: http://sseti.udg.es/marga/books/O#39;Reilly-The_Linux_Web_Server-CD- Bookshelfv1.0/linux_web/lnut/ch07_06.htm
A:The Ctrl-B keystroke will move the curser back one letter.
C:The Esc-Del keystroke will cut the previous word, for pasting later.
D:The Ctrl-b keystroke will move the curser back one letter. (Ctrl-b is the same as Ctrl-B).
Question No: 212 – (Topic 8)
For a change to the primary Samba configuration file smb.conf to take effect, it is necessary to:
Restart the smbd and nmbd processes.
Send a HUP signal to the smbd and nmbd processes.
Reboot the system.
Restart the Samba subsystem.
Explanation: Whenever you make changes to the smb.conf file, it is necessary to restart the smbd and nmbd processes. Smbd regularly reads the smb.conf file and implements any changes. However, these changes don’t affect any previously established connections. To apply the changes to any previously established connections, you must restart smbd and nmbd.
B:If you have Samba configured to be started by inetd, you could send inetd a HUP signal to restart it, but you wouldn’t send smbd and nmbd and HUP signal.
C:To apply the changes to any existing connections, it is necessary to restart smbd and nmbd.
D:Rebooting the system would work if you have configured samba to start automatically. However, restarting the entire system is unnecessary.
E:You should restart nmbd as well as smbd.
Question No: 213 – (Topic 8)
When setting up a client to log to a central logging server, you should:
Start the syslogd daemon on the server with all of the clients in its hostlist.
Add @servername to the appropriate log line in /etc/syslog.conf
Use the server as a DHCP server for the client.
Share the log file on the server using NFS.
None of the above.
Explanation: The file /etc/syslog.conf contains information used by the system log daemon, syslogd to forward a system message to appropriate log files and/or users. When forwarding messages to a remote logging server, you would specify the name of a remote host, prefixed with an @, as with: @server, which indicates that messages are to be
forwarded to the syslogd on the named host.
B:The syslogd daemon on the local machine needs to be configured to send messages to the remote logging server.
C:DHCP is unrelated to logging and is therefore not required.
D:The log file does not need to be shared using NFS.
E:You must edit the syslog.conf file; therefore, this answer is incorrect.
Question No: 214 CORRECT TEXT – (Topic 8)
You have to type your name and title frequently throughout the day and would like to decrease the number of key strokes you use to type this. Which one of your configuration files would you edit to bind this information to one of the function keys?
Explanation: The inputrc file is used to map keystrokes to text or commands. You can use this file to make a function key display your name and title. Other common uses include mapping a function key to lock your computer or run a command.
Note: Additional answer: ~/.inputrc (if asked after the full path)
Question No: 215 – (Topic 8)
What file in the /proc file system will show you the parameters passed to your kernel at boot time?
Explanation: The /proc/cmdline file contains parameters passed to the kernel at system boot time.
A:The kernel parameters are in the /proc/cmdline file, not the /proc/apm file. B:The kernel parameters are in the /proc/cmdline file, not the /proc/stat file. C:The kernel parameters are in the /proc/cmdline file, not the /proc/kmesg file.
D:The kernel parameters are in the /proc/cmdline file, not the /proc/sys/kernel/sysrq file.
Question No: 216 – (Topic 8)
You need to copy all the files and directories contained in the home directory to another location. What utility can you use for this?
Explanation: The ‘cp’ command is used to copy files or directories from one location to another. The -r option makes the command recursive which means it will copy and entire directory structure from one location to another.
A:The cpio command can be used to copy all the files into a single archive file at another location. However, it would be easier to copy the contents of the /home directory with the cp command. The cpio command is often used to create tape backups of Linux systems.
C:The ‘mv’ command is used to move files, not copy them.
D:The ‘mvdir’ command is used to move directories, not copy them.
Question No: 217 – (Topic 8)
The ‘user’ option in /etc/fstab allows a normal user to mount/unmount filesystems. When used on removable devices, this can allow unaudited applications to be made available on your system. For security reasons, you may wish to disable:
->The suid bit.
->Running of executables.
->Writing to the mounted filesystem.
Which of the following is a valid /etc/fstab entry which implements AT LEAST one of these features?
/dev/fd0 /mnt ext2 ro,user,noauto,noexec,nodev 0 0
/dev/cdrom /mnt iso9660 rw,user,nobin,nosuid,nodev 00
/dev/cdrom /mnt iso9660 ro|user|!dev|!suid|!bin 0 0
/dev/fd0 /mnt vfat rw user noexec nodev nosuid 0 0
/dev/cdrom /mnt auto ro|user|!auto
Explanation: The ‘ro’ option means read only. This means that the drive can only be mounted in read only mode and therefore, cannot be written to. The noexec option prevents the running of executable files.
B:The rw option will allow the drive to be mounted in read/write mode. The question states that writing to the filesystem should be disabled.
C:The options must be separated by commas. Therefore the syntax in this answer is incorrect.
D:The options must be separated by commas. Therefore the syntax in this answer is incorrect.
E:The options must be separated by commas. Therefore the syntax in this answer is incorrect.
Question No: 218 – (Topic 8)
Which process had the Process ID number 1?
Explanation: As with files, all processes that run on a GNU/Linux system are organized in the form of a tree. The root of this tree is init. Each process has a number (its PID, Process ID), together with the number of its parent process (PPID, Parent Process ID). The PID of init is 1, and so is its PPID: init is its own father.
A:Process ID number 1 represents init, not bash.
B:Process ID number 1 represents init, not the kernel. D:Init always has a process ID of 1. It does not vary. E:Init has a process ID of 1.
Question No: 219 – (Topic 8)
You are having problems with programs crashing on an SMP system, and would like to run your system in non-SMP mode for troubleshooting purposes. What is the correct parameter to pass to the kernel at boot time to force it to use a single CPU?
Explanation: The nosmp option can be used at boot time to disable SMP (symmetric multiprocessing), thus causing the system to run in uniprocessor (single processor) mode.
A:This in an incorrect option.
B:Cpucount=1 will run one processor, but the single processor will run in SMP mode. Cpucount=0 will run no processors in SMP mode effectively disabling SMP. C:Disable-cpu in an incorrect option.
E:enable_smp=no is an incorrect option.
Question No: 220 – (Topic 8)
You telnet into several of your servers simultaneously. During the day, you sometimes get
confused as to which telnet session is connected to which server.
Which of the following commands in your .profile would make it obvious to which server you are attached?
A. PS1=’\h: \wgt;’ B. PS1=’\s: \Wgt;’ C. PS1=’\!: \tgt;’ D. PS1=’\a: \ngt;’
Explanation: The PS1 environment variable controls the prompt on the command line, and can be used by users to tell what system they are on, the directory they are currently in, the current date and more depending on how this variable is configured. The \h option is used to specify the hostname and the \w option will give the full path of the current working directory.
|Lowest Price Guarantee||Yes||No||No|
|Free VCE Simulator||Yes||No||No|