1st Linux Install Party in Tunisia
7 Avril 2004 INSAT
http://www.insatech.net/installparty
contact@insatech.net libertysoft@insat.net
______________________________________
Test de connaissance sur GNU/Linux
______________________________________
01) What option is used with the useradd command to specify the user's home directory?
A. -d
B. -h
C. -u
D. -a
Answer: A
02) What switch is used with the usermod command to change a user's secondary groups?
A. -G
B. -group
C. -d
D. -U
Answer: A
03) Do changes to the inittab file require a reboot in order to take effect?
A. No
B. Yes
Answer: A
04) You want to repeat the last command you entered. How would you do this?
A. #
B. !!
C. !l
D. ##
Answer: B
05) Which of the following are required in the /etc/passwd file when creating a user account?
A. login name
B. userid
C. default group
D. password age
E. minimum password length
Answer: A, B, C
06) What command be used to find the systems previous run level?
A. runlevel
B. level
C. rlevel previous
D. show level previous
Answer: A
07) What syslog.conf facility represents user authentication processes?
A. auth
B. proc
C. user
D. login
Answer: A
08) What syslog.conf facility represents the cron daemon?
A. crond
B. daemon
C. cron
D. crontab
Answer: C
09) You want to view a listing of previously entered commands. What command would you use?
A. hist
B. histfile
C. showbuff
D. history
Answer: D
10) You want to uninstall lilo. Which of the following would you do to accomplish this?
A. lilo -u
B. remove lilo
C. uninstall lilo
D. lilo -r
Answer: A
11) Linux is a(n) _________ operating system, meaning the source code is freely available.
A. Open sourced
B. User licensed
C. Closed source
D. Open binary
Answer: A
12) 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?
A. 5:3:once:/etc/myprocess
B. 3:4:once:/etc/myprocess
C. once:3:4:/etc/myprocess
D. once:5:3:/etc/myprocess
Answer: A
13) What command can be used to print out system boot messages?
A. bootm
B. bmsg
C. messages
D. dmesg
Answer: D
14) Which of the following commands can be used to extract a tar file?
A. tar -vf
B. tar -xvf
C. tar -e
D. tar -v
Answer: B
15) You want to find the full path of a certain command. How would you do this?
A. By using the 'where' command
B. By using the 'path' command
C. By using the 'which' command
Answer: C
16) You want to find out what files are contained in a tar file. How would you do this?
A. Use the tar command with the -t switch
B. Use the tar command with the -r switch
C. Use the grep command
D. Use the find command
Answer: A
17) Which harddisks should be used in LBA-mode?
A. Harddisks with more than 1024 cylinders
B. Harddisks with more than 1.2 GByte
C. Harddisks capable of UDMA66
D. IDE-harddisks which are used as master
E. IDE-harddisks which are used as slave
ANSWER: A
18) Which of the following directories have to be placed on the root partition?
A. /usr
B. /boot
C. /lib
D. /sbin
E. /dev
ANSWER: D, E
19) You are the system administrator of a RedHat box. After checking your "system, you found a file named foobar. What command would you use to get the " information from which rpm packet this file was installed?
A. rpm -qf foobar
B. rpm -f foobar
C. rpm -l foobar
D. rpm -ql foobar
E. rpm -qL foobar
ANSWER: A
20) How would you describe the following commandline? foo || bar
A. The command foo redirect its output to the command bar.
B. The command foo writes its output into the file bar.
C. The command bar is only processed if the command foo leaves without error.
D. The command bar is only processed if the command foo leaves with an error.
E. This isn't a valid commandline
ANSWER: C
21) Which of the following commands could be used to search for a particular term inside a textfile without opening the file?
A. grep
B. vi
C. ex
D. less
E. sed
ANSWER: A, E
22) How could you check the integrity of a non mounted filesystem /dev/hdb7 even if it has a valid cleanflag? Choose the best answer.
A. chkdsk /dev/hdb7 (DOS command)
B. fsck /dev/hdb7
C. hdcheck --force /dev/hdb7
D. fsck -f /dev/hdb7
E. fschk -f /dev/hdb7
ANSWER: B
23) You want your users to be able to mount the CD-Rom on /dev/hdc. What is the right way to enable them?
A. Change the file permissions of /dev/hdc so all users can write to file.
B. Add the SUID-Bit to the /bin/mount command
C. Add the appropriate usernames to /etc/mountusers .
D. Add the entry "user,noauto"to the options of the filesystem in /etc/fstab.
E. Add the entry "may_mount(/dev/hdc)" into the users line inside /etc/passwd "
ANSWER: D
24) How could you generate a report of the user quota of /home?
A. repquota /home
B. quotarep /home
C. quota --report /home
D. edquota /home
E. quotaed /home
ANSWER: A
25) 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?
A. keyboard
B. harddisk
C. grapic adapter
D. monitor
E. printer
ANSWER: A,C,D
26) What command would send the output of cmd1 to the input of cmd2?
A. cmd1 | cmd2
B. cmd1 || cmd2
C. cmd1 && cmd2
D. cmd1 ; cmd2
E. cmd1 cmd2
ANSWER: A
27) In which file might you find the following entry: root:x:0:0::/root:/bin/bash?
A. /etc/passwd
B. /etc/help/httpd.conf
C. /root
D. /etc/www/error/index.html
E. /usr/passwd
ANSWER: A
28) Which command is used to change settings on IDE hard disk drives?
A. hdparm
B. hddparm
C. diskparm
D. hdparam
E. ideconfig
ANSWER: A
29) Your logfile shows repeated connections to TCP port 143. Which named service is being accessed?
A. imap
B. smbd
C. nmbd
D. pop2
E. smtp
ANSWER: A
30) How can you detect, which PCI devices are connected to your computer?
A. Using the readpci command
B. Using the lspci command
C. Using the getpci command
D. Using the pci_info command
E. Using the file /proc/pci
ANSWER: B
31) Your IP address is 10.0.0.2 and your subnet mask is 255.255.255.0. You have one ethernet card. You want to set your default gateway to be 10.0.0.1. Which of the following is the correct syntax to accomplish this?
A. route add default 10.0.0.1 eth0
B. route add default gw 10.0.0.1 dev eth0
C. route add default gw 10.0.0.2 eth0 255.255.255.0
D. route add default gw 10.0.0.2 /dev/eth0 255.255.255.0
E. route add default gw 10.0.0.2 255.255.255.0
ANSWER : C
32) Which of the following is a valid entry in /etc/fstab for a remote NFS mount from server fs1?
A. fs1:/proc /mnt/fs1 nfs defaults 9 9
B. /mnt/fs1 fs1:/proc nfs defaults 0 0
C. fs1:/home /mnt/fs1 nfs defaults 0 0
D. /mnt/fs1 fs1:/home nfs defaults 0 0
E. /home:fs1 /mnt/fs1 nfs defaults 0 0
ANSWER : C
33) When running a text-mode FTP client, which command retrieves multiple files?
A. get *.txt
B. retrieve *.txt
C. mget *.txt
D. mretrieve *.txt
E. get -m *.txt
ANSWER : C
34) Which command will display information about Ethernet interface eth0 ?
A. cat /proc/eth/0
B. ifconfig eth0
C. ipconfig eth0
D. ipconfig /dev/eth0
E. cat /etc/eth0.conf
ANSWER : B
35) You have Linux installed on a machine and you use LILO as your boot loader. How do you boot into single user mode?
A. Wait for the machine to boot up then log in as root. Use the init 2 command.
B. At the LILO prompt use the linux single command.
C. At the LILO prompt use the linux 1 command.
D. At the LILO prompt use the linux command.
E. Linux only supports multi-user mode.
ANSWER : BC
36) How can I see what directories are being shared via NFS on a remote host called fileserver?
A. ping fileserver
B. mount -a -t NFS fileserver
C. showmount -e fileserver
D. nfstalk --query fileserver
E. None of the above
ANSWER : C
37) If you want to allow X-Windows programs from hostB to run on the display on hostA what would you need to do?
A. run xhost +hostB on hostA.
B. run xhost +hostA on hostB.
C. run xhost + on hostA.
D. run xhost + on hostB.
E. just set the DISPLAY environment variable and it will work.
ANSWER : A
38) You install Linux and reboot your machine and you see only L instead of the expected LILO. What is wrong?
A. Lilo did not load at all.
B. The first stage boot loader loaded but not the second stage.
C. The descriptor table is corrupt.
D. The second stage boot loader loaded at an incorrect address
E. Nothing is wrong.
ANSWER : B
39) What program can be used to test the smb.conf file for errors?
A. mount
B. test
C. samba --checkparm
D. testparm
E. smbfs
ANSWER : D
40) What file contains the list of terminals that root is allowed to log into?
A. /etc/rooterm.conf
B. /etc/terminals
C. /etc/secure
D. /etc/tty.conf
E. /etc/securetty
ANSWER : E
41) How can you turn off interface eth1?
A. service network stop
B. service netork stop eth1
C. ifstop eth1
D. ifdown eth1
E. ps -aux |grep eth1| kill `awk -f {$1}`
ANSWER : D
42) How can you see the kernel routing table?
A. netstat -Route
B. netstat -rn
C. netstat -an
D. route show default gw
E. netstat
ANSWER : B
43) How do you enable quotas on a partition in /etc/fstab?
A. Add the enforcequotas option.
B. You don't. Quotas are turned on automatically when you install the quota rpm.
C. Add the quota option.
D. Add the usrquota and grpquota options.
E. You put a 1 in the last column.
ANSWER : D
44) What does the following cron entry do?
10 5 * * * /bin/foo
A. runs /bin/foo every 10 minutes 5 days a week
B. runs /bin/foo at 10:05 AM every day
C. runs /bin/foo on the 10th of May every year
D. runs /bin/foo at 5:10 AM every day
E. none of the above
ANSWER : D
45) Which option can not be specified to a Client using the DHCP protocol?
A. default gateway
B. primary WINS server
C. subnet mask
D. web proxy server
E. IP address
ANSWER : D
Problème : 5 points.
Donner la procédure complète pour recompiler un noyau en sachant que :
-
le répertoire où se trouvent les sources du noyau est : /usr/src/linux-2.4.22/,
-
le chargeur de démarrage installé est grub,
-
l’extraversion du noyau à recompiler devra être : test,
-
l’exécution de la commande pwd donne /root.
(La réponse doit être sur un maximum de 15 lignes)
cd /usr/src/linux-2.4.22/
make clean
make mrproper
changer extra version dans le MakeFile
make xconfig
make dep
make bzImage
make modules
make modules_install
cp System.map /boot/System.map-2.4.22-test
cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.4.22-test
new-kernel-pkg –install –mkinitrd –depmod 2.4.22-test
Dostları ilə paylaş: |