Linux-Operating-System (Set 1)
Linux-Operating-System (Set 1)
1 of 2 sets
1. What command is used to count the total number of lines, words, and characters
contained in a file?
A. countw
B. wcount
C. wc
D. count p
Answer:C
10. Which of the following command can you execute to count the number of lines
in a file?
A. lc
13. What command is used to list only the files chap0l, chap02 and chap04?
A. ls chap*
B. ls chap[124]
C. ls - x chap0[124]
D. ls chap0[124]
Answer:C
14. What command is used with vi editor to replace text from cursor to right
A. S
B. s
C. R
D. r
Answer:C
15. What command is used to sort the lines of data in a file in alphabetical order?
A. sort - r
16. What command is used with vi editor to save file and remain in the editing
mode?
A. x
B. q!
C. :w
D. :q
Answer:C
17. What command is used with vi editor to move back to the beginning of a word?
A. w
B. e
C. a
D. b
Answer:D
18. What command is used with vi editor to search a pattern in the forward
direction?
A. ??
B. //
C. ?
D. /
Answer:D
22. What X-based tool is available for configuring the X Window system?
A. XConfigurator
B. XF86Setup
C. xf86config
D. All of the above
Answer:B
23. Which of the following server is used with the BIND package?
A. httpd
B. shttp
C. dns
D. named
Answer:D
26. Which of the following command is used to access an SMB share on a Linux
system?
A. NFS
B. SMD
C. smbclient
D. smbserver
Answer:C
27. Which of the following command is used to see the services running in NFS
server?
A. rpcinfo
B. serverinfo
C. NFSinfo
D. infserv
Answer:A
28. In which tcp_wrappers file can you specify to allow all connections from all
hosts?
A. /etc/hosts.allow
B. /etc/hosts.deny
C. /etc/hosts
D. /etc/tcp.conf
Answer:A
30. What command is used to remove jobs from the print queue?
A. lpq
B. lpr
C. lprm
D. lpc
Answer:C
32. Which of the following NIS clients, finds and stores information about an NIS
domain and server?
A. ypwhich
B. ypbind
C. ypcat
D. yppoll
Answer:B
33. RPM
A. stands for Red Hat Package Manager
B. is used to install, uninstall, and manage packages
C. is used to keep track of the users
D. assigns a dynamic IP address
Answer:A
34. What command is used to query for a specific package with RPM?
A. rpm -q
B. rpm -a
C. rpm -d
D. rpm -1
36. _____ tool allows you to change your default X Window desktop.
A. utilinux
B. cempre
C. switchdesk
D. window
Answer:C
37. In what file can you specify which users are not allowed to access a system via
FTP?
A. /etc/ftpusers
B. /etc/hosts.deny
C. /etc/ftpaccess
D. All of the above
Answer:A
39. The location of some system configuration and system administrator executable
files, is:
A. /home
B. /proc
40. The location for subdirectories for local programs and executables for user and
administrative commands, is:
A. /usr
B. /tmp
C. /opt
D. /mnt
Answer:A
42. What command is used to assign executable permission to all of the files named
"report"?
A. chmod ugo + x report
B. chmod u + x report
C. chmod ugo + rw report
D. chmod ugo + r report
Answer:A
44. What command is used to count just the number of characters in a file?
A. wc - r
48. What of the following tool is used to check and repair Linux file systems?
A. mkfs
B. fdisk
C. fsck
D. mount
Answer:C
51. Which of the following command can be used to rename a file in LINUX?
A. ren
B. mv
C. remove
D. change
Answer:B
54. What command is used to sort the lines of data in a file in reverse order?
A. sort - r
57. What command is used with vi editor to move forward to the end of a word?
A. c
B. d
C. b
D. e
Answer:D
63. What command is used with vi editor to move the cursor to the left?
A. h
B. k
C. j
D. i
Answer:A
65. You just added a new user, kara, to the system. What group is kara added to by
default?
A. root
B. kara
C. group
D. user
Answer:B
66. Which of the following command lists the last 10 lines of a file?
A. grep
B. tail
C. head
D. cat
Answer:B
69. What command is used to assign only read permission to all three categories of
the file'letter'?
70. What command is used with file named 'letter' to remove the executable
permission from the user and assign read permission to the group and others?
A. chmod go + x, u - x letter
B. chmod g - x, uo + r letter
C. chmod go + r, u + x letter
D. chmod u - x, go + r letter
Answer:D
71. What command is used to assign executable permission to the owner of the file
named "letter"?
A. chmod ugo + x letter
B. chmod u + x letter
C. chmod u + w letter
D. chmod g + x letter
Answer:B
73. What command is used to list the jobs currently in print queues?
A. lpq
B. lpr
C. lprm
D. lpc
Answer:A
80. Which runlevel allows full multiuser mode but with no graphical login
manager?
A. Runlevel 1
B. Runlevel 2
C. Runlevel 3
D. Runlevel 0
Answer:C
82. How do you run a job that will continue running even if you are logged out?
A. hup.out command
B. hup command
C. jobc command
D. nohup command
Answer:D
83. What is the following syntax used for? command >file1 2>file2
A. Send command's standard output to file1,and its standard error to file2
B. Send command's standard error to file1, and its standard output to file2
C. Send command's standard error to file1, and its standard input to file2
D. Send command's standard input to file1,and its standard output to file2
84. What does the 2>&1 at the end of the following command mean?find / -name
fred.txt > names 2>&1
A. Send standard error to a file called &1
B. Append standard error to a file called &1
C. Send standard error to the same place as standard output
D. Send the output of the find command to /dev/null
Answer:C
89. What does the permission string rwxr-xr-- correspond with in octal?
A. 742
B. 754
C. 724
D. 624
Answer:B
92. How do you direct the shell to execute a command in the background?
A. Put an & symbol at the end of the command line.
B. Key in fg followed by the command name.
C. Press Ctrl+c after you have keyed in the command.
D. Press Ctrl+d after you have keyed in the command.
Answer:A
96. To display information about the processor itself - display the contents of which
file?
A. /bin/cpu
B. /dev/cpuinfo
C. /etc/cpu
D. /proc/cpuinfo
Answer:D
97. To run date first, and then ls -l, which of the following is correct?
A. date $ ls -l
B. date ; ls -l
C. date - ls -l
D. date > ls -l
Answer:B
98. Which file is the list of commands you recently entered stored in?
A. .bashrc_history
B. .history
C. .bash_history
D. .bash_list_history
99. Which of the following runs the last command you entered?
A. ~!
B. !~
C. !!
D. ..
Answer:C
100. What is the shortest command to take you to your home directory?
A. cd ~
B. cd $HOME
C. cd
D. .
Answer:C