频道栏目
首页 > 资讯 > Linux认证 > 正文

国际认证RHCE(红帽认证):RHCE的试题

16-06-02        来源:[db:作者]  
收藏   我要投稿
  1. 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.

  you answered this question incorrectly

  explanation: you want programs from hostb to display on hosta. so you must tell hosta to allow xclients from hostb. hence a is correct. the xhost + command is too broad and allows anyone to connect to your x-server.

  2. what command can you enter to find out which rpm contains the /etc/foo file?

  a. rpm -qa |grep foo

  b. rpm -ql /etc/foo

  c. rpm -qlf /etc/foo

  d. rpm -q -f /etc/foo

  e. man foo

  you answered this question incorrectly

  explanation: you can find out which rpm a file belongs to by using the rpm -q -f command. you must have the redhatrpmdb rpm installed though.

  3. you have a linux machine that does not have x-windows configured. what command can you use to find out what kind of graphics card it has?

  a. xfind

  b. superprobe

  c. xsetup

  d. cat /proc/video

  e. videocfg

  you answered this question incorrectly

  explanation: the superprobe program is used to find information about your graphics card.

  4. which installation class will automatically delete all of your dos partitions?

  a. custom

  b. workstation

  c. laptop

  d. server

  e. all of the above

  you answered this question incorrectly

  explanation: the server installation class will automatically delete all dos partitions. the workstation class will use availiable free space. the laptop class is very similar to the workstation class (but for laptops.)

  5. how do you install an rpm?

  a. rpm -evh packagename.rpm

  b. rpm -ivh packagename.rpm

  c. rpm -q packagename.rpm

  d. rpm -qa *.rpm

  e. rpm -ql *.rpm

  you answered this question incorrectly

  explanation: a is wrong because the -e option is for uninstalling. b is right. c d and e are wrong because the -q option is for querrying.

  6. what program can be used to test the smb.conf file for errors?

  a. mount

  b. test

  c. samba --checkparm

  d. testparm

  e. smbfs

  you answered this question incorrectly

  explanation: the testparm program parses the smb.conf file and reports any errors. if you make a typo this program is likely to find it.

  7. what command do you use to edit the default grace period for quotas?

  a. quotaconfig -g

  b. editquota -g

  c. quotaconfig -t

  d. edquota -t

  e. quotaeditor --grace

  you answered this question incorrectly

  explanation: you use the edquota command to edit quotas. for example you can say edquota -u username to edit a specific user’s quota. or you can type edquota -g to set a quota for a group. you can say edquota -t to set up grace periods.

  8. what is the correct syntax to mount an ms dos formatted floppy disk (do not assume that there is an entry in /etc/fstab)?

  a. mount /dev/floppy /mnt/fd0

  b. mount -t iso9660 /dev/fd0 /mnt/floppy

  c. mount -t vfat /dev/fd0 /mnt/floppy

  d. mount -t msdos /dev/floppy /mnt/floppy

  e. mdir

  you answered this question incorrectly

  explanation: a will only work if there is an entry in /etc/fstab. b is wrong because iso9660 is for cdrom’s. c is correct. d is wrong becuase the device should be /dev/fd0 rather than /dev/floppy.

  9. you have created a /home/projectfoo directory. how can you change its group ownership to the projectfoo group?

  a. chmod g+rwx projectfoo /home/projectfoo

  b. chown projectfoo /home/projectfoo

  c. chgrp projectfoo /home/projectfoo

  d. newgrp projectfoo /home/projectfoo

  e. chown projectfoo.users /home/projectfoo

  you answered this question incorrectly

  explanation: the chgrp command sets the group ownership of a file or directory.

  10. you have installed a dhcp server on your linux machine and edited the configuration file. what else must you do before it will give out ip addresses?

  a. reboot

  b. put fixed-addresses in the configuration for each client.

  c. service dhcp begin

  d. touch /var/lib/dhcp/dhcpd.leases

  e. all of the above

  you answered this question incorrectly

  explanation: you must touch the /var/lib/dhcp/dhcpd.leases file in order to get dhcp to begin giving out ip addresses.

  11. 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.

  you answered this question incorrectly

  explanation: to enable quotas on a partition you put the userquota and groupquota option in the options section for the partition in /etc/fstab.

  12. you want to compile a new kernel. you have just run

  a. make bzimage

  b. make dep

  c. make clean

  d. make mrproper

  e. make xconfig

  you answered this question incorrectly

  explanation: the first thing you should do in the /usr/src/linux-2.4 directory is

  make mrproper

  thencomma you should do the following: make config | make menuconfig | make xconfig

  make dep

  make clean

  make bzimage

  make modules (if modular kernel)

  make modules_install (if modular kernel)

  cp system.map /boot/system.map-2.4.17

  cp arch/i386/boot/bzimage /boot/vmlinuz-2.4.17

  cp .config /boot/config-2.4.17

  mkinitrd /boot/initrd- # depending on kernel configuration

  update lilo or grub

  reboot into new kernel

  13. you are configuring a linux dhcp server. you have it setup and working (as linux clients are getting ip addresses from the dhcp server fine) but some windows 95 clients are not getting ip addresses properly from your dhcp server. what do you need to do?

  a. route add -host 255.255.255.255 dev eth0

  b. route add -net 255.255.255.255 dev eth0

  c. service dhcp restart

  d. touch /var/state/leases

  e. windows 95 is not compatible with a linux dhcp server.

  you answered this question incorrectly

  explanation: windows 95 insists that the dhcpoffer messages be sent to 255.255.255.255. linux will send them to the broadcast address instead. adding a host entry for the host 255.255.255.255 will trick linux into working with the windows 95 clients.

  14. you want to add a directory to all users paths. what file should you edit to do this?

  a. /etc/sysconfig/profile

  b. /etc/sysconfig/profile

  c. /etc/bashrc

  d. /etc/profile

  e. /etc/env

  you answered this question incorrectly

  explanation: the /etc/profile script is used for system-wide enviornment variables and startup files. you could also create a new file in /etc/profile.d/ that ends in .sh and set the enviornment variable in there. keep in mind that not all users will necessarily use bash.

  15. which files are used to configure tcp wrappers?

  a. /etc/tcpwrapper.conf and /etc/hosts.conf

  b. /etc/hosts.allow and /etc/hosts.deny

  c. /etc/tcpwrapper.conf and /etc/xinetd.conf

  d. /etc/access.conf and /etc/xinetd.conf

  e. /etc/tcpwrapper and /etc/access.conf

  you answered this question incorrectly

  explanation: tcp wrappers are configured in the /etc/hosts.allow and /etc/hosts.deny files.

  16. how can you see the kernel routing table?

  a. netstat -route

  b. netstat -rn

  c. netstat -an

  d. route show default gw

  e. netstat

  you answered this question incorrectly

  explanation: the netstat -rn command shows the kernel routing table.

  17. how can a user set up their own crontab entry?

  a. vi ~/.crontab

  b. cp /etc/crontab .

  c. crontab -v

  d. crontab -e

  e. cron -edit

  you answered this question incorrectly

  explanation: the crontab -e command is used to edit your own crontab.

  18. what file would you edit to share out a directory via nfs?

  a. /etc/nfsd.conf

  b. /etc/nsf

  c. /etc/fstab

  d. /etc/exports

  e. /etc/export.conf

  you answered this question incorrectly

  explanation: to share a directory via nfs you must edit the /etc/exports file and then run exportfs -a.

  19. you want to compile a new kernel. you have already compiled the kernel and modules. how do you install the modules?

  a. make modules_install

  b. make install

  c. make modules

  d. make install_modules

  e. make bzimage

  you answered this question incorrectly

  explanation: the first thing you should do in the /usr/src/linux-2.4 directory is

  make mrproper

  then, you should do the following: make config | make menuconfig | make xconfig

  make dep

  make clean

  make bzimage

  make modules (if modular kernel)

  make modules_install (if modular kernel)

  cp system.map /boot/system.map-2.4.17

  cp arch/i386/boot/bzimage /boot/vmlinuz-2.4.17

  cp .config /boot/config-2.4.17

  mkinitrd /boot/initrd- # depending on kernel configuration

  update lilo or grub

  reboot into new kernel

  20. what command do you use to edit quotas?

  a. quotaconfig

  b. editquota

  c. quotaconfig

  d. edquota

  e. quotaeditor

  you answered this question incorrectly

  explanation: you use the edquota command to edit quotas. for example you can say edquota -u username to edit a specific user’s quota. or you can type edquota -g to set a quota for a group. you can say edquota -t to set up grace periods.

  21. what directory contains the dns zone files?

  a. /etc/bind/

  b. /etc/named/

  c. /etc/bind.d

  d. /var/named

  e. /var/bind.d

  you answered this question incorrectly

  explanation: the zone files are stored in /var/named by default. the location of this directory is specified in /etc/named.conf.

  22. where are source rpms installed?

  a. /usr/src/linux/rpms/

  b. /var/src/linux/rpm/

  c. /var/rpm/src/

  d. /var/linux/rpm/src/

  e. /usr/src/redhat/

  you answered this question incorrectly

  explanation: source rpms are installed in /usr/src/redhat. there are 5 subdirectories under there. sources contains the original source code. specs contains the specification files that control the rpm build process. build is where source code is uncompressed and built. srpms contains the source rpm that is created when you build one.

  23. 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

  you answered this question incorrectly

  explanation: you can specify all of the above except the address of the web proxy server via dhcp.

  24. 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

  you answered this question incorrectly

  explanation: a and b don’t set the proper subnet mask. c is correct. d’s syntax is wrong. e’s syntax is wrong.

  25. what command will create the quota.user and quota.group files for me?

  a. quotacheck -avug

  b. quotacheck -cugf

  c. quotacheck -rugf

  d. repquota -u

  e. none of the above

  you answered this question incorrectly

  explanation: a is right. you can also do it like this:

  touch /quota.user

  touch /quota.group

  chmod 600 /quota.*

  26. you have just added a new nfs share to the appropriate file. what must you do to activate the share?

  a. reboot

  b. exportfs -a

  c. ndc restart

  d. server nfs start

  e. mount -a

  you answered this question incorrectly

  explanation: to share a directory via nfs you must edit the /etc/exports file and then run exportfs -a.

  27. 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}`

  you answered this question incorrectly

  explanation: the ifdown eth1 command will turn off the eth1 interface. the service network stop command will stop all networking which is not what you want. the ifstop command does not exist. the last command is just nonsense.

  28. what file do you edit to set the default runlevel?

  a. /etc/grub.conf

  b. /etc/lilo.conf

  c. either a or b

  d. /etc/inittab

  e. /etc/runlevel

  you answered this question incorrectly

  explanation: /etc/inittab is the standard place to do this and is the best answer.

  29. which options to chmod allow read access to all but only allow write and execute access to the owner?

  a. chmod 777 filename

  b. chmod 700 filename

  c. chmod 744 filename

  d. chmod 447 filename

  e. chmod 775 filename

  you answered this question incorrectly

  explanation: a is wrong because it allows read write and execute to everyone. b is wrong because it does not allow read access to everyone. c is correct. d is wrong because it allows write acess to everyone. e is wrong because it allows write access to the group.

  30. 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

  you answered this question incorrectly

  explanation: the /etc/securetty file contains a list of all terminals that root is allowed to log into.

  31. what file contains the configuration for bind?

  a. /etc/bind.conf

  b. /etc/named.conf

  c. /etc/dns.conf

  d. /var/named/bind.conf

  e. /var/named.conf

  you answered this question incorrectly

  explanation: bind (the berkely internet name daemon) which is a dns server is configured in /etc/named.conf.

  32. where are kernel modules stored assuming you are using kernel version 2.4.16-9?

  a. /lib/redhat/modules/2.4.16-9

  b. /lib

  c. /lib/modules/2.4.16-9

  d. /lib/modules

  e. /usr/lib/modules/

  you answered this question incorrectly

  explanation: kernel modules are stored in /lib/modules/.

  33. sendmail is an example of a(n):?

  a. mta

  b. mua

  c. mda

  d. mla

  e. all of the above

  you answered this question incorrectly

  explanation: only a is correct. sendmail is an mta

  34. what does cops stand for?

  a. company oriented password system

  b. computer oriented password security

  c. computer oracle and password system

  d. computer oracle and points system

  e. none of the above

  you answered this question incorrectly

  explanation: cops (computer oracle and password system) can check your system for things that are insecure.

  35. what directory contains the kernel?

  a. /

  b. /kernel

  c. /etc

  d. /boot

  e. /var/log

  you answered this question incorrectly

  explanation: the kernel is in /boot.

  36. what file do i edit to prevent specific users from accessing an ftp server?

  a. /etc/hosts.allow

  b. /etc/hosts.deny

  c. /etc/ftpacess

  d. /etc/ftpusers

  e. /etc/ftpd.conf

  you answered this question incorrectly

  explanation: the /etc/ftpusers file lists users not allowed to ftp.

  37. what file contains the configuration for the network time protocol server?

  a. /etc/ntp.conf

  b. /etc/xntp.conf

  c. /etc/ntp

  d. /etc/time.conf

  e. /etc/timeserver.conf

  you answered this question incorrectly

  explanation: the xntp server is configured in /etc/ntp.conf.

  38. you have just added a new nfs share to the appropriate file. what must you do to activate the share?

  a. reboot

  b. exportfs -a

  c. ndc restart

  d. server nfs start

  e. mount -a

  you answered this question incorrectly

  explanation: to share a directory via nfs you must edit the /etc/exports file and then run exportfs -a.

  39. what does the -h option do for the dhcpcd program?

  a. sets the hostname of the machine to the name provided by dhcp.

  b. kills any previous version of the dhcpcd program that may be running.

  c. passes the machine name to dhcp as part of the dhcp request.

  d. only tries to get a new ip address if the current one is older than a certain number of hours.

  e. none of the above

  you answered this question incorrectly

  explanation: the -h option forces dhcpcd to set the hostname of the host to the hostname option supplied by the dhcp server.

  40. what does the -n option do for the dhcpcd program?

  a. sets the hostname of the machine to the name provided by dhcp.

  b. if the dhcpcd server is already running then it sends it an alrm signal to get it to renew its lease.

  c. passes the machine name to dhcp as part of the dhcp request.

  d. only tries to get a new ip address if the current one is older than a certain number of hours.

  e. none of the above

  you answered this question incorrectly

  explanation: the -n option will an alrm signal to dhcpcd,if it is already running, to cause it to attempt to renew it’s lease.

  41. how can you create a file of all your isa plug and play device settings?

  a. pnpdump > isapnp.conf

  b. pnpdump -isa > isapnp.conf

  c. isadump > isapnp.conf

  d. cat /proc/isa

  e. isaadmin --dump >isapnp.conf

  you answered this question incorrectly

  explanation: only a is right

  42. what command allows you to switch from using gnome to using kde?

  a. xconfigurator

  b. xsetup

  c. xwindowconfig

  d. switchdesk

  e. videocfg

  you answered this question incorrectly

  explanation: the switchdesk program allows you to switch desktop enviornments and window managers.

  43. what command will turn off the ftpd service in all runlevels?

  a. chkconfig ftpd off

  b. rm /etc/rc.d/init.d/*ftpd*

  c. chkconfig --levels 12345 ftpd off

  d. service ftpd stop

  e. service ftpd stop -persistant

  you answered this question incorrectly

  explanation: the chkconfig command is used to do this. you should also know how to use ntsysv.

  foo:

  44. 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.

  you answered this question incorrectly

  explanation: either linux single or linux 1 will work at the lilo prompt. a will not work because single user mode is runlevel 1. d will only work if the default runlevel in /etc/inittab is set to 1 (which it is not normally.)

  45. you have created a /home/projectx directory with the owner of projectx and a group of projectx. how can you set its permissions so that all files created in this directory are owned by the projectx group?

  a. chown projectx.projextx /home/projectx

  b. chgrp projectx /home/projectx

  c. chmod 755 /home/projectx

  d. chmod g-s /home/projectx

  e. chmod g+s /home/projectx

  you answered this question incorrectly

  explanation: the

  46. how can you find out which ports are being used?

  a. ifconfig -a

  b. netstat -a

  c. netstat -rn

  d. ports

  e. cat /etc/services

  you answered this question incorrectly

  explanation: the netstat -a command shows you which ports are in use. a is wrong because the ifconfig -a command tells you about your nics. b is correct. c is wrong because it shows you the routing table. d doesn’t do anyting. e just shows you the etc/ports file.

  47. 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.

  you answered this question incorrectly

  explanation: when lilo just displays an l then the first stage boot loader loaded but not the second stage. if the second stage loaded then lilo would print an li. when the descriptor table is corrupt lilo prints lil-. when the second stage boot loader is loaded at an incorrect address lilo prints lil?.

  48. how do i immeadiately shut down a linux system?

  a. turn off the monitor then turn off the cpu.

  b. /sbin/stop

  c. init 6

  d. shutdown -h now

  e. none of the above

  you answered this question incorrectly

  explanation: a is wrong because you should always gracefully shut down a machine. b is wrong because there is no such command. c is wrong becauuse it will reboot the machine. hence d is correct.

  49. you want to compile a new kernel. you have just run

  a. make bzimage

  b. make dep

  c. make clean

  d. make mrproper

  e. make xconfig

  you answered this question incorrectly

  explanation: the first thing you should do in the /usr/src/linux-2.4 directory is

  make mrproper

  thencomma you should do the following: make config | make menuconfig | make xconfig

  make dep

  make clean

  make bzimage

  make modules (if modular kernel)

  make modules_install (if modular kernel)

  cp system.map /boot/system.map-2.4.17

  cp arch/i386/boot/bzimage /boot/vmlinuz-2.4.17

  cp .config /boot/config-2.4.17

  mkinitrd /boot/initrd- # depending on kernel configuration

  update lilo or grub

  reboot into new kernel

  50. 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

  you answered this question incorrectly

  explanation: the fields are: minute hour day of month month day of week command

  51. what is the correct syntax to mount an ms dos formatted floppy disk (do not assume that there is an entry in /etc/fstab)?

  a. mount /dev/floppy /mnt/fd0

  b. mount -t iso9660 /dev/fd0 /mnt/floppy

  c. mount -t vfat /dev/fd0 /mnt/floppy

  d. mount -t msdos /dev/floppy /mnt/floppy

  e. mdir

  you answered this question incorrectly

  explanation: a will only work if there is an entry in /etc/fstab. b is wrong because iso9660 is for cdrom’s. c is correct. d is wrong becuase the device should be /dev/fd0 rather than /dev/floppy.

  52. what program allows you to acess smb shares using ftp-like commmands?

  a. mount

  b. smbftp

  c. smbclient

  d. smbmount

  e. samba

  you answered this question incorrectly

  explanation: the smbclient program allows you to acess smb shares using commands similar to ftp.

  53. what command will map all of the dependencies between modules into a file?

  a. modmap

  b. depmod -a

  c. depmod --rebuild

  d. modmap --rebuild

  e. modprobe --rebuild

  you answered this question incorrectly

  explanation: the depmod -a command finds all the dependcies betwen modules and puts the information in the modules.dep file.

  54. the pcmcia card configuration file is read by cardmgr (8) at startup time. it defines what resources are available for use by card services describes how to load and initialize device drivers and describes specific pcmcia cards. where is this file located?

  a. /etc/pcmcia/config.opts

  b. /etc/sysconfig/pcmcia

  c. /etc/config.pcmcia

  d. /etc/pcmcia

  e. /etc/pcmcia/config

  you answered this question incorrectly

  explanation: the card configuration file that contains specific pcmcia files is /etc/pcmcia/config.opts.

  55. what port does the squid proxy server use by default?

  a. 80

  b. 1080

  c. 3028

  d. 3128

  e. 8080

  you answered this question incorrectly

  explanation: d is right!

  56. 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

  you answered this question incorrectly

  explanation: only c is right!

相关TAG标签
上一篇:Linux认证考试练习题
下一篇:Linux2.4内核中新增功能指南
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站