Bộ đề thi giữa kỳ môn Linux

01. What is the DirectoryIndex Apache configuration directive used for? A. Printing indexes of directories when they do not have an index.html file B. The default page to show when the user requests an index of a directory C. Directories to ignore D. Directories that have access restrictions Answer: B 02. Which of the following is a journaling filesystem? A. ext2 B. vfat C. minix D. ext3 Answer: D 03. What option to dhcpd is used to specify a certain location for its configuration file? A. -cf B. -c C. -d D. -f Answer: A 04. In order to open up an SSH shell on a remote machine called 'tiger' using the login name of 'admin', what would be the proper command line for this? A. openssh -l admin tiger B. ssh -l admin tiger C. ssh admin@tiger D. sshd tiger admin Answer: B, C 05.In order to allow the directory /share to be mounted by the host 'tiger' with read and write access, what must the export line look like? A. /share tiger(rw) B. tiger(rw) /share C. /share tiger D. /share tiger (rw) Answer: A 06. Which of the following commands would transfer a local file called password.txt to a remote machine called 'tiger' via SCP , logging in as 'admin', and storing the file in /tmp? A. scp password.txt admin@tiger:/tmp B. scp password.txt tiger@admin:/tmp C. scp password.txt admin tiger /tmp D. ssh admin@tiger:/tmp Answer: A 07. The first ethernet card on a system is: A. eth0 B. etho0 C. eth1 D. hme0 Answer: A 08. You can find all of the services managed by xinetd by looking at which of the following file or directory? A. /etc/xinetd.d B. /etc/inetd.conf C. /etc/rc.d/init.d D. /etc/xinetd.conf Answer: A

