1. Trang chủ
  2. » Công Nghệ Thông Tin

trắc nghiệm về linux

27 951 2

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 27
Dung lượng 36,46 KB

Nội dung

1.What is the most popular file system choice? A. ext2 B. bsdf C. jfs D. ext3 Answer: A 2.What steps need to be performed, to make a new disk accessible to users? Select three. A. fdisk B. mkfs C. mount D. stat E. quotaon Answer: A, B, C 3.Which THREE of the following commands are used when setting up and accessing a new filesystem on the hard drive? A. fsck B. mkfs C. mount D. fdisk E. format Answer: B, C D 4.The command mkfs -t ext3 /dev/hdb1 -T largefile creates what size of inode? A. 4 kilobyte B. 1 megabyte C. 2 megabyte D. 4 megabyte Answer: E 5.Which command will show the number of free and used inodes for your system's mounted file systems? A. du -i B. df -i C. ls -iR / D. freeinodes Answer: B 6.How many inodes are assigned to a file when it is created? A. 1 B. 2 C. 4 D. 8 Answer: A 7.What command with switches will display the disk utilization for all mounted file systems? A. df B. vmstat C. du D. top E. free Answer: A 8.What command with options will show the currently mounted filesystems usage in kilobytes? A. df -k B. df -h C. du -k D. du -h E. du -s Answer: A 9.Which of the following commands will print the inode usage on each mounted filesystem? A. du -i B. df -i C. lsfs -i D. printfs -i Answer: B 10.You need to create a symbolic link in the current user's home directory named Certkiller to the file /data/foobar. Choose the command that will accomplish this. A. link . Certkiller /data/foobar B. ln /data/foobar $HOME/ Certkiller C. ln -s /data/foobar ~/ Certkiller D. file link ./ Certkiller /data/foobar E. None of the above Answer: C 11.Which chown command will change the ownership to foo and the group to bar on a file named biglist? A. chown foo/bar biglist B. chown -u foo -g bar biglist C. chown foo:bar biglist D. chown user foo group bar biglist Answer: C 12.You have the following file: -rwxrwxr-x 1 foo root 0 Feb 23 07:48 /bin/foo Which of the following commands will change the owner of the file /bin/foofrom the foo userto the bar user without affecting group ownership? A. chown /bin/foo bar B. chown bar /bin/foo C. chown bar.foo /bin/foo D. chown.foo.bar /bin/foo Answer: B 13.Which of the following commands makes /bin/foo executable by everyone but only writable by its owner? A. chmod 557 /bin/foo B. chmod o +rwx, a+rx /bin/foo C. chown 557 /bin/foo D. chmod 755 /bin/foo Answer: D 14.You need to alter the permissions on the directory /home/mrbill and all it's contents to match the following permissions. drwxr r Which of these commands with options and arguments will accomplish this? Choose two. A. chmod 0744 /home/mrbill -R B. chmod 744 /home/mrbill/* C. chmod -R u=rwx,g=r,o=r /home/mrbill D. chmod u+rwx,g+r,o+r /home/mrbill Answer: A, C 15.What umask will set the file permissions on a newly created file to -rw-r r (644)? A. 0002 B. 0022 C. 0224 D. 0246 Answer: B 16.You want the default permissions for your files to be -rw-r . HOW must you set umask? A. 037 B. 640 C. 038 D. 027 Answer: A 17.After creating a new file, you notice that the permissions of the new file are -rw-rw-rw From this, you know that the value of the umask is what? A. 023 B. 000 C. 112 D. d111 E. 223 Answer: B 18.What are the default permissions for the Red Hat /etc/passwd file? A. 644 B. 640 C. 400 D. 641 E. 440 Answer: A 19.Which of the following are required in the /etc/passwd file when creating a user account? (Choose all that apply) A. login name B. userid C. default group D. password age E. minimum password length Answer: A, B, C 20.Which file contains information about filesystems and their respective mount points? A. /etc/mount B. /etc/fs_mount C. /etc/fstab D. /proc/fstab Answer: C 21.Which of the following programs can be used to the find the foo program in the.PATH and associated man pages, but not list every file containing foo on the system? A. which B. search C. slocate D. where E. whereis Answer: E 22.What command can be used to cause changes to the inittab file to take effect without a system reboot? A. init q B. init r C. inittab r D. inittab q Answer: A 23. Which of the following is a journaling filesystem? A. ext2 B. vfat C. minix D. ext3 Answer: D 24. The first ethernet card on a system is: A. eth0 B. etho0 C. eth1 D. hme0 Answer: A 25. 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 26.What partition number always refers to the first logical partition? A. 0 B. 4 C. 1 D. 5 Answer: D 27.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 28. 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 29. Which of these commands will list PCI devices? A. lsdevices B. lspci C. lsdev D. pcidev Answer: B 30. 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 31. 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 32. 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 33. 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 34. 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 35. What file contains the default environment variables when using the bash shell? A. ~/.profile B. /bash C. /etc/profile D. ~/bash Answer: C 36. What is the usual mode for the /tmp directory? A. 0777 B. 0755 C. 7777 D. 1777 Answer: D 37. 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 38. 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 39. 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 40. 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 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 57.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 58.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 59.Which of the following are required in the /etc/passwd file when creating a user account? (Choose all that apply) A. login name B. userid C. default group D. password age E. minimum password length Answer: A, B, C 60.What run level represents basic multi-user? A. 2 B. 0 C. 1 D. 5 Answer: A 61.What run level represents multi-user? A. 3 B. 0 C. 1 D. 5 Answer: A 62.Which of the following switches can be used with the tar command to find out the difference between two tar files? A. -c B. -v C. -d D. -t Answer: C 63.You want to add files to a previously created tar file. You want to replace existing files with newer files, how can you do this? A. Use the append command B. Use the tar command with the -t switch C. Use the add command D. Use the tar command with the -u switch Answer: D 64.You had a contractor come into your company. You originally set his account to expire after thirty days. You now need to change this. How can you do this? A. usermod -e B. usermod -a C. usermod -x D. usermod -d Answer: A 65.You want to add information to a previously created tar file. How would you do this? A. Use the tar command with the -a switch B. Use the append command C. Use the add command D. Use the tar command with the -r switch Answer: D 67.What option is used with the useradd command to specify the user's user id? A. -u B. -s C. -ui D. -id Answer: A 68.You are adding a new user. You want to create the user's home directory only if the directory does not exist. Which of the following would accomplish this? A. useradd -m B. useradd -h -y C. useradd -u D. useradd -h Answer: A 69.Which of the following can be used to switch your system to run level 1? A. init 1 B. inittab 1 C. rlevel 1 D. level 1 Answer: A 70.What run level represents administration mode? A. 0 B. 1 C. 6 D. 5 Answer: B 71.What file does init processes use as its control file? A. /etc/inittab B. /etc/proc C. /etc/init D. /etc/initproc Answer: A 72.Which of the following commands can be used to create a tar archive file in verbose mode? A. tar -v B. tar -cvf C. tar -c D. tar -vf Answer: B 73.What option is used with the useradd command to specify the user's login shell? A. -s B. -l C. -u D. –sh Answer: A 74.Which of the following can be used to change a user's home directory? A. usermod -d B. usermod -h C. usermod -u D. usermod -c Answer: A 75.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 76.You want a user's account to expire in ten days. What option used with the useradd command will allow you to do this? A. -e B. -u C. -d D. –t Answer: A 77.What command can be used to find the current run level? A. runlevel B. level C. show level D. rlevel Answer: A 78.What switch is used with the useradd command to specify a user's initial group? A. -g B. -i C. -u D. –ig Answer: A 79.What run level represents a power down? A. 5 B. 0 C. 1 D. 4 Answer: B 80.What run level represents a system reboot? A. 6 B. 1 C. 2 D. 5 Answer: A 81.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 82.When a user executes the command "ps ax", what is shown on the console? Choose atl that apply. A. Process's user-related information B. Processes without controlling terminals C. Processes used by the XFree86 System D. All regular processes E. Processes on remote machines Answer: B, D 83.What will the command "kill -HUP 1354" do? A. Kill the process 1354 destructively B. Kill the process 1354, allowing cleanup of memory C. Restart the process 1354, re-reading it's config files D. Restart the process 1354, resetting it's associated modem Answer: C 84.You need to have all the output from the executable myprog written to a text log named file1.out. This program must not send any output to the console. Which of the commands listed will accomplish this? A. myprog > file1.out 2>&1 B. myprog > file1.out 1>&2 C. myprog > file1.out 1> /dev/null D. myprog 1&2> file1.out E. myprog 1> /dev/null > file1.out Answer: A 85.What are the default permissions for the Red Hat /etc/passwd file? A. 644 B. 640 C. 400 D. 641 E. 440 Answer: A 86.What are the default permissions on the Red Hat /etc/shadow file? A. 644 B. 600 C. 400 D. 444 E. 640 Answer: C 87.What are the default permissions on the Debian /etc/passwd file? A. 644 B. 640 C. 777 D. 700 E. 400 Answer: A 88.What are the default permissions on the Debian /etc/shadow file? A. 654 B. 640 C. 400 D. 644 E. 540 Answer: B 89.Which of the following directories would be the least likely to need backing up? Choose Two. A. /usr B. /etc C. /home D. /tmp E. /swap Answer: D, E 90.Which of the following will copy file1.txt to file2.txt? Choose Two. A. cat file1.txt > file2.txt B. cat file1.txt | file2.txt C. cp file1.txt > file2.txt D. cp file1.txt file2.txt E. cpio < file1.txt > file2.txt Answer: A, D 91.When you create a new file, the permissions show as 654. What value is the umask likely set at? A. 012 B. 002 C. 123 D. 022 Answer: A 92.When you create a new directory, you see the permissions are set to 600. What umask value would cause this to happen? A. 177 B. 066 C. 244 D. 155 E. 333 Answer: A 93.You need to display all files in the current directory that start with a "a" and end with a "v", regardless of their length or use of delimiters. Choose the best answer. A. ls a*v B. ls a.v C. ls a-v D. ls [a-v] Answer: A 94.What command with switches will display the disk utilization for all mounted file systems? A. df B. vmstat C. du D. top E. free Answer: A 95.Which command will show the number of free and used inodes for your system's mounted file systems? A. du -i B. df -i C. ls -iR / D. freeinodes Answer: B 96.Which of the commands will show you only the middle 10 lines of a 30 line text file named textfile? A. head -n 11-20 textfile B. head -n 20 textfile | tail C. tail -n 11-20 D. cat textfile | pr -n 11-20 E. nl -n 11-30 textfile Answer: B 97.Which command will display in reverse order a file that is numbered from 1 to End of File? A. cat file | nl | pr B. cat file | nl | tac C. cat file | tac | nl D. cat file | pr -n | reverse E. None of the above Answer: B 98.What command will show the first 10 lines of a file by default? [...]... | head C wc users /etc/passwd D wc lines /etc/passwd E expand lines /etc/passwd Answer: D 179.You logged in as user linux1 , but now you want to switch users to linux2 with linux' s environment How would you do this? A su linux2 B su -e linux2 C su - linux2 D su -m linux2 E su -f linux2 Answer: C 180.You are logged in as user tux1, but now you want to switch users to tux2 with tux2's environment How... rlevel 3 C level 3 D inittab 3 Answer: A 222.What is corresponding device name on a Linux system? A /dev/hda4 B /dev/hda5 C /dev/hdb4 D /dev/hdb5 Answer: D 223.You are formatting a single hard disk for a Linux install What is the maximum number of primary partitions you can create? A 0 B 1 C 2 D 3 E 4 F 5 Answer: E 224.With a Linux 2.2 Kernel-based machine configuration of 133 MHZ, 32 MB RAM and a 1 GB HD,... Kernel-based machine configuration of 133 MHZ, 32 MB RAM and a 1 GB HD, how much swap should be configured? A 512MB B 256MB C 128MB D 64MB E 32MB Answer: D 225.To build a fresh new Linux system, how much free space should you reserve for the Linux partition? A 100 - 200MB B 200 - 300MB C 300 - 400MB D 700 - 800MB Answer: D 226.Identify the proper device for the third partition, on the second hard disk, on the... you use? A grep a*^b*a myfile B grep a[^b].a myfile C grep [a].*.[a] myfile D grep a*^b a myfile Answer: B 199.You have to test a new kernel version Which of the following is the best way to add a new linux kernel in your system? A rpm -fvh kernel_package B rpm -Uvh kernel_package C rpm -u kernel_package D rpm -u kernel_package && make E rpm conflicts kernel_package Answer: B 200.You see following... 125.If you set the umask to 022, by default what permissions will your files have? A 0220 B 0557 C 0644 D 0755 Answer: C 126.Which of the following commands may be used to view PCI devices seen by the Linux kernel? (Choose two) A less lspci B less /dev/pci C less /proc/pci D less /proc/devices/pci E lspci | less Answer: C, E 127.You have the following file: -rwxrwxr-x 1 foo root 0 Feb 23 07:48 /bin/foo... /etc/.login, ~/.login E None of the above Answer: C 106.Which utility would be used to verify the checksum of a downloaded archive file? A verify B chksum C md5sum D chkrpm E pkgchk Answer: C 107.With a Linux 2.2 Kernel-based machine configuration of 133 MHZ, 32 MB RAM and a 1 GB HD, how much swap should be configured? A 512MB B 256MB C 128MB D 64MB E 32MB Answer: D 108.A directory contains the following . as user linux1 , but now you want to switch users to linux2 with linux& apos;s environment. How would you do this? A. su linux2 B. su -e linux2 C. su - linux2 D. su -m linux2 E. su -f linux2 Answer:. 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. 100 Answer: B 32. 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 33. A Linux server installation

Ngày đăng: 05/07/2014, 09:20

TỪ KHÓA LIÊN QUAN

w