2007年12月22日 星期六

LPIC Level 1 102 考古題

以下是我在準備LPIC 102時上 http://www.linux-praxis.de/lpisim 考的題目。
我把它留下來當考古題用。
基本上,這個網站若是你可以考到80分上下,我覺得實力就算是可以了。
但是千萬不要以為這裡的題目可以用來「背多分』的話,那可就大錯特錯了。
由於LPIC考的範圍廣,觀念的題目我認為比較重要。

考題的答案,我會陸續補上來.
並加上我的一些見解.

Question1/33
What command will remove a loaded kernel module?
Choose the best answer.
a.delmod
b.modrm
c.modkill
d.rmmod (v)
e.depmod

Question2/33
Which file is used by modprobe to get the information, what kernel module is
needed by a particular other kernel module?
Choose the best answer.
a./etc/modules.dep
b./etc/modules.conf
c./lib/modules/$(uname-r)/modules.dep (v)
d./lib/modules/$(uname-r)/modules.conf
e./lib/modules/$(uname-r)/modules.needed

Question3/33
You want to built a new kernel from your own. After installing the kernel
sources the next step is to configure the kernel. What command inside the
kernel directory can you use to configure the kernel?
Choose every correct answer.
a.make config (v)
b../configure
c.make menuconfig (v)
d.make xconfig (v)
e.make configure

Question4/33
What command can you use to read the boot messages of the kernel?
Choose the best answer.
a.read boot
b.cat /var/log/kernellog
c.kmem
d.dmesg (v)
e.kmesg

Question5/33
You want to activate graphical login on your Linux box so everybody can use
a secure X11. What can you do to start this service immediatly?
Choose the best answer.

a.Switch to the displaymanager runlevel (v)
b.Start the klogin program
c.Start the xlogin program
d.Start the xdm program
e.Enter the number of the displaymanager runlevel in the entry of the default runlevel in /etc/inittab.

Question6/33
Which command will you use to look at the print queues?
Choose the best answer.

a.lpd
b.lpr
c.lpq (v)
d.qpd
e.lpic

Question7/33
You are printing with lpr. Which parameter do you use to select a particular
printer?
Choose the best answer.

a.-p
b.-P (v)
c.--printer
d.-q
e.-Q

Question8/33
How can you get informations about all manpages concerning a command named
foo?
Choose the best answer.

a.apropos foo (v)
b.whatis foo
c.man foo
d.list foo
e.which foo

Question9/33
Which file is displayed directly after logging in on a text console?
Choose the best answer.

a./etc/issue
b./etc/login.txt
c./etc/motd (v)
d./etc/messg
e./etc/welcome

Question10/33
You've defined an enviroment variable FOO with the content "bar" and now you
want to start a new shell typing "bash". What of the following is neccesary
to ensure, that the variable FOO has its content "bar" also in the new
shell?
Choose the best answer.

a.Nothing,the content of a variable is automaticly inherited to the later shells.
b.You have to open the shell with a leading dot (. bash)
c.You have to type the command "export FOO" before you start the new shell. (v)
d.It is impossible to have the same variable in different shells.
e.You have to type the command "import FOO" after you've started the new shell.

Question11/33
Which files in the users home directory are read by a login shell (bash)?
Choose every correct answer.

a.~/.bash_profile (v)
b.~/.bashrc (v)
c.~/.bash_login (v)
d.~/.profile
e.~/.bash.profile

Question12/33
Writing a shellscript you want to check if the file foobar exists and is
readable by the user who runs the script. Which of
the following test commands will check this?
Choose the best answer.

a.test -e foobar
b.test -X foobar
c.test -r foobar (v)
d.test -b foobar
e.test -f foobar

Question13/33
User foo has left our company and you want to remove his account and all his
files in his homedirectory. Which of the following commands will do this?
Choose the best answer.

a.rm -rf /home/foo
b.userdel -r foo (v)
c.killuser foo
d.deluser -r foo
e.kill -HOME foo

Question14/33
What command can you use to remove an existing group named foo?
Choosethe best answer.

a.rmgrp foo
b.delgrp foo
c.delgroup foo
d.remove --group=foo
e.groupdel foo (v)

Question15/33
What program converts old /etc/passwd files to shadow password
system?(just the name without path and options)
Type the answer.

pwconv

Question16/33
You want all messages from the kernel with a priority of "warn" or higher
to be displayed on your 10th virtual terminal. What line in /etc/syslog.conf
guarantees this?
Choose the best answer.

a.kernel.warn /dev/tty10
b.kernel.=warn /dev/tty10
c.kern.warn /dev/tty10 (v)
d.kern.=warn /dev/tty10
e.kern.warn /dev/tty9

Question17/33
What program can be used to guarantee that logfiles do not grow
indefinitely?
Choose the best answer.

