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
27 trang |
Chia sẻ: mamamia | Lượt xem: 2277 | Lượt tải: 2
Bạn đang xem trước 20 trang tài liệu Trắc nghiệm linux, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
1.What is the most popular file system choice?A. ext2B. bsdfC. jfsD. ext3Answer: A2.What steps need to be performed, to make a new disk accessible to users? Select three.A. fdiskB. mkfsC. mountD. statE. quotaonAnswer: A, B, C3.Which THREE of the following commands are used when setting up and accessing a new filesystem on the hard drive?A. fsckB. mkfsC. mountD. fdiskE. formatAnswer: B, C D4.The command mkfs -t ext3 /dev/hdb1 -T largefile creates what size of inode?A. 4 kilobyteB. 1 megabyteC. 2 megabyteD. 4 megabyteAnswer: E5.Which command will show the number of free and used inodes for your system'smounted file systems?A. du -iB. df -iC. ls -iR /D. freeinodesAnswer: B6.How many inodes are assigned to a file when it is created?A. 1B. 2C. 4D. 8Answer: A7.What command with switches will display the disk utilization for all mounted filesystems?A. dfB. vmstatC. duD. topE. freeAnswer: A8.What command with options will show the currently mounted filesystems usage in kilobytes?A. df -kB. df -hC. du -kD. du -hE. du -sAnswer: A9.Which of the following commands will print the inode usage on eachmounted filesystem?A. du -iB. df -iC. lsfs -iD. printfs -iAnswer: B10.You need to create a symbolic link in the current user's home directory namedCertkiller to the file /data/foobar. Choose the command that will accomplish this.A. link . Certkiller /data/foobarB. ln /data/foobar $HOME/ CertkillerC. ln -s /data/foobar ~/ CertkillerD. file --link ./ Certkiller /data/foobarE. None of the aboveAnswer: C11.Which chown command will change the ownership to foo and thegroup to bar on a file named biglist?A. chown foo/bar biglistB. chown -u foo -g bar biglistC. chown foo:bar biglistD. chown --user foo --group bar biglistAnswer: C12.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 thefoo userto the bar user without affecting group ownership?A. chown /bin/foo barB. chown bar /bin/fooC. chown bar.foo /bin/fooD. chown.foo.bar /bin/fooAnswer: B13.Which of the following commands makes /bin/foo executable by everyone but onlywritable by its owner?A. chmod 557 /bin/fooB. chmod o +rwx, a+rx /bin/fooC. chown 557 /bin/fooD. chmod 755 /bin/fooAnswer: D14.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 -RB. chmod 744 /home/mrbill/*C. chmod -R u=rwx,g=r,o=r /home/mrbillD. chmod u+rwx,g+r,o+r /home/mrbillAnswer: A, C15.What umask will set the file permissions on a newly created file to -rw-r--r-- (644)?A. 0002B. 0022C. 0224D. 0246Answer: B16.You want the default permissions for your files to be -rw-r----- .HOW must you set umask?A. 037B. 640C. 038D. 027Answer: A17.After creating a new file, you notice that the permissions of the newfile are -rw-rw-rw-. From this, you know that the value of the umask iswhat?A. 023B. 000C. 112D. d111E. 223Answer: B18.What are the default permissions for the Red Hat /etc/passwd file?A. 644B. 640C. 400D. 641E. 440Answer: A19.Which of the following are required in the /etc/passwd file when creating a user account? (Choose all that apply)A. login nameB. useridC. default groupD. password ageE. minimum password lengthAnswer: A, B, C20.Which file contains information about filesystems and their respective mountpoints?A. /etc/mountB. /etc/fs_mountC. /etc/fstabD. /proc/fstabAnswer: C21.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 thesystem?A. whichB. searchC. slocateD. whereE. whereisAnswer: E22.What command can be used to cause changes to the inittab file to take effectwithout a system reboot?A. init qB. init rC. inittab rD. inittab qAnswer: A23. Which of the following is a journaling filesystem? A. ext2 B. vfat C. minix D. ext3Answer: D24. The first ethernet card on a system is: A. eth0 B. etho0 C. eth1 D. hme0Answer: A25. 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.confAnswer: A26.What partition number always refers to the first logical partition?A. 0 B. 4 C. 1 D. 5Answer: D27.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/sharetabAnswer: A28. 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/aliasesAnswer: A29. Which of these commands will list PCI devices?A. lsdevices B. lspci C. lsdev D. pcidevAnswer: B30. 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 mailAnswer: C31. 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. 100Answer: B32. On a new Linux installation, the partition mounted on where contains the operating system kernel? A. /boot B. /dev C. /kernel D. /binAnswer: A33. 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.5Answer: D34. 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/sysinit0Answer: A35. What file contains the default environment variables when using the bash shell?A. ~/.profile B. /bash C. /etc/profile D. ~/bashAnswer: C36. What is the usual mode for the /tmp directory? A. 0777 B. 0755 C. 7777 D. 1777Answer: D37. The netstat –r command produces the following output:192.168.10.0 * 255.255.255.0 U 40 0 0 eth1Which 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: A38. 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. ifconfigAnswer: E39. How would you display your system’s current ARP cache?A. arp –a B. netstat –a C. netstat –arp D. cat /ect/arpAnswer: A40. Your organization has opened a new office on a different floor, and the computers thatwill be installed there will be on a new network, 192.168.1.0/24. A Linux gateway havingthe 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.2B. route add .net 192.168.1.0 netmask 255.255.255.0 gw 192.168.0.2C. route add 192.168.1.0 netmask 24 gw 192.168.0.2D. route add –net 192.168.1.0/24 192.168.0.2/32E. route add 192.168.1.0/255.255.255.0 gw 192.168.0.2Answer: E41. 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 usernameC. useradd –k username D. useradd –Dk usernameAnswer: B41. You have entered the following cronjob. When will it run? 15 * * * 1. 3. 5 myscriptA. 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: D42. You need to search the entire directory structure to locate a specific file. How could youdo this and still be able to run other commands while the find command is still searching foryou file? A. find / -name filename & B. find / -name filenameC. bg find / -name filename D. &find / -name filename &Answer: A43. 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 0B. /dev/cdrom /mnt/cdrom iso9660 noauto,uid=user,gid=group,ro 0 0C. /dev/cdrom /mnt/cdrom iso9660 noauto,User,ro 0 0D. /dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0Answer: D44. You have to mount the /data filesystem from an NFS server (srv 1) that does not supportlocking. Which of the following mount commands should you use?A. mount –a –t nfs B. mount –o locking=off srv1:/data /mnt/dataC. mount –o nolock srv1:/data /mnt/data D. mount –o nolock/data@srv1 /mn/dataAnswer: C45. 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. listsharesAnswer: C46. How can you determine who has scheduled at jobs?A. at –l B. at –q C. at –d D. atwhoAnswer: A47. Using command substitution, how would you display the value of the present working directory?A. echo $(pwd) B. echo pwd C. $pwd D. pwd | echoAnswer: A48. 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. BLENDERDIRAnswer: A49. Which of the following daemons must be running on an NFS server?A. portmap B. nfsiod C. nfsd D. xinetd E. mountdAnswer: AC50. Which process had the Process ID number 1?A. bash B. kernel C. init D. noneAnswer: C51. You issue the command jobs and receive the following output:[1]- Stopped (tty output) pine[2]+ Stopped (tty output) MyScriptHow would you bring the MyScript process to the foreground?A. fg %2 B. ctrl-c C. fg MyScript D. ctrl-zAnswer: A52. 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. /tmpAnswer: D53. 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/intsAnswer: A54. What is wrong with the following command? tar cvfb //dev/tape 20A. 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: C55. 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/VERSIONC. Look in the README D. head –4 /usr/src/linux/MakefileAnswer: D56. 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/fstabAnswer: A57.What option is used with the useradd command to specify the user's home directory?A. -dB. -hC. -uD. -aAnswer: A58.What switch is used with the usermod command to change a user's secondary groups?A. -GB. -groupC. -dD. -UAnswer: A59.Which of the following are required in the /etc/passwd file when creating a user account? (Choose allthat apply)A. login nameB. useridC. default groupD. password ageE. minimum password lengthAnswer: A, B, C60.What run level represents basic multi-user?A. 2B. 0C. 1D. 5Answer: A61.What run level represents multi-user?A. 3B. 0C. 1D. 5Answer: A62.Which of the following switches can be used with the tar command to find out the difference betweentwo tar files?A. -cB. -vC. -dD. -tAnswer: C63.You want to add files to a previously created tar file. You want to replace existing files with newerfiles, how can you do this?A. Use the append commandB. Use the tar command with the -t switchC. Use the add commandD. Use the tar command with the -u switchAnswer: D64.You had a contractor come into your company. You originally set his account to expire after thirtydays. You now need to change this. How can you do this?A. usermod -eB. usermod -aC. usermod -xD. usermod -dAnswer: A65.You want to add information to a previously created tar file. How would you do this?A. Use the tar command with the -a switchB. Use the append commandC. Use the add commandD. Use the tar command with the -r switchAnswer: D67.What option is used with the useradd command to specify the user's user id?A. -uB. -sC. -uiD. -idAnswer: A68.You are adding a new user. You want to create the user's home directory only if the directory does notexist. Which of the following would accomplish this?A. useradd -mB. useradd -h -yC. useradd -uD. useradd -hAnswer: A69.Which of the following can be used to switch your system to run level 1?A. init 1B. inittab 1C. rlevel 1D. level 1Answer: A70.What run level represents administration mode?A. 0B. 1C. 6D. 5Answer: B71.What file does init processes use as its control file?A. /etc/inittabB. /etc/procC. /etc/initD. /etc/initprocAnswer: A72.Which of the following commands can be used to create a tar archive file in verbose mode?A. tar -vB. tar -cvfC. tar -cD. tar -vfAnswer: B73.What option is used with the useradd command to specify the user's login shell?A. -sB. -lC. -uD. –shAnswer: A74.Which of the following can be used to change a user's home directory?A. usermod -dB. usermod -hC. usermod -uD. usermod -cAnswer: A75.Which of the following commands can be used to extract a tar file?A. tar -vfB. tar -xvfC. tar -eD. tar -vAnswer: B76.You want a user's account to expire in ten days. What option used with the useradd command willallow you to do this?A. -eB. -uC. -dD. –tAnswer: A77.What command can be used to find the current run level?A. runlevelB. levelC. show levelD. rlevelAnswer: A78.What switch is used with the useradd command to specify a user's initial group?A. -gB. -iC. -uD. –igAnswer: A79.What run level represents a power down?A. 5B. 0C. 1D. 4Answer: B80.What run level represents a system reboot?A. 6B. 1C. 2D. 5Answer: A81.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 switchB. Use the tar command with the -r switchC. Use the grep commandD. Use the find commandAnswer: A82.When a user executes the command "ps ax", what is shown on the console? Choose atl that apply.A. Process's user-related informationB. Processes without controlling terminalsC. Processes used by the XFree86 SystemD. All regular processesE. Processes on remote machinesAnswer: B, D83.What will the command "kill -HUP 1354" do?A. Kill the process 1354 destructivelyB. Kill the process 1354, allowing cleanup of memoryC. Restart the process 1354, re-reading it's config filesD. Restart the process 1354, resetting it's associated modemAnswer: C84.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 accomplishthis?A. myprog > file1.out 2>&1B. myprog > file1.out 1>&2C. myprog > file1.out 1> /dev/nullD. myprog 1&2> file1.outE. myprog 1> /dev/null > file1.outAnswer: A85.What are the default permissions for the Red Hat /etc/passwd file?A. 644B. 640C. 400D. 641E. 440Answer: A86.What are the default permissions on the Red Hat /etc/shadow file?A. 644B. 600C. 400D. 444E. 640Answer: C87.What are the default permissions on the Debian /etc/passwd file?A. 644B. 640C. 777D. 700E. 400Answer: A88.What are the default permissions on the Debian /etc/shadow file?A. 654B. 640C. 400D. 644E. 540Answer: B89.Which of the following directories would be the least likely to need backing up? Choose Two.A. /usrB. /etcC. /homeD. /tmpE. /swapAnswer: D, E90.Which of the following will copy file1.txt to file2.txt? Choose Two.A. cat file1.txt > file2.txtB. cat file1.txt | file2.txtC. cp file1.txt > file2.txtD. cp file1.txt file2.txtE. cpio file2.txtAnswer: A, D91.When you create a new file, the permissions show as 654. What value is the umask likely set at?A. 012B. 002C. 123D. 022Answer: A92.When you create a new directory, you see the permissions are set to 600. What umask value wouldcause this to happen?A. 177B. 066C. 244D. 155E. 333Answer: A93.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*vB. ls a.vC. ls a-vD. ls [a-v]Answer: A94.What command with switches will display the disk utilization for all mounted file systems?A. dfB. vmstatC. duD. topE. freeAnswer: A95.Which command will show the number of free and used inodes for your system's mounted filesystems?A. du -iB. df -iC. ls -iR /D. freeinodesAnswer: B96.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 textfileB. head -n 20 textfile | tailC. tail -n 11-20D. cat textfile | pr -n 11-20E. nl -n 11-30 textfileAnswer: B97.Which command will display in reverse order a file that is numbered from 1 to End of File?A. cat file | nl | prB. cat file | nl | tacC. cat file | tac | nlD. cat file | pr -n | reverseE. None of the aboveAnswer: B98.What command will show the first 10 lines of a file by default?A. headB. catC. tacD. nlE. tailAnswer: A99.What command will show the last 10 lines of a file by default?A. tailB. headC. catD. prstatE. psAnswer: A100.What is the result of the command:# kill 9 13459A. Kill PID 13459 with a signal 15B. Kill PID 13459 with a signal 1C. Kill PID 13459 with a signal 9D. None of the aboveAnswer: D101.How can you execute two commands, the second one being executed only if the first returns a nonzero(program execution failed) exit status?A. command1 || command2B. command1 && command2C. command1 $$ command2D. command1 @@ command2Answer: A102.You want to move all files in /dir1 to /dir2 that begin with a and end with v. What is the correctcommand to do this?A. mv /dir1/a*v /dir2B. mv -r /dir1/a.v /dir2C. move /dir1/a?v /dir2D. ls a*v | cp /dir2E. mv /dir1/[a-v] /dir2Answer: A103.What steps need to be performed, to make a new disk accessible to users?A. fdiskB. mkfsC. mountD. statE. quotaonAnswer: A, B, C104.What switch will set the foreground color in X?A. fgB. foregroundC. xfgD. fregrndE. None of the aboveAnswer: A105.What two files are used to configure a user's environment that was created with the default options?A. ~/.profile, ~/.bashrcB. /etc/profile, /bashrcC. ~/.bash_profile, ~/.bashrcD. /etc/.login, ~/.loginE. None of the aboveAnswer: C106.Which utility would be used to verify the checksum of a downloaded archive file?A. verifyB. chksumC. md5sumD. chkrpmE. pkgchkAnswer: C107.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. 512MBB. 256MBC. 128MBD. 64MBE. 32MBAnswer: D108.A directory contains the following files:#lsratas saran jacaw cabal cabinYou issue the command "ls | grep .a[^b]a.", what files are returned by the command? Choose all thatapply.A. ratasB. jacawC. saranD. cabalE. cabinAnswer: A, B, C109.Which of the following will allow both the commands to execute, regardless of their individual exitstatus?A. command1 | command2B. command1 $ command2C. command1 & command2D