Ngân hàng câu hỏi trắc nghiệm về Linux

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

 

Ngân hàng câu hỏi trắc nghiệm về Linux trang 1

Trang 1

Ngân hàng câu hỏi trắc nghiệm về Linux trang 2

Trang 2

Ngân hàng câu hỏi trắc nghiệm về Linux trang 3

Trang 3

Ngân hàng câu hỏi trắc nghiệm về Linux trang 4

Trang 4

Ngân hàng câu hỏi trắc nghiệm về Linux trang 5

Trang 5

Ngân hàng câu hỏi trắc nghiệm về Linux trang 6

Trang 6

Ngân hàng câu hỏi trắc nghiệm về Linux trang 7

Trang 7

Ngân hàng câu hỏi trắc nghiệm về Linux trang 8

Trang 8

Ngân hàng câu hỏi trắc nghiệm về Linux trang 9

Trang 9

Ngân hàng câu hỏi trắc nghiệm về Linux trang 10

Trang 10

Tải về để xem bản đầy đủ

docx 27 trang xuanhieu 10721
Bạn đang xem 10 trang mẫu của tài liệu "Ngân hàng câu hỏi trắc nghiệm về Linux", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

Tóm tắt nội dung tài liệu: Ngân hàng câu hỏi trắc nghiệm về Linux