a.logrotate (v)
b.logcheck
c.logger
d.syslogd
e.loglimit

Question18/33
What is the difference between cron and anacron?
Choose the best answer.

a.anacron is an old (anachronistic) version of cron
b.cron jobsget lost if the computer isn't running at the given time, anacron jobs don't get lost. (v)
c.cron can only be used by root, anacron can be used by every user
d.anacron can only be used by root, cron can be used by every user
e.there is no difference

Question19/33
The command ___________ -e will open an editor where you can add new cron jobs.
Type the answer.

crontab

Question20/33
You want to make a full backup of the /home directory with cpio. It shall be
stored in the file /var/backup.home.
What is the proper command?
Choose the best answer.

a.find /home | cpio -o > /var/backup.home (v)
b.cpio -if=/home -of=/var/backup.home
c.cpio -f /var/backup.home /home/*
d.cpio -Rf /var/backup.home /home/*
e.cpio -rf /var/backup.home /home/*

Question21/33
What is the effect of the command "date +%M" ?
Choose the best answer.

a.The system time (only minutes) is adjusted using the cmos clock.
b.The current month is written to stdout
c.The current time (only minutes) is written to stdout (v)
d.The system time is adjusted plus one minute.
e.The system date is adjusted plus one month.

Question22/33
Which service works usually on port 22 ?
Choose the best answer.

a.ftp
b.ssh (v)
c.telnet
d.smtp
e.dns

Question23/33
What is the dotted quad address of the localnet?
Type the answer.

127.0.0.0/8

Question24/33
The dotted quad netmask 255.255.255.192 is in CIDR notation
Choosethe best answer.

a./25
b./26 (v)
c./27
d./28
e./29

Question25/33
You get the IP-address 191.123.234.168/29 from your ISP. What is your
network address in dotted quad?
Type the answer.

191.123.234.168


Question26/33
What command is used to set the default route?
Choose the best answer.

a.route (v)
b.setroute
c.gw
d.gateway
e.setgw

Question 27/33
What command is run by pppd after a connection was brought down?
Choose the best answer.

a.ppp-down
b.ip-down (v)
c.ppp-disconnect
d.ppp-offline
e.pppdown

Question 28/33
You want to restrict access to your services, so that only hosts from your
local network 192.168.1.0 can use them. What entries in /etc/hosts.allow and
/etc/hosts.deny will you use?
Choose the best answer.

a."ALL:192.168.1.0" in hosts.allow and "ALL:ALL BUT 192.168.1.0" in hosts.deny (v)
b."ALL:192.168.1." in hosts.allow and "ALL:ALL" in hosts.deny
c."ALL:192.168.1." in hosts.allow and "ALL: NONLOCAL" in hosts.deny
d."ALL:ALL" in hosts.allow and "ALL:LOCAL" in hosts.deny
e."ALL:LOCAL" in hosts.allow and an empty hosts.deny

Question29/33
What is the central configuration file for sendmail?
Choos ethe best answer.

a./etc/sendmail.conf
b./etc/mail/sendmail.conf
c./etc/sendmail.cf (v)
d./etc/mail.co
e./etc/sendmail.co

Question30/33
In what file do you declare, what host may use what directory of our
local linux box using nfs?
Choose the best answer.

a./etc/nfs.conf
b./etc/nfsd.conf
c./etc/nfsexports
d./etc/exports (v)
e./etc/hosts.allow

Question31/33
What is the main configuration file of a BIND8 nameserver?
(just the name without path)
Type the answer.

named.conf

Question32/33
What are the default tables of iptables?
Choose the best answer.

a.input output and forward
a.accept,deny and reject
a.filter,nat and mangle (v)
a.postrouting and prerouting

Question33/33
If the file /etc/nologin exists, no user can login into your system. But
what happens with already logged in users if you create this file?
Choose the best answer.

a.they are automatically logged out
b.they receive a message on their screens that they should log out
c.nothing (v)

沒有留言:

搜尋此網誌

本站大事記

這個部落格(網站)內容以分享LINUX和延伸出的技術文章為主!
特別是為了工作和進修需要,搜集了不少網站連結。
希望對來這裡觀文的朋友們,有提供一些有用的資訊或文章。
但這裡的文章中,也包含個人的心情扎記和隨興言談……
若是當中沒有對上你的口味,請多包涵!

原「琳娜絲與希斯寇的邂逅」,改名為「愛上琳娜絲」!

原「琳娜絲與希斯寇的邂逅」,改名為「愛上琳娜絲」!
--原序文--
就是當LINUX遇上CISCO啦!他們的結合還能作什麼事…不就是讓這個世界的網路,串…串起來啊…不然你們那能上這網站看部落格!