以下是我在做題庫練習時覺得比較不熟悉的題目, 答案有些是自己實際試出來的, 大部份則是從 Google 搜尋得知. 如有錯誤敬請不吝指正, 謝謝! -- 101 ● What information is provided by the jobs-command? [ ] A list of all running processes started by you including PIDs [o] A list of all jobs started by the current shell including JobIDs [ ] A list of all jobs started by any of your shells including JobIDs [ ] A list of all jobs started by the current shell or it one of its parent shells including JobIDs [ ] A list of all jobs started by the current shell including PIDs ● What is a zombie-process? [ ] A hung process which refuses to accept keyboard input [o] A process which has already done its work but couldn't die due to other reasons [ ] A process without own terminal [ ] A process which isn't reachable by any signals [ ] A process which kills other processes ● You want to enable all of your users to use about 20 megabyte of diskspace in their home-directories and about 5 megabyte in /tmp. What action concerning the partitioning is necessary? [v] /home and /tmp each have to be on a own partition [ ] Use qfdisk instead of fdisk to create disk-quota partitions [ ] One partition for /home is enough. You can symlink /tmp to /home later [v] Every partition with userquotas have to have the file quota.user on their root [v] Every partition with userquotas need the entry usrquota in the options-field in /etc/fstab ● Most linux systems offer a display manager runlevel. What statement about this runlevel is true? [ ] X11 can be started using startx in this runlevel [ ] X11 can be started using xinit in this runlevel [ ] X11 is started automaticly for user root [o] X11 is started automaticly an offers a login window [ ] This runlevel has nothing to do with X11 ● You want to run a x-application on the computer foo but it should display on the screen of computer bar. What parameter for the application is needed to realize this? [ ] --display=bar [ ] -display:bar:0 [ ] -display bar [o] -display bar:0 [ ] -display=bar:0 ● You are working with vi, writing a textfile. Being in command mode, you want to move the cursor 7 lines down. Enter the necessary command Ans: 7j (上: k ; 下: j ; 左 : h ; 右 : l) ● You want to install a RPM packet file foobar.rpm on a debian system. What command would you use to convert the rpm-file into debian deb format? [o] alien --to-deb foobar.rpm [ ] rpmtodeb foobar.rpm [ ] rpm2deb foobar.rpm [ ] pcktconv --to-deb foobar.rpm [ ] pcktconv -o foobar.deb foobar.rpm ● What command changes tabs to spaces (just the command - no options)? Ans: expand ● How could you display all lines of text from the file foo which are not empty? [ ] grep ".*" foo [o] grep -v ^$ foo [ ] grep -v ^\r\n foo [ ] grep -v \r\n foo [ ] grep -v "[]" foo ● You want your users to be able to mount the CD-Rom on /dev/hdc. What is the right way to enable them? [ ] Change the file permissions of /dev/hdc so that all users can write to this file. [ ] Add the SUID-Bit to the /bin/mount command [ ] Add the appropriate usernames to /etc/mountusers [o] Add the entry "user,noauto" to the options of the filesystem in /etc/fstab [ ] Add the entry "may_mount(/dev/hdc)" into the users line inside /etc/passwd ● What program is used to tune the screen settings after installing X11? [ ] tuneX [o] xvidtune [ ] video [ ] vconfig [ ] vtune ● You want to connect a X11-Terminal to your Server. But everytime you try to connect, your terminal screen keeps black. What files on the server would you edit to solve the problem? [v] /etc/X11/XF86Config [ ] /etc/X11/xdm/x-terminals [v] /etc/X11/xdm/xdm-config [ ] /etc/X11/xdm/Xwilling [ ] /etc/X11/xdm/Xaccess ● You want to run an X-application on your local machine but it should display itself on the first display-server of foo. The command is "xapplication -display __________" (Don't use screennumbers) Ans: foo: (是這樣嗎...?) ● How could you get the physical SCSI address of /dev/sda ? [ ] Using the command scsi-info /dev/sda [o] Using the command scsi_info /dev/sda [ ] Using the command scsiinfo /dev/sda [ ] Using the command get_scsi_info /dev/sda [ ] Using the command lsscsi ● Which statements concerning the program gunzip are true? [v] After decompressing a file with gunzip, the compressed file is removed [ ] gunzip is a replacement for tar [ ] gunzip is a replacement for cpio [v] gunzip is just a link to gzip (gzip 和 gunzip 的 inode 值一樣) [v] gunzip is used to extract files from a zip archive ● Which of the following tools could be used to search a textfile for a particular searchstring without opening it with an interactive editor? [ ] vi [v] sed [ ] ed [v] grep [ ] find ● How could you generate a report of the user quota of /home? [o] repquota /home [ ] quotarep /home [ ] quota --report /home [ ] edquota /home [ ] quotaed /home ● What is a X-client [ ] a computer which uses the X11 Protocol to communicate [ ] a computer which uses a super-computer to run applications which are displayed on the local screen [ ] a program which is dispayed on a graphical screen of an X Server [o] a computer which offers displaying on its screen [ ] a computer with a graphical user interface using X11 ● Which of the following programs are valid display managers for X11? [ ] xdisplaymanager [v] xdm [ ] gtkm [v] gdm [v] kdm [ ] fdm ● You want to compile and install a GNU software package, but you want to change the default installation target. Which file would you edit? [ ] config.h [ ] targets [ ] configure [o] Makefile [ ] .config ● What command is used to reconfigure a formerly installed debian packet. Enter just the name without path and options. Ans: dpkg-reconfigure ● How could you try to stop a hung process which refuses to accept keyboard input? [v] Ctrl-C [ ] Ctrl-S [v] kill -9 PID [v] kill PID [ ] ipcsend SIGKILL PID ● Which statements concerning the tool renice are true? [v] A normal user may only change the nice values of his own processes. [ ] A normal user can decrease the nice value of his own processes. [v] Once a nice value is increased, a normal user may not decrease it, even if it is his own process. [v] root can change the nice-values of all processes of one user with a single command. [ ] renice allows a normal user to fasten his processes. ● After an awful lot of work checking filesystem integrity in single user mode, you change back again to multi user mode. What single command could you use to mount all partitions at the right places? (Use the command and options) Ans: mount -a ● Which flag would you use with setserial to enable 115 KBit for a serial port? [ ] spd_hi [o] spd_vhi [ ] spd_shi [ ] spd_warp [ ] spd_115 ● Which command would you use to check the signature of a rpm packet? [ ] rpm --pgpcheck filename [ ] rpm -c filename [ ] rpmcheck filename [o] rpm --checksig filename [ ] rpm -q --checksig filename ● The user foo has reported problems creating files in his home directory. He has got a user quota of 40 megabyte but a quick check of his directory shows only 20 megabyte in use. What may be the reason? [ ] He has hidden 60 megabytes inside a hush directory. [ ] The quota file is corrupt [ ] Quotas are counted in 512-blocks. So he has really only 20 megabyte quota [o] He has probably many small files and his file limit is exceeded [ ] He has too many symbolic links to big files ● User Bertha is member of different groups. How could you ensure, that her default group is foobar? [ ] Add the line "chgrp foobar" inside her startup script [ ] Ensure that the groupname foobar is the first entry in her /etc/group line [o] Ensure that the GID of foobar is placed in her /etc/passwd entry [ ] Ensure that the GID of foobar is the lowest GID of all her GIDs [ ] Ensure that the GID of foobar is the highest GID of all her GIDs ● You want to configure an X11 server. For that purpose you have to enter various information about your hardware. Which informations are necessary to configure the server? [ ] mouse [v] keyboard [ ] network adapter [v] monitor [ ] printer ● Which of these things is not done when using the command rpm -Va? [ ] Computes an MD5 checksum and verifies against the package [ ] Verifies the permissions and file owner [ ] Prints all discrepancies [o] Lists the files matching their package specifications -- 102 ● Which file is used by modprobe to get the information, what kernel module is needed by a particular other kernel module? [ ] /etc/modules.dep [ ] /etc/modules.conf [o] /lib/modules/$(uname -r)/modules.dep [ ] /lib/modules/$(uname -r)/modules.conf [ ] /lib/modules/$(uname -r)/modules.needed ● After compiling a new kernel on a PentiumII System, where will you find the new kernel file? [ ] /usr/src/linux [ ] /usr/src/linux/kernel [o] /usr/src/linux/arch/i386/boot [ ] /usr/src/linux/arch/i486/boot [ ] /usr/src/linux/arch/i586/boot ● 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? [ ] ft= [ ] fl= [ ] ft= [o] if= [ ] |= ● What kind of information do you find in the manual section 5 ? [ ] about games [ ] about macro packages and conventions [ ] about system administration commands (usually only for root) [o] about file formats and conventions eg /etc/passwd [ ] library calls (functions within system libraries) ● 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 -e foobar [ ] test -r foobar [ ] test -b foobar [ ] test -o foobar [o] test -O foobar ● The group foo has a password. Who needs to know this password? [ ] Any user who is member of the group foo [ ] Any user who is member of the group foo but foo isn't his primary group [ ] Any user who is member of the group foo and wants to change his primary group to foo [v] Any user who is not member of the group foo but wants permission to a file belonging to this group [ ] Any user who wants permission to a file belonging to this group ● The file /etc/syslog.conf contains the following line: *.=crit /var/log/warn What is the result of this setting? [o] All messages of all facilities with priority "crit" are written into the file /var/log/warn [ ] All messages of all facilities with priority "crit" or any higher priority are written into the file /var/log/warn [ ] The syslog daemon reads its rules for all facilities with priority "crit" out of the file /var/log/warn [ ] The syslog daemon reads its rules for all facilities with priority "crit" or any higher priority out of the file /var/log/warn [ ] The file /var/log/warn contains a list of all errors which are defined as critical ● The dotted quad netmask 255.255.255.224 is in CIDR notation [ ] /25 [ ] /26 [o] /27 [ ] /28 [ ] /29 ● You get the IP-address 191.123.234.168/29 from your ISP. What is your network address in dotted quad? Ans:191.123.234.168 ● What program can be used to establish a ppp connection? [ ] ppp-up [ ] ppp-connect [ ] ppp-dial [o] wvdial [ ] dial ● What is the configuration file for inetd? [ ] ~/.inetd.conf [ ] ~/.inetdrc [ ] /etc/inetdrc [o] /etc/inetd.conf [ ] /etc/inetd.options ● What are criteria, used by ipchains or iptables, to determine if a packet may pass or not? [v] portnumber [ ] usename [ ] uid [v] SYN flag [v] protocol ● Which of the following is not a valid lpc command? [ ] stop [ ] up [ ] enable [o] remove ● What printcap definition variable would you use to make sure a page of user idendification information is not printed before each print? [ ] mx [ ] rm [o] sh [ ] of ● What do you type when invoking the print daemon if you want it to log information? [ ] lpd- L [ ] pd lf /loglocation [ ] lpd -log [o] lpd -l ● Which of the following is not a valid variable to define in a /etc/printcap statement? [ ] of ( 設定 output filter 過濾程式, 用於列印標題 (banner) ) [ ] if ( 設定 filter 過濾程式, 這個 shell script 會修正一些字元格式, 使印表機輸出格式正常 ) [o] lq [ ] lp ( 設定印表機連接埠 ) ● What type of /etc/printcap item would you use to define which script or program all jobs going to a specific printer should pass through first? [ ] lf [ ] lp [o] if [ ] mx [ ] sd ● Which command would you use to disable a printer? [ ] lpr [ ] lpq [o] lpc [ ] lprm [ ] lpx ● What files and directories do you need to create for an InkJet printer to function properly? Choose two. [v] /var/spool/lpd/ij [ ] /etc/printcap.ij [v] /var/spool/lpd/ij/log [ ] /home/printer [ ] /var/spool/lpd/ij/files/ ● What groups should the printer directories and files belong to? [ ] root [v] daemon [ ] print [ ] user [v] lp ● How to use shutdown command to run fsck command forcely in next booting? Ans: shutdown -F ● What actions can be configured in the logrotate configuration file? [v] Mail old logs to a given address before deleting them [v] Compress rotated logfiles [ ] Keep an amount of old messages in the newly generated logfile [v] Move rotated logs to a different location [ ] Send a mail to root after every rotating ● You have written a shellscript in /usr/local/bin/myscript. The script is executable by all users. But every time when you start it, the following error occurs: bash: myscript: No such file or directory. What is likely to be the reason? [ ] The /usr/local/bin directory is not in the PATH variable [ ] You don't have read permission to myscript [ ] Shellscripts are not binaries, so don't place them in a bin directory [o] You made a mistake (typo) in the #!/bin/bash line [ ] You have to compile the script ● You are printing a file via lpr. Which parameter do you use to add a title page? [o] -t [ ] -h [ ] -j [ ] -T [ ] --title ● The command lilo has to be run [ ] once a day (using cron) [ ] after every login [ ] after a new kernelmodule has been installed [v] after a new kernel has been installed [v] after changing the messagefile /boot/message ● You can give options to the kernel [v] using the append-command in /etc/lilo.conf [ ] using the options-command in /etc/lilo.conf [v] appending the options to the kernel name while using the bootmanager [ ] using the chopt command while running the system [ ] writing the desired options to /proc/kernel