Thứ Ba, 12 tháng 6, 2012

Trắc nghiệm kiến thức cơ bản về Unix/Linux

Trong bài này, chúng ta sẽ đến với 40 câu trắc nghiệm về OS Unix và một số vấn đề liên quan đến Linux. 

UNIX 

1. Which command is used to change your password?

a./ password
b./ pass
c./ passwd
d./ pwd

2. Which command will display a calendar?

a./ cal
b./ dis cal
c./ view cal
d./ calendar

3. Which command can be used to display the contents of a file on the screen?

a./ ls
b./ grep
c./ dog
d./ cat

4. Which command allows you to determine if a host is connected to the Internet?

a./ ls-la
b./ cmd
c./ pwd
d./ ping

5. Which command would you use to create a sub-directory in your home directory?

a./ mkdir
b./ dir
c./ cp
d./ rm

6. The wc command will report all misspelled words.

a./ True
b./ False

7. To change access modes on files you can use the chmod command.

a./ True
b./ False

8. _____________ is the command that writes the first 10 lines of a file to the screen.

a./ pr
b./ split
c./ tail
d./ head

9. The ________ command will display the absolute pathname for the directory that you are wokring 



a./ in.
b./ dir
c./ whereami
d./ pwd 
e./ ls

10. Which of the following is true?

a./ UNIX is a widely used mail system.
b./ UNIX is case sensitive.
c./ UNIX has a graphical user interface. 
d./ All of the above are true.

11. To list the permissions on files, which of the following commands will work?

a./ ls
b./ ls –a
c./ ls –l
d./ more –al

12. How can you view the permission-settings on all files in the current directory?

a./ ls-l
b./ displayall
c./ listall
d./ listdir

13. When creating a directory, which of the following is true?

a./ The default permissions are: r w x - - - - - -
b./ You must be in your home directory.
c./ You use the pico Unix command to create a directory
d./ The directory name must end in _html

14. The file assign4.html has permissions set as r w x r w x r w x

a./ The file is really a directory and was named incorrectly.
b./ It is impossible for an html file to have permissions set that way.
c./ Everyone can read, write, and execute the file.
d./ The file can not be viewed on the WWW.

15. The command "ls -d" will list out what for you?

a./ nameofthefile
b./ musicfile
c./ filedirectories
d./ thedirectories

16. Which command will display a calendar?

a./ calendar
b./ dis cal
c./ view cal
d./ cal

17. What will the command "ls -" list?

a./ filesincurrentdirectory
b./ directory
c./ files
d./ files

18. Which command allows you to determine if a host is connected to the Internet?

a./ cmd
b./ ls-la
c./ ping
d./ pwd

19. Which command would you use to create a sub-directory in your home directory?

a./ mkdir
b./ dir
c./ cp
d./ rm

20. Typing in "!!" will do what exactly?

a./ printoutarowoff
b./ giveuerror
c./ repeatthelastcommand
d./ delete

LINUX

1. You forget the root password. You decide to reboot using a boot disk floppy. What do you need to do to recover the root password?

a. Mount the main partition, edit the /etc/passwd file to remove the root password, reboot.
b. Mount the root partition, edit the /etc/passwd file to remove the root password, reboot.
c. Mount the main partition, edit the /tmp/passwd file to remove the root password, reboot
d. Mount the root partition, edit the /etc/passwds file to remove the root password, reboot
e. none of the above

2. The previous system administrator put useless messages at login, what file do you edit to change the system message?

a. /etc/motd
b. /etc/str
c. /etc/strtms
d. /etc/.conf

3. Users on your network cannot print to a Linux printer. You decide to restart the printer daemon, which command would achieve that?

a. topq printer-name
b. enable printer-name
c. restart printer-name
d. up printer-name

4. Which file does Linux use to resolve hostnames?

a. /etc/hostname.conf
b. /etc/dns.conf
c. /etc/host.conf
d. /etc/resolve.conf

5. What is "tin"?

a. Terminal Interpreter
b. The command to change the time
c. The command to compare text files
d. A newsreader

6. What are the file attributes for executing Perl programs?

a. 666
b. 755
c. 766
d. 777

7. What is bash?

a. Something you do to a watermelon
b. A command to delete multiple files
c. A network bit format
d. A command shell

8. What is the DOS LPT1 port in Linux?

a. /dev/lpt0
b. /dev/lpt1
c. /dev/lp0
d. /dev/lp1
e. DOSLPT1

9. What is the minimum memory requirements for XFree86?

a. 640K
b. 2MB
c. 4MB
d. 8MB
e. 16MB

10. You attempt to remove a directory, but Linux won't allow you, what is the most likely problem?

a. The directory name contains illegal characters
b. You are not logged in as root
c. The hard disk is full
d. The directory is not empty
e. None are likely problems

11. From a command prompt, what does the command "ls" do?

a. Lists the settings of the OS
b. Lists the contents of the directory
c. List command to list contents of files
d. Finnish words, means to direct a file to a port
e. None of the Above

12. Which command creates a file system?

a. fdisk
b. crfs
c. mkfs
d. fs

13. What is the default administrator username?

a. administrator
b. admin
c. superuser
d. root
e. head

14. Which of the following are valid Linux wildcards? (Choose all that apply)

a. * and ?
b. /
c. ?
d. &
e. Z

15. What does the command "ps" do?

a. Prints the directory
b. Shows what processes are running
c. Print status of LPT1
d. Produces system statistics
e. None of the above

16. You are working in Linux when a program hits a flaw and stops running. Which command can be used to end the process?

a. kill
b. stop
c. end
d. wait
e. CTL-ALT-DEL

17. A user is logged into the Linux workstation, what is the best way to login to root from a shell prompt?

a. login root
b. chuser root
c. su
d. root

18. Linux allows filenames up to what number of characters?

a. 8
b. 11
c. 256
d. 512
e. Unlimited

19. T/F: The command "pwd" displays the directory

a. True
b. False

20. T/F: To move files, use the "move" command.

a. True
b. False

Editor: Vương L. Kiều (Baomathethong.blogspot.com)
Copyrighted Content: N/A

Không có nhận xét nào:

Đăng nhận xét