Linux防健忘日誌No.59-LPIC LEVEL-1_101-102筆記&102考試難題
2012/3/10下午我終於把這張糾纏我長達5年的證照考到手了
這張從高一就說要考,拖到大二…也算是我人生中一樁傳奇了XD
反而是從去年8月底開始準備101,10月中旬考
接著休息了3個月,今年1月才開始準備102,花了兩個月的時間,3/10終於考102
拿取LPIC LEVEL1證照…
其實之前就要釋出筆記了,不過因為還沒去考就釋出筆記感覺沒什麼公信力
所以決定考完再釋出…
各位可以自行去抓檔案,有兩個檔案
一個是LPI 101的筆記檔,裡面都是重點,幾乎70%覆蓋率(但之前沒想到筆記要整理好,所以排版凌亂…)
另外是LPI 102的筆記擋,我考LPI 102的時候比較偏向狂讀題庫,這是不良示範,不過我已經有蠻深厚的LINUX基礎所以可以這樣搞…(這也是我前前後後只花了不到4個月就考到這張的原因)
所以筆記比較偏向較難較冷門的題目,我是搭配TestKing 107-102 第29版的題庫看的,題庫的PDF我不方便放在這裡,請自行去GOOGLE
另外一個則是在德國的LPI模擬測驗網站所遇到的102難題解析,我也會直接PO到此文章,讓大家GOOGLE比較好G到
第一次是看書融會貫通觀念,加上操作LINUX多年經驗…基礎指令其實不成問題,只是因為考試的緣故
還是需要讀…才知道大概會考什麼樣子,怎麼考
102則是比較偏向服務類型,如果像我不是搞網管為興趣的,可能就要讀一下了解一下
考古題真的很重要,101考古題看不夠多,但觀念很清楚所以還是有過
102則是一開始準備就看了上千題的考古題,加上觀念理解,所以很好考…102題目60題,可說是一半都是考古,20%是新題目
Anyway, 我考證照是好玩為了證明有能力的…希望大家也是這樣去考
要不然Level1普通人把考古題被到爛掉去考也是過,但這樣意義實在不大
至於未來要不要考Level2…應該還是會去考,畢竟Level2的等級才能測出真材實料
101筆記:https://docs.google.com/document/d/1_HGYKnDDhAVnVVGq7mQbpJ1qXl6uLlocLvkfMsnUvk8/edit
102筆記:https://docs.google.com/document/d/1VbnrVvGDp3EhyXtdH934e2jIBiTdqAGGd_vahTKKhiQ/edit
102測驗:https://docs.google.com/document/d/1xCEHr6hdedhxDr8lJ2vLDJnTLKMxTL76FSTg9LHz2ow/edit
如果有筆記或者測驗解析有錯誤,請留言告知~~~^^
You are printing a file via lpr. Which parameter do you use to add a title page?
lpr -T
Writing a shellscript you want to check if the file foobar exists and is
owned by the user who runs the script. Which of
the following test commands will check this?
test -O foobar
Your network has a network address of 172.16.170.0/23. What is your
broadcast address?
172.16.171.255
You want to read the default route of a linux box. What commands can you
use?
route -n
route
netstat -r
What is CHAP ?
a method to authenticate a ppp client
What files are used by tcp-wrappers?
/etc/hosts.allow and /etc/hosts.deny
How can you assign the result of the calculation 5 + 4 to the enviroment
variable SUM in the bash shell?
let SUM=5+4
Writing a shellscript you want to check if the file foobar exists and is
writable by the user who runs the script. Which of
the following test commands will check this?
test -e foobar
Which criteria can be used in the logrotate configuration file to determine
when a logfile should be rotated?
daily rotating
weekly rotating
monthly rotating
What program can be used to restore a backup made by dump?
restore
You get the IP-address 191.123.234.168/29 from your ISP. What is your
network address in dotted quad?
You want to install apache as your webserver. But you are not happy with the
default setting for the directory where the HTML files are stored. What
directive in the configuration file can you use to change this setting?
DocumentRoot
What command will you use to submit a printjob to a remote printer on a
windows machine?
smbclient
You noticed that at particular times every day the system load is very high.
You assume there are cronjobs, scheduled by users, which are the reason.
What command can you use to verify your suspicion?
crontab -u username -l
What is the meaning of backup level 0 with dump
This is a full backup
Which service works usually on port 139 ?
netbios-ssn
Yoe define an alias in your shell. If you open another shell by typing bash,
what happens to the alias?
Aliases are never exported, you have to define it again or define it in a file which is read by the no-login shell
Which shell do you use for a POP3 only account on your system?
/bin/false
How can you describe the following command?
tail -f /var/log/messages
It displays every new line of the file /var/log/messages while this file is growing
What is the name of the configuration file of the ssh daemon?
sshd_config
You want to print text files with a postscript printer. Which of the
following programs can you use to convert textfiles to postscript?
a2ps
ghostscript
What does the following line in /etc/fstab mean?
foo:/bar /foobar nfs defaults 0 0
不行這樣子
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?
nothing.
What is the meaning of the MANPATH variable?
It stores a list of all directories which contain manpages.
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?
You have to type the command “export FOO” before you start the new shell.
The group foo should get an own administrator, so that you as the root user
are not forced to add the new group members. The group administrator is the
user bar, who already is member of foo. He should be able to add and remove
group members. What command can you use for that purpose?
gpasswd -A bar foo
What format uses the file /etc/passwd ?
Username:Password:UID:GID:Comment:Homedir:Shell
The file /etc/syslog.conf contains the following line:
*.=crit /var/log/warn
What is the result of this setting?
All messages of all facilities with priority “crit” are written into the file /var/log/warn
What is the main configuration file of a BIND8 nameserver?
(just the name without path)
Type the answer.
named.conf
After installing a new package which contains manpages, the man command does
not find the new pages. What is most likely the reason?
The MANPATH variable isn’t set
Which service works usually on port 161 ?
snmp
You get the IP-address 191.123.234.168/29 from your ISP. What are
valid host addresse in your network?
191.123.234.169
191.123.234.172
IPv4 共 32 bits, /29 表示 Submask 從左至右有29個 “1”, 不過題目是問你, 和
191.123.234.168/29 同網段的 “有效IP”, 你想想, 有 29 個 1, 還剩幾個 “0” ?
3 個 191″0″ 對吧, 也就代表 2^3 =8 為一個網段間距, ISP 給你 168 這段, 這段的範圍從 191.123.234.168~191.123.234.175 ; 其中 168 和 175要扣除,
所以只有 169~174 這些是 “有效 IP” …
/29 是 CIDR Notation
/255.255.255.248 是 Classful Notation
What are legal actions used by the -j flag of ipchains?
ACCEPT, DROP and REJECT
You get an error message, concerning the USB, every time you boot your system.
Your system works perfectly exept USB. Now you want to get information from
a Linux guru named bob@foo.bar.org. He asks you to send him the boot
messages via email. How could you send him the necessary
boot-information of your system?
dmesg | mail bob@foo.bar.org或者
mail bob@foo.bar.org < /var/log/dmesg
What actions can be configured in the logrotate configuration file?
■ Mail old logs to a given address before deleting them
■ Compress rotated logfiles
□ Keep an amount of old messages in the newly generated logfile
■ Move rotated logs to a different location
□ Send a mail to root after every rotating
可將要移除掉的舊檔寄出
可進行壓縮
不會保持一定數量的舊資訊在新產生的檔案
可將日誌擺在其他位置
不會在循環時寄信給root
What is the valid entry in /etc/sendmail.cf to declare mail.example.com as
our smarthost?
DSmail.example.com
What is the command to built a new manpage index database?
mandb
Which files in the users home directory are read by a login shell (bash)?
~/.bash_profile
~/.bashrc
~/.bash_login
User Bob Foo has the username “bob”. But our company has a new employee
named Bob Bar. So we decide to give them usernames of bobf and bobb. What
command is used to change bobs old username “bob” to “bobf”?
usermod -u bobf bob
Your company has a backup plan which consists in three levels. Once a month
a full backup is made (level 0), once a week a incremental backup is made
(level 1) and every evening an other incremental backup is made (level 2).
After a headcrash of your harddisk, in which order will you restore the
three Backups?
level 0, then level 1, then level 2
搞清楚完整備份差異備份遞增備份的定義就可以了,答案是2,但還原順序取決於你的備份方式,與備份檔大小無關
You have to add some additional kernel parameters for a scsi hostadapter
which is hardcoded into the kernel. Where can you enter the parameters so
that the kernel knows them during boot?
in the file /etc/lilo.conf using the append=… directive
at the boot prompt
You have just loaded a new version of the kernel source and installed it
into /usr/src/kernelnew. In /usr/src/kernelold are the
sources of your old kernel. Before configuring the new kernel you want to get as much
configuration information as possible from the old kernel to the new one.
What file will you copy from kernelold to kernelnew to archieve this?
Choose the best answer.
a.Makefile
You want to change the default runlevel of your system, so that the
X-Display Manager is startet after booting. Which file do you have to edit?
/etc/inittab
Which command is used to remove spooled print jobs? (Enter just the command,
no path and options)
lprm
Which statement about the following line is true?
[ -x /usr/sbin/daemon ] && /usr/sbin/daemon
This isn’t a valid command
What file stores the complete Samba configuration (just the filename, no
path)?
smb.conf
What is the result of the following command?
init S
The system switches to single user mode.
You want to fetch the current time via NTP from ntpserver.example.com. But
if you call “ntpdate ntpserver.example.com” you get the message
“ntpdate[3209]: the NTP socket is in use, exiting” – what is most likely the
reason?
a ntpd is running on the local computer
Which service works usually on port 119 ?
nntp
How can you mount a NFS share?
use mount hostname:/absolute/path target
What is the difference between cron and anacron?
cronjobs get lost if the computer isn’t running at the given time, anacron jobs don’t get lost.
What option do you need in your ppp options file to ensure, that a
connection is automatically restored after it was broken?
persist ??
Neither your /etc/hosts allow nor your /etc/hosts.deny file has an entry for
the service ftp. (There are no wildcards used either) What statement is right?
How can you assign the content of the enviroment variable PATH to the
enviroment variable MYPATH in the bash shell?
MYPATH=$PATH
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?
kernel.warn /dev/tty10
You want to send a printjob through a filter before it is send to the
printer. What is the necessary entry in the printcap file?
if=
You created a new user bob, using the command “useradd bob”. After that you
gave bob an empty password, using “passwd bob”. Finaly you created bobs home
directory using “mkdir /home/bob”. But now bob calls and tells
you, he can’t log in. What is the reason?
the password of a new user may not be empty
101筆記還可以提供嗎?