Ngân hàng câu hỏi trắc nghiệm về Linux
e 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
Answer: D
161.In order to append the output of ls to a file called result, which of the following command lines would you use?
A. ls > result
B. ls >& result
C. ls &> result
D. ls >> result
Answer: D
162.You need to create a simple hierarchy of irectories:images/photos/summer/ottawa/. None of the directories on that path exists. What command will create all of the needed directories in one step?
A. mkdir -r images/photos/summer/ottawa/
B. mkdir -R images/photos/summer/ottawa/
C. mkdir -p images/photos/summer/ottawa/
D. mkdir -P images/photos/summer/ottawa/
E. mkdir -m images/photos/summer/ottawa/
Answer: C
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
Answer: A
164.Which of the following commands will duplicate the contents of the /A directory in the existing and empty /B directory?
A. mv /A/* /B
B. mv /A/ /B
C. mv /A /B
D. mv /A/* .
Answer: A
165.You want to move all files in /dir1 to /dir2 that begin with a and end with v. What is the correct command to do this?
A. mv /dir1/a*v /dir2
B. mv -r /dir1/a.v /dir2
C. move /dir1/a?v /dir2
D. ls a*v | cp /dir2
E. mv /dir1/[a-v] /dir2
Answer: A
166.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
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?
A. cp /a/* .
B. mv -f /A/* .
C. mv -Rf /a/* .
D. cp -f /a/* ..
E. cp -rf /A/* /b/
Answer: B
168.Which line below would count the total number of lines with the word " Certkiller " in /var/log/maillog?
A. wc -l ' Certkiller /var/log/maillog'
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
Answer: D
169.What utility would use to remove/display columns from each line of a file?
A. pwd
B. col
C. cut
D. tail
E. extract
Answer: C
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
C. cp file1.txt > file2.txt
D. cp file1.txt file2.txt
E. cpio file2.txt
Answer: A, D
171.What command will show the last 10 lines of a file by default?
A. tail
B. head
C. cat
D. prstat
E. ps
Answer: A
172.What command will show the first 10 lines of a file by default?
A. head
B. cat
C. tac
D. nl
E. tail
Answer: A
173.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
174.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
175.Which of the following would do the same as the command cat file2.txt?
A. cat < file1.txt file2.txt
B. cat file1.txt >file2.txt
C. cat <file1.txt | file2.txt
D. cat file 1.txt | file2.txt
E. cp file1.txt>file2.txt
Answer: B
176.What command would help you identify the I/O address range being used by the network card?
A. cat/proc/modules
B. cat/proc/devices
C. cat/proc/meminfo
D. cat/io/dma
E. cat /proc/ioports
Answer: E
177.Which of the following would copy the file file1.txt to tile2.txt?
A. cp file1.txt | file2.txt
B. cat file1.txt | file2.txt
C. cat file1.txt > file2.txt
D. copy file1.txt | file2.txt
E. cat | file1.txt |file2.txt
Answer: C
178.Which of these commands would report how many total accounts (including special accounts) there are?
A. count /etc/passwd
B. nl /etc/passwd | 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 would you do this?
A. su tux2
B. su -e tux2
C. su - tux2
D. su -m tux2
E. su -f tux2
Answer: C
181.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
182.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
183.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
184.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
185.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
186.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
187.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
188.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
189.What command would execute cmd1 followed by cmd2, regardless of the exit status of cmd1?
A. cmd1 cmd2
B. cmd1 | cmd2
C. cmd1 ; cmd2
D. cmd1 && cmd2
E. cmd1 || cmd2
Answer: C
190.You want to run three commands one after the other, but don't care what exit they had. What command line would do this?
A. cmd1 cmd2 cmd3
B. cmd1, cmd2, cmd3
C. cmd1: cmd2: cmd3
D. cmd1; cmd2; cmd3
Answer: D
191.What symbol can be placed at the end of a line to indicate that the command continues on the next line?
A. /
B. \
C. ;
D. |
E. :
Answer: B
192.Which command will print line numbers before each line in a file?
A. ln
B. nl
C. cat -n
D. numline
Answer: C
193.In order to append the output of ls to a file called bazz, which of the following
command lines would you use?
A. ls > bazz
B. ls >& bazz
C. ls &> bazz
D. ls >> bazz
Answer: D
194.Which shell built-in command can be used to create a shortcut or
pseudonym for a longer command? Assume a modern bourne-like shell,
such as bash.
A. shortcut
B. ln
C. sudo
D. link
E. alias
Answer: E
195.In which file are you likely to find the settings for umask, path, and ulimit on a per
user basis?
A. /etc/profile
B. /etc/bashrc
C. ~/.bash_profile
D. ~/.bashrc
Answer: C
196.Which of the following are executed ONLY during a Login session? Select all that
apply.
A. /etc/profile
B. /etc/bashrc
C. ~/.bashrc
D. ~/.bash_profile
E. ~/.bash_logout
Answer: A, B, D
197.You installed a beta rpm package, but are experiencing some problems with it. How can you remove this package?
A. rpm -qe rpmname
B. rpm -V --remove rpmname
C. rpm -r rpmname
D. rpm -d rpmname
E. rpm -ev rpmname
Answer: E
198.You want to search the file myfile for all occurrences of a string containing at least five characters, where character number 2 and 5 are "a" and character number 3 is NOT "b". Which command would 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 output while trying to install an updated package:
[root@example pub]# rpm -i gthumb-2.2.0.i386.rpm package gthumb-
1.0.1.i386.rpm is already installed.
Which command will allow you to install the updated version?
A. rpm -i gthumb-2.2.0.i386.rpm
B. rpm -ivh gthumb-2.2.0.i386.rpm
C. rpm -U gthumb-2.2.0.i3S6.rpm
D. rpm -qu gthumb-2.2.0.i386.rpm
E. rpm -qiv gthumb-2.2.0.i386.rpm
Answer: C
201.You want to preview where the package file, apache- xml.I386.rpm, will install its files before installing it. What command do you issue?
A. rpm -qp apache-xml.i386.rpm
B. rpm -qv apache-xml.i386.rpm
C. rpm -ql apache-xml.i386.rpm
D. rpm -qpl apache-xml.i386.rpm
Answer: D
202.You have an updated RPM called screensaver-1.1.i386. rpm. You
have version 1.0 installed. Using RPM, how do you view the changelog of
this file to see if you should install the update?
A. rpm -qp --changelog screensaver-1.1.i386. rpm
B. rpm --changelog screensaver-1.1.i386. rpm
C. rpm -qc screensaver-1.1.i386. rpm
D. rpm -showchangelog screensaver-1.1.i386. rpm
Answer: B
203.Which command will allow you to find a specific installed package?
A. rpm -- list rpmname
B. rpm -qvl rpmname
C. rpm rpmname
D. rpm -qv rpmname
E. rpm -f rpmname
Answer: D
204.How can you update a package only if an earlier version is currently installed on the system?
A. rmp -- update rpmname
B. rpm -U rpmname
C. rpm -F rpmname
D. rpm -- force rpmname
E. rpm -u rpmname
Answer: C
205.Which command will create a complete report which you can analyze for changes which may be security related?
A. rpm -Va >report
B. rpm -Qavy >report
C. rpm -Vqt --nomd5 >report
D. rpm --checkfiles >report
E. rpm -Va --nofiles >report
Answer: A
206.Which RPM command would produce the following output
Name : xwhois Relocations: (not relocatable)
Version : 0.3.7 Vendor: Certkiller
Release : 1 Build Data: Fri 06 Aug 1999 0907 AM EDT
Install date: (not installed) Build Host:
desktop.infohvy.com
Group : Application/Internet Source RPM: (none)
Size : 74057 License: GPL
Packager : Ryan Weaver 
URL : [Only registered and activated users can see links. ]
Summary : X Windows Whois Tool
Description: xwhois is a small and fast query tool for the
whois service. (rfc954)
xwhois-0.3.7.tar.gz
xwhois.spec
A. rpm -qpil xwhois-0.3.7-1.src-rpm
B. rpm-qx xwhois
C. rpm-Vf xwhois-0.3.7-1.src.rpm
D. rpm-verify xwhois-0.3.7-1.src.rpm
E. rpm-showheaders xwhois-0.3.7-1.src.rpm
Answer: A
207.You want to examine the changelog for the installed package "postfix".
Which command will display the changelog?
A. rpm -Vc postfix
B. rpm -qpil postfix
C. rpm --changelog postfix
D. rpm -q --changelog postfix
E. rpm -qa --changelog postfix
Answer: D
208.You need to know where all the configuration files for the installed package named "postfix" are located.
Assuming it was installed with rpm, which command will list this information for
you?
A. rpm -qc postfix
B. rpm -Vc postfix
C. prm --config postfix
D. rpm -listconfig postfix
E. prm -qa --config postfix
Answer: A
209.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
210.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
211.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
212.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
213.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
214.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
215.You are installing a program that is only available as source code. Which of the following commands would be best to add system specific configuration information such as the default installation directory?
A. ./make
B. ./install
C. ./makefile
D. ./configure
Answer: D
216.The command for most applications to install compiled source via the Makefile is:
A. make
B. install
C. configure
D. make depend
E. make install
Answer: E
217.Which command cannot normally be executed by a non-root user when compiling an application?
A. make
B. makefile
C. ./configure
D. make install
Answer: D
218.What run level represents administration mode?
A. 0
B. 1
C. 6
D. 5
Answer: B
219.What run level represents a power down?
A. 5
B. 0
C. 1
D. 4
220.What run level represents a system reboot?
A. 6
B. 1
C. 2
D. 5
Answer: A
221.Which of the following can be used to switch your system to run level 3?
A. init 3
B. 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, 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 first IDE controller on a PC system.
A. /dev/hdb3
B. /dev/hd1b3
C. /dev/hdc1b3
D. /dev/hdc1d2p3
Answer: A
227.Which of the following device files would represent a USB disk?
A. /dev/sda
B. /dev/scsia
C. /dev/hda
D. /dev/sd0
E. /dev/scsi0
Answer: A
228.How many SCSI ids for peripherals can SCSI-1 support?
A. 5
B. 6
C. 7
D. 8
Answer: C 

File đính kèm:

  • docxngan_hang_cau_hoi_trac_nghiem_ve_linux.docx