doc5 trang | Chia sẻ: maiphuongtl | Lượt xem: 2666 | Lượt tải: 1download
Bạn đang xem nội dung tài liệu Bộ đề thi giữa kỳ môn Linux, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
LINUX MIDTERM TEST DURATION: 60 mins -------------------------------------------- 01. What is the DirectoryIndex Apache configuration directive used for? A. Printing indexes of directories when they do not have an index.html file B. The default page to show when the user requests an index of a directory C. Directories to ignore D. Directories that have access restrictions Answer: B 02. Which of the following is a journaling filesystem? A. ext2 B. vfat C. minix D. ext3 Answer: D 03. What option to dhcpd is used to specify a certain location for its configuration file? A. -cf B. -c C. -d D. -f Answer: A 04. In order to open up an SSH shell on a remote machine called 'tiger' using the login name of 'admin', what would be the proper command line for this? A. openssh -l admin tiger B. ssh -l admin tiger C. ssh admin@tiger D. sshd tiger admin Answer: B, C 05.In order to allow the directory /share to be mounted by the host 'tiger' with read and write access, what must the export line look like? A. /share tiger(rw) B. tiger(rw) /share C. /share tiger D. /share tiger (rw) Answer: A 06. Which of the following commands would transfer a local file called password.txt to a remote machine called 'tiger' via SCP , logging in as 'admin', and storing the file in /tmp? A. scp password.txt admin@tiger:/tmp B. scp password.txt tiger@admin:/tmp C. scp password.txt admin tiger /tmp D. ssh admin@tiger:/tmp Answer: A 07. The first ethernet card on a system is: A. eth0 B. etho0 C. eth1 D. hme0 Answer: A 08. You can find all of the services managed by xinetd by looking at which of the following file or directory? A. /etc/xinetd.d B. /etc/inetd.conf C. /etc/rc.d/init.d D. /etc/xinetd.conf Answer: A 09. Where do the binaries for XFree86 reside in? A. /usr/X11R6 B. /etc C. /etc/X11 D. /X11R6 Answer: A 10. Why might it be insecure to execute the command 'xhost +'? A. It enables anyone to connect to your X display B. It permits root access on your system C. It uses up resources on your system D. It allows anyone to rsh into your system Answer: A 11. Which file contains the default system desktop environment? A. /etc/X11/XF86Config B. /etc/sysconfig/desktop C. /etc/sysctl.conf D. /etc/sysconfig/displaymanager Answer: B 12.In order to define a Samba share that will have read and write access, what option must be specified for the share in /etc/samba/smb.conf? A. writable = yes B. rw C. rw = yes D. public = no Answer: A 13.What partition number always refers to the first logical partition? A. 0 B. 4 C. 1 D. 5 Answer: D 14. 'ntsysv' is a program for doing which of the following? A. Configure which services are started at boot time B. Performing remote administration of Windows NT servers C. Accessing Windows NT filesystems D. Configuring the modem Answer: A 15.Red Hat Linux provides a means to give options for loadable kernel modules via which of the following files? A. /etc/modules.conf B. /etc/sysctl.conf C. /etc/kernel.conf D. /etc/conf.modules Answer: A 16. 'smbclient' is an FTP-like file transfer program for accessing remote Samba or Windows shares. In order to access the share named 'files' on the remote host 'tiger', logging in as the username 'admin', what would be the proper command line for using smbclient? A. smbclient //tiger/files -U admin B. smbclient //admin@tiger/files C. smbclient tiger:/files -U admin D. smbclient -L tiger Answer: A 17.Which of the following files specifies information on what is NFS shared on your system? A. /etc/exports B. /etc/dfs/dfstab C. /etc/fstab D. /etc/sharetab Answer: A 18.Which of the following commands would restart the autofs service? A. service autofs restart B. /etc/rc.d/init.d/autofs restart C. service autofs reload D. service autofs status Answer: A, B 19. What command could be used to find out which package owns the file /etc/aliases? A. rpm -qf /etc/aliases B. rpm -qp /etc/aliases C. rpm -e /etc/aliases D. rpm -qil /etc/aliases Answer: A 20. What option must be specified in a directive in order to allow execution of CGI scripts in that directory? A. ExecCGI B. CGI C. Executable D. Includes Answer: A 21. Where does Apache log messages to? A. /var/log/httpd/access_log B. /var/log/httpd/error_log C. /var/log/access_log D. /var/log/error_log Answer: A, B 22. Which of these commands will list PCI devices? A. lsdevices B. lspci C. lsdev D. pcidev Answer: B 23. What command could be used to find all packages with the string 'mail' within the package name? A. find / -name '*mail*' B. rpm -qf /usr/bin/mail C. rpm -qa | grep mail D. locate mail Answer: C 24. The /proc file system is: A. Stored on a hard drive B. A directory that has files that can be modified C. A directory that contains information on processes D. A virtual file system Answer: B, C, D 25. On a system with 16MB RAM, the minimum size of your swap partition should be equal to how many MBs? A. 16 B. 32 C. 64 D. 100 Answer: B 26. On a new Linux installation, the partition mounted on where contains the operating system kernel? A. /boot B. /dev C. /kernel D. /bin Answer: A 27. A Linux server installation requires how many GB of free space for a minimal installation where no graphical display is ever needed? A. 0.8 B. 0.5 C. 1.1 D. 1.5 Answer: D 28. dd allows you to: A. make a diskette from an image file under Linux B. make a diskette from an image file under DOS C. make a diskette from an image file under Windows D. None of the choices Answer: A 29. When init starts, it first runs which of the following scripts? A. /etc/rc.d/rc.sysinit B. /etc/rc.d/rc.sysinit0 C. /etc/rc.d/rc.sysinit1 D. /etc/rc.d/sysinit0 Answer: A 30. What file contains the default environment variables when using the bash shell? A. ~/.profile B. /bash C. /etc/profile D. ~/bash Answer: C 31.You create a new user account by adding the following line to your /etc/passwd file. Bobm:baddog:501:501:Bob Morris:/home/bobm:/bin/bash Bob calls you and tells you that he cannot logon. You verify that he is using the correct username and password. What is the problem? A. The UID and GID cannot be identical. B. You cannot have spaces in the line unless they are surrounded with double quotes. C. You cannot directly enter the password; rather you have to use the passwd command to assign a password to the user. D. The username is too short, it must be at least six characters long. Answer: C 32.When defining a cronjob, there are five fields used to specify when the job will run. What are these fields and what is the correct order? A. minute, hour, day of week, day of month, month. B. minute, hour, month, day of month, day of week. C. minute, hour, day of month, month, day of week. D. hour, minute, day of month, month, day of week. Answer: C 33. What is the usual mode for the /tmp directory? A. 0777 B. 0755 C. 7777 D. 1777 Answer: D 34.You have an extensive collection of icons in /usr/local/lib/icons/*.gif, which you want to make available as htt://your.server.com/image/*.gif. What is the easiest way to do this? A. Use a Symlink directive in httpd.conf. B. Use a Redirect directive in httpd.conf. C. Add "Alias /image /usr/local/lib/icons" to httpd.conf. D. Create $DOCUMENT_ROOT/image and copy the files. Answer: C 35. In order to schedule a cronjob, the first task is to create a text file containing the jobs to be run along with the time they are run. Which of the following commands will run the script MyScript every day at 11:45 pm? A. * 23 45 * * MyScript B. 23 45 * * * MyScript C. 45 23 * * * MyScript D. * * * 23 45 MyScript Answer: C 36. The netstat –r command produces the following output: 192.168.10.0 * 255.255.255.0 U 40 0 0 eth1 Which of the following best describes this line? A. 192.168.10.0 IS A Gateway (G) to all external (*) networks. B. the host, 192.168.10.0, is currently up (U). C. There are currently 40 packets waiting for transmission over this route. D. The network, 192.168.10, is accessible through the local NIC configured as eth1. Answer: A 37. All of the following commands can be used to determine open TCP ports an localhost EXCEPT: A. lsof B. netstat C. nmap D. fuser E. ifconfig Answer: E 38. How would you display your system’s current ARP cache? A. arp –a B. netstat –a C. netstat –arp D. cat /ect/arp Answer: A 39. Your organization has opened a new office on a different floor, and the computers that will be installed there will be on a new network, 192.168.1.0/24. A Linux gateway having the address 192.168.0.2 on your local network will route traffic between the two subnets. Which invocation of the ‘route’ command will properly reconfigure your firewall (address 192.168.0.1) so that it can communicate with the new subnet? A. route add 192.168.1.0/24 192.168.0.2 B. route add .net 192.168.1.0 netmask 255.255.255.0 gw 192.168.0.2 C. route add 192.168.1.0 netmask 24 gw 192.168.0.2 D. route add –net 192.168.1.0/24 192.168.0.2/32 E. route add 192.168.1.0/255.255.255.0 gw 192.168.0.2 Answer: E 40. Which daemon must be running in order to have any scheduled jobs run as scheduled? A. crond B. atd C. atrun D. crontab Answer: A 41. You have created special configuration files that you want copied to each user’s home directories when creating a new user accounts. You copy the files to /etc/skel. Which of the following commands will make this happen? A. useradd –m username B. useradd –mk username C. useradd –k username D. useradd –Dk username Answer: B 41. You have entered the following cronjob. When will it run? 15 * * * 1. 3. 5 myscript A. At 15 minutes after every hour on the 1st, 3rd and 5th of each month. B. At 1:15 am, 3:15 am, and 5:15 am every day. C. At 3:pm on the 1st, 3rd, and 5th of each month. D. At 15 minutes after every hour every Monday, Wednesday, and Friday. Answer: D 42. You need to search the entire directory structure to locate a specific file. How could you do this and still be able to run other commands while the find command is still searching for you file? A. find / -name filename & B. find / -name filename C. bg find / -name filename D. &find / -name filename & Answer: A 43. To allow a user to mount a CD and read from it, which entry should be put into /etc/fstab? A. /dev/cdrom /mnt/cdrom iso9660 noauto,usermap,ro 0 0 B. /dev/cdrom /mnt/cdrom iso9660 noauto,uid=user,gid=group,ro 0 0 C. /dev/cdrom /mnt/cdrom iso9660 noauto,User,ro 0 0 D. /dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0 Answer: D 44. You have to mount the /data filesystem from an NFS server (srv 1) that does not support locking. Which of the following mount commands should you use? A. mount –a –t nfs B. mount –o locking=off srv1:/data /mnt/data C. mount –o nolock srv1:/data /mnt/data D. mount –o nolock/data@srv1 /mn/data Answer: C 45. You want to check what shares are offered by a Windows system. Which of the following commands could you use to perform this task? A. mmblookup B. showshares C. smbclient D. smbstatus E. listshares Answer: C 46. How can you determine who has scheduled at jobs? A. at –l B. at –q C. at –d D. atwho Answer: A 47. Using command substitution, how would you display the value of the present working directory? A. echo $(pwd) B. echo pwd C. $pwd D. pwd | echo Answer: A 48. Which of the following environment variables determines your working directory at the completion of a successful login? A. HOME B. BASH_ENV C. PWD D. BLENDERDIR Answer: A 49. Which of the following daemons must be running on an NFS server? A. portmap B. nfsiod C. nfsd D. xinetd E. mountd Answer: AC 50. Which process had the Process ID number 1? A. bash B. kernel C. init D. none Answer: C 51. You issue the command jobs and receive the following output: [1]- Stopped (tty output) pine [2]+ Stopped (tty output) MyScript How would you bring the MyScript process to the foreground? A. fg %2 B. ctrl-c C. fg MyScript D. ctrl-z Answer: A 52. On a system with separate partitions for /, /usr, /var, /tmp which filesystem[s] can safely be mounted read-only? A. /var, /usr B. /var C. /usr, /, /tmp D. /usr E. /tmp Answer: D 53. What file will show you the IRQs being used by different hardware devices? A. /proc/interrupts B. /proc/irqs C. /proc/irq D. /proc/int E. /proc/ints Answer: A 54. What is wrong with the following command? tar cvfb //dev/tape 20 A. You cannot sue the c option with the b option. B. The correct like should be tar –cvfb /dev/tape20. C. The arguments are not in the same order as the corresponding modifiers. D. The files to be backed up have not been specified. Answer: C 55. How would you find out the version of the kernel in /usr/src/linux? A. cat /usr/src/linux/.version B. cat /usr/src/linux/VERSION C. Look in the README D. head –4 /usr/src/linux/Makefile Answer: D 56. On a running system, where can you find specific information about the partition tables, such as major and minor device numbers, and number of blocks? A. /proc/partitions B. /proc/cpuinfo C. /proc/fstab D. /etc/partitions E. etc/fstab Answer: A

Các file đính kèm theo tài liệu này:

  • dochc04_12_12_2006.doc
  • dochc04_07_11_2006.doc
Tài liệu liên quan