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

trắc nghiệm về linux

27 951 2
Tài liệu đã được kiểm tra trùng lặp

Đ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

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

1.What is the most popular file system choice?5.Which command will show the number of free and used inodes for your system's mounted file systems?... None of the above Answer: C 11.Which

Trang 1

1.What is the most popular file system choice?

5.Which command will show the number of free and used inodes for your system's

mounted file systems?

Trang 2

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?

C chmod -R u=rwx,g=r,o=r /home/mrbill

D chmod u+rwx,g+r,o+r /home/mrbill

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

Trang 3

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

22.What command can be used to cause changes to the inittab file to take effect

without a system reboot?

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

Trang 4

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

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

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

Trang 5

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

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

Trang 6

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

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?

Trang 7

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

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

Trang 8

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

Trang 9

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 accomplishthis?

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

Trang 10

A cat file1.txt > file2.txt

B cat file1.txt | file2.txt

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

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?

Trang 11

A Kill PID 13459 with a signal 15

B Kill PID 13459 with a signal 1

C Kill PID 13459 with a signal 9

D None of the above

Trang 12

106.Which utility would be used to verify the checksum of a downloaded archive file?

ratas saran jacaw cabal cabin

You issue the command "ls | grep a[^b]a.", what files are returned by the command? Choose all thatapply

110.Which of the following will cause command2 not to execute if command1 fails?

A command1 & command2

B command1 && command2

Trang 13

C chmod -R u=rwx,g=r,o=r /home/mrking

D chmod u+rwx,g+r,o+r /home/mrking

118.You want to examine the changelog for the installed package “postfix”

Which command will display the changelog?

Trang 15

-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/foo from the foo user to 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: C

128.Your machine has two working NIC's with proper addresses You want to split your network into

two new subnets What single command will accomplish this?

132.You are covering for another system administrator and one of the users asks you to restore a file for

him You locate the correct tarfile by checking the backup log but you do not know how the directory

structure was stored What command can you use to determine this?

A tar fx tarfile dirname

B tar tvf tarfile filename

134 Which of the following TCP/IP network utilities is the BEST tool to use to establish if a given IP address is reachable under the current network configuration?

A ping B finger C route D host

135.How could you monitor the amount of free inodes on /dev/hda3 ?

A inode free /dev/hda3 B ls -i /dev/hda3

C du -i /dev/hda3 D dm -i /dev/hda3 E df -i /dev/hda3

136 You want to install the tarball foobar.tar.bz2 What command would unpack the achive?

A tar x foobar.tar.bz2 B untar foobar.tar.bz2 C tar tzvf foobar.tar.bz2

Trang 16

D tar xjf foobar.tar.bz2 E bzcat foobar.tar.bz2 | tar xf –

137.You have to move the whole directory-tree /home/foo to /oldusers What command would you use?

A move /home/foo /oldusers B mv /home/foo /oldusers C mv -r /home/foo /oldusers

D mv -R /home/foo /oldusers E cp move /home/foo /oldusers

138.You want to stop the inetd process immediately It has a process id of 15 How would you do this?

A kill -9 15 B kill -15 9 C kill -1 15 D kill -3 15

139 How could you display any line of text from the file foo which starts with an upcase letter?

A grep "^[A-Z]" foo B grep "[A-Z]" foo C grep "$[A-Z]" foo D grep [A-Z] foo

140.You want to list the contents of the directory “directory1” with any errors going to the file “error1” How would you do this?

A ls directory1 0>error1 B ls directory1 2>error1

C ls directory1 >error1 D ls directory1 1>error1

141.What is the default priority that processes start with?

A 1 B 100 C 0 D 10

142.What would you type to mount an MS-DOS formatted floppy (without relying on /etc/fstab shortcuts)?

A mount /mnt/floppy B mount -t msdos /mnt/floppy /dev/fd0

C mount /dev/fd0 /mnt/floppy D mount -t vfat /dev/fd0 /mnt/floppy

143 Which command creates a soft link?

A link –s B link –soft C ln –soft D ln –s

144 You have a text file named mytextfile How would you sort the lines of file in reverse alphabetical order?

A sort –a mytextfile B sort mytextfile

C sort –r mytextfile D sort –ra mytextfile

145.Using vi, you want to save changes to the file myfile with :w!, but vi complains it

cannot write to the file Therefore, you want to check the write permissions on the

file To do this without leaving vi, you type:

147.Type in the VI command line that would open the file mytestfile.txt and line number it?

Answer: vi +"set number" mytestfile.txt

Answer: -vi mytestfile.txt +"set number"

Answer: vi "+set number" mytestfile.txt

Answer: vi mytestfile.txt "+set number"

148.Select all the ways of exiting and saving a vi session

Trang 17

155.Which of the following commands is equivalent to kill 1234?

A kill -1 1234 or kill -s SIGHUP 1234

B kill -2 1234 or kill -s SIGINT 1234

C kill -3 1234 or kill -s SIGQUIT 1234

D kill -9 1234 or kill -s SIGKILL 1234

E kill -15 1234 or kill -s SIGTERM 1234

Answer: E

156.What is the default process priority when a process is started using

the nice command?

Trang 18

A The same as kill -9 1354

B The same as kill 15 1354

C The same as kill -15 1354

D The same as kill -SIGHUP 1354

E The same as kill -1 1354

Answer: D, E

160.What is the result of the command:

# kill 9 13459

A Kill PID 13459 with a signal 15

B Kill PID 13459 with a signal 1

C Kill PID 13459 with a signal 9

D None of the above

163.What will the command cd ~ Certkiller do?

A Changes directory to the user Certkiller 's home directory

B Changes to a directory named Certkiller in the current user's home directory

C Changes to directory /etc/ Certkiller

D Produces a syntax error

E None of the above

Trang 19

167.As root you have navigated to directory /B You wish to move all of the files and directories from directory /A to directory /B Which of the following options would be the most appropriate command line to execute this task?

B for " Certkiller " in [maillog (count) +1]

C wc -l /var/log/maillog | grep ' Certkiller '

D cat /var/log/maillog | grep ' Certkiller ' | wc -l

E cat /var/log/mailog | grep ' Certkiller ' | wc -r

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

B cat file | nl | tac

C cat file | tac | nl

D cat file | pr -n | reverse

E None of the above

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

TỪ KHÓA LIÊN QUAN

w