Tuesday, February 10, 2015

Linux question bank with answers

Choose the best option:

1.What is the command  used to see the help pages in Linux?
 a) man            b) help             c) helppages                d) all the above

2. ifconfig is the command is used for ______________
a) shutting down the computer
b) pinging the other machine
c) knowing the ipaddress of the specified machine
d) restarting the machine

3. What are the new features of Redhat Enterprise Linux 5?
a) YUM
b) Xen
c) no new features
d) both a & b

4. Choose the purpose for the command 'wall'.
a) installing a package
b) restarting the remote machine
c) sending the messages to all terminals
d) all the above

5. What is the expansion for rpm in RHEL5?
a) Redhat Print Manger
b) Resolutions Per Minute
c) Remote Print Manager
d) Redhat Package Manager

6. What do you mean by kernel?
a) operating system
b) core operating system
c) hardware
d) all the above

7. What was the origin of Linux operating system?
a) C language
b) Bell Laboratory
c) minix and Linus Torvalds
d) All the above

8. What are the partitions required for installing Linux in general?
a) swap
b) /
c) /yourname
d) a & b

9. What are the boot loaders available?
a) grub
b) lilo
c) a & b
d) boot.ini

10. Pick the oldest linux boot loader.
a) lilo
b) grub
c) ntldr
d) boot.ini

11. Give the expansion of the lilo boot loader
a) linux locator
b) linux loader
c) linux load boot
d) linux locate boot

12. Which one is the suitable expansion of the loader grub
a) GRand Unified Boot loader
b) GRand Unix Boot loader
c) GRand Ultimate Boot loader
d) GRand Usage Boot loader

13. Pick out the remote installation methods of Linux operating system
a) HTTP installation
b) NFS installation
c) FTP installation
d) All the above

14. What do you mean by packages in linux?
a) the important installation files (rpm files)
b) exe files
c) dll files
d) All the above

15. Answer the statements are true or not.
1.    All are text files (including hardware) in Linux.
2.    Every thing what you are using is a process.
a) First statement is true.
b) Second statement is true.
c) Both 1 & 2 are true.
d) Both 1 & 2 are false.

16. What is a shell?
a)  is a program that is used for giving inputs to the machine.
b) is a third party software for doing programs.
c) is a virus
d) None of the above
17. Pick out the editor
a) vi editor
b) vim editor
c) nano editor
d) All the above

18.What is shell script?
a) is a snippet that is used to perform a specified task.
b) is a virus
c) is an another flavour of Linux
d) none of the above

19. --------- is the flavour of Linux.
a) Zoombra
b) Fedora
c) Cobra
d) Anaconda

20. Ubuntu is derived from -------------.
a) Debian
b) Slackware
c) Knoppix
d) Solaris

21. Pick the desktops available in Linux.
a)GNOME
b)KDE
c) both a & b
d) none of the above

22. What is the command for viewing date and time in the terminal?
a) date
b) time
c) date | time
d) none of the above

23. How many CUI terminals are present in Linux operating system?
a) 6
b) 7
c) 12
d) 5

24. Say true or false
1.    Mac is a flavour of Linux
2.    Mac is developed by Apple
a) statement 1 is true
b) statement 2 is true
c) 1 & 2 are true
d) both are false
25. -------- file systems are used in Linux.
a) ext2
b) ext3
c) swap
d) all the above

26. ---------- file system does not have journaling support.
a) ext3
b) ext2
c) swap
d) All the above

27. Which command do you use to create swap space?
a) mkswap
b) activeswap
c) swapon
d) initswap

28. What type of packet does the IP ping use (provide acronym)?
a) IGMP
b) ICMP
c) IDMP
d) TCP /IP

29. To learn more about the management of an internet site the best utiltity to use would be:
a) whois
b) traceroute
c) ping
d) ping6

30. What is the command to check whether the router is working properly or not?
a) ping6
b) ping
c) wall
d) traceroute

31. Pick out the command that is used for whether ipforwarding is enabled or not?
a) cat /proc/sys/net/ipv4/ip_forward
b) ping
c) netstat
d) traceroute

32. What file is used for associating port numbers to portnames?
a) /etc/samba/smb.conf
b) /etc/squid/squid.conf
c) /etc/services
d) /etc/grub.conf

33. Which file can you prevent non-root users from logging into the system? (specify the path and the file name)
a) /etc/login
b) /etc/nologin
c) /etc/nologon
d) /etc/logon

34. What command can be used for formatted output of the wtmp file? (no arguments)
a) last
b) first
c) recent
d) alias

35. What command can be sued to switch user from one user?
a) switch
b) su
c) suser
d) none of the above

36. Give the expansion of CUPS.
a) Customized Unix Print Service
b) Common Unix Print Service
c) Common Unix Print Server
d) Customized Unix Print Server

37. What does CUPS relate to?
a) General unix services
b) Unix samba services
c) Printer services
d) All the above

38. What is the port number of the service DNS?
a) 43
b) 53
c) 54
d) 67

39. What is the purpose of zip & unzip commands in Linux?
a) compressing
b) decompressing
c) both a & b
d) none of the above

40. Which of these commands could you use to show one page of output at a time?
a) more
b) grep
c) sed
d) pause

41. Which commands will give you information about how much disk space each file in the current directory uses?
a) ls -l
b) ls -la
c) du .
d) ls -a

42. What command would send the output of cmd1 to the input of cmd2?
a) cmd1 | cmd2
b) cmd1 || cmd2
c) cmd1 && cmd2
d) cmd1 ; cmd2

43. What is the 'man' command used for?
a) to display information about the syntax for a command
b) it is the replacement for the 'boy' command
c) it is a standard alias to 'ls -la | more'
d) it is used to display formatted html pages
44. Having booted into run level 3, how would you change to run level 5 without rebooting?
a) telinit 5
b) startx
c) run 5
d) ALT-F7-5

45. What command is used for finding current directory?
a) pwd
b) cwd
c) ewd
d) none of the above

46. What is the purpose of cp command?
a) for copying files
b) deleting the files
c) moving the files
d) all the above

47. Which command can be used for moving files?
a) cp <src file> <dst file>
b) mv <src location> <dst location>
c) both a & b
d) none of the above

48. What is the command to view hidden files in a directory?
a) ls
b) ls -a
c) ls -l
d) ls -i

49. What is the purpose of touch command?
a) updating the time stamp
b) create dummy files
c) both a & b
d) none of the above

50. How can stop a process?
a) kill <process id>
b) stop <process id>
c) pause <process id>
d) All the above

51. What are the files will be touched in the case of creating one user?
a) /etc/passwd
b) /etc/shadow
c) /etc/group
d) all the above

52. Which file has the encrypted password of the user?
a) /etc/passwd
b) /etc/shadow
c) /etc/group
d) all the above

53. Say the statements are true or not:
1.    if you create a user a group will be created.
2.    The mail account of the user will also be created.
a) statement 1 is true
b) statement 2 is true
c) both are true
d) both are false

54. What is the command to change the home directory of the user?
a) rm /etc/home <home dir path>  <username>
b) useradd -d /<home dir path>  <username>
c) useradd -c /<home dir path>  <username>
d) useradd -r /<home dir path>  <username>

55. ------------- is the command to delete the user name only.
a) userdel -d <username>
b) userdel <username>
c) userdel -r <username>
d) userdel -c <username>

56.  ------------- is the command to delete the user name and his home folder.
a) userdel -d <username>
b) userdel <username>
c) userdel -r <username>
d) userdel -c <username>

57. Say the statements are true or not.
1.    swap partition does not have a mount point.
2.    swap partition can be the file.
3.    swap is for virtual memory.
4.    it will be 1.5 to 2 size of the RAM usually.
a) All are false.
b) 1 & 2 are true. 
c) 3 & 4 are true.
d) All are true.

58. ---------- partitions should be given at the time of installation.
a) / and swap
b) /home, / and swap
c) /, /home, swap and /var
d) all the above

59. ---------- is the command for installing grub loader in the case of rescue mode.
a) grub-install
b) grub
c) install-grub
d) all the above

60. Which are know as shortcuts in Linux?
a) soft links
b) hard links
c) symbolic links
d) both a & c

61. How much size will be occupied by the soft links?
a) it is taking the number of character of the soft link name.
b) it is taking the number of character of the original file name.
c) it is taking the number of character of the original path name.
d) it is taking the number of character of the inode number.

62. What command can be used for getting cpu information of a machine?
a) cat /cpuinfo
b) cat /proc/cpuinfo
c) cat /etc/cpuinfo
d) cat /boot/cpuinfo

63. What command can be used for formatting a partition in Linux?
a) mkfs.ext2
b) mkfs.ext3
c) mke2fs
d) All the above

64. What is the command used for checking the file system?
a) man
b) cat
c) fsck
d) none of the above

65. What are the features of linux?
a) Stability
b) Virus Proof
c) Strong Cryptography
d) All the above

66. In ----- year linux kernel 1.0 is launched.
a) 1995
b) 1994
c) 1997
d) 2001

67. What is the expansion of BASH shell?
a) Bourne Again SHell
b) Bourne Agent SHell
c) Bourne Agency SHell
d) None of the above

68. What is the expansion of KDE?
a) Kool Desktop Environment
b) K Desktop Environment
c) Kuzdu Desktop Environment
d) All the above

69. Which option will not corrupt the previous installation of the operating system while installing the new version of linux?
a) Remove all Linux partitions on this system
b) Remove all partitions on this system
c) Keep all partitions and use existing free space
d) All the above

70. Pick out the disk partition utility in Linux
a) Disk Druid
b) Disk Management
c) Disk Manager
d) Partition Manager

71. --------- command can be used for changing the password
a) passwd
b) password
c) setpasswd
d) both a & c

72. Where will the configuration files placed?
a) /etc
b) /bin
c) /home
d) /mnt



73. What is the purpose of /mnt directory?
a) storing configuration files
b) running scripts
c) empty directory for mounting
d) none of the above

74. ------ is the home directory of the user root
a) /
b) /root
c) /home/root
d) /etc/root

75. -------- is the virtual file system that indicating the processes in Linux.
a)  /proc
b) /etc/proc
c) /proc/cpuinfo
d) /proc/virtual

76. What is the purpose /tmp directory
a) storing temporary files
b) containing some default unix socket files
c) both a &b
d) none of the above

77. -------- is the command used for create a directory
a) mkdir
b) rmdir
c) chdir
d) none of the above

78. Which command can be used for deleting the directory & its contains?
a) rmdir
b) rm -rf
c) removedir
d) both a & b

79. cat command is used for --------
a) creating a new file
b) viewing the content of a specified file
c) concatenating two files
d) all the above

80. What is the purpose of head and tail commands in Linux?
a) it will delete the first and last 10 lines of the file specified
b) it will display the first and last 10 lines of a file
c) no such command in Linux
d) It is available only in demo version for the option (a) purpose

81. ------ is the command for checking spelling
a) aspell
b) spell
c) spellchek
d) no spell check is in Linux

82. What is the use of pipe ( | ) in linux?
a) let you direct output from one command to become the input to another command
b) create multiple pipe lines which is a very powerful feature in unix system
c) both a & b
d) none of the above

83. ------- command is used for setting priority for the process.
a) nice
b) setprior
c) both a & b
d) none of the above

84. What is the purpose of du command?
a) disk usage
b) disk utility
c) disk ultimatum
d) all the above

85. To update the slocate database you need to use ----------- command.
a) slocate update
b) locate update
c) update locate
d) updatedb

86. Pick the command that is used to unmount the mount point.
a) mount
b) umount
c) unmount
d) dismount

87. The modes of the vi editor are
a) inpute mode
b) comman mode
c) ex mode
d) all the above

88. How do you disable the password of the particular username?
a) usermod  <username>
b) userdel <username>
c) userpasswd <username>
d) passwd <username>

89. What is the option for the maximum number of days a password should stay valid?
a) chage -M 30 username
b) passwd - M 30 username
c) both a & b
d) none of the above

90. What command can be used to convert shadow passwords to normal passwords?
a) pwconv
b) pwunconv
c) both a & b
d) no such provision in Linux

91. What is the purpose of pwconv command in Linux?
a) to convert normal passwords to shadow passwords.
b) to convert shadow passwords to normal passwords
c) no such command in Linux
d) both a  & b

92. Pick the command that is used for group is concerned.
a) grpunconv
b) grpconv
c) groupdel
d) all the above

93. sudoers are otherwise called as ------.
a) co-administrators
b) co-doers
c) both a & b
d) none of the above

94. What is the command used for doing sudo?
a) sudo
b) sudoers
c) visudo
d) all the above

95. -------- command is used for changing the ownership of the file or direcory
a) chown
b) chgrp
c) chmod
d) all the above

96. Match the following
           
1.    read permission                       2
2.    write permission                      1
3.    execute permission                  4

97. Give the expansion of SGID.
a) Set Group ID
b) Set Global ID
c) Set Globe ID
d) All the above

98. ------ command changes the file attributes on a Linux second extended file system.
a) attr
b) chattr
c) setattr
d) none of the above

99. Pick the commands that are related to access control list.
a) getfacl
b) setfacl
c) a & b
d) none of the above

100. Say true or false
1.    There is no group quota in Linux.
2.    There is user quote only available for /home only
a) both are true
b) both are false
c) not valid for any OS
d) none of the above

101. ------- command is used for checking the quota table.
a) edquota
b) repquota
c) both a & b
d) none of the above

102. ------- command is used for setting the quota table.
a) edquota
b) repquota
c) both a & b
d) none of the above

103. Which command is used for scheduling in Linux?
a) crontab
b) at
c) both a & b
d) none of the above

104. Pick out the qualities of RPM.
a) Upgradability
b) Powerful querying
c) system verification
d) All the above

105. What is the port number for Print sever through samba server?
a) 600
b) 631
c) both a & b
d) none of the above

106. Where is the boot loader of linux present?
a) /etc/grub.conf
b) /boot/grub/grub.conf
c) both a & b
d) none of the above

107. What do you mean by initrd?
a) initial RAM disk
b) initiated RAM disk
c) both a &b
d) none of the above

108. What is the purpose of /etc/fstab file?
a) to enter the permanent mount points and file systems
b) to enter virus information
c) both a & b
d) none of the above

109. How many options are available in /etc/fstab file?
a) 6
b) 5
c) 4
d) 7

110. Which file is using for fixing the runlevel of the Linux operating system?
a) /etc/grub.conf
b) /etc/inittab
c) /etc/passwd
d) /etc/shadow

111. Pick the shutdown command in Linux.
a) halt
b) shutdown -h now
c) init 0
d) All the above

112. Give the expansion of LVM
a) Local Volume Management
b) Logical Volume Manager
c) Local Volume Manager
d) All the above

113. What is purpose of pvdisplay command in RHEL5?
a) it used to view the physical volume links.
b) it used to view the logical volume links
c) it used for both a & b
d) none of the above

114. pick out the commands that are used for viewing logical volumes.
a) pvs
b) lvs
c) lvdisplay
d) both b & c

115. Which RAID is known as mirroring?
a) level 0
b) level 1
c) level 5
d) level 10

116. Pick out the command that is used for raiding in RHEL5.
a) mdadm
b) admdm
c) both a& b
d) none of the above

117. Pick out the write command for removing the RAID partitions.
a) mdadm –stop
b) mdadm –zero-superblock /dev/hda8 /dev/hda9
c) both a&b
d) none of the above

118. What is the command used for viewing the loaded kernel modules in RHEL5?
a) lsmod
b) msmod
c) both a &b
d) none of the above

119. What command can be used for checking the network connectivity?
a) eth
b) ifup eth0
c) ethtool
d) all the above

120. Pick out the remote login shells.
a) SSH
b) telnet
c) putty (third party tool)
d) all the above

121. What is the purpose of secure copy?
a) it is used to copy one file from remote location in a secure manner.
b) it is used to copy a local file in a secure manner
c) it is not for real copying. It will create a shortcut.
d) none of the above

122. What do you mean by kickstart file?
a) It is for booting the machine
b) it is checking the bios errors
c) it is the answer file for installing a new version of OS
d)all the above

123. What is the purpose of DHCP server?
a) to provide ip addresses automatically to all clients.
b) to give names to all clients
c) to give mac addresses automatically to all the clients.
d) all the above

124. Pick up the service that has to be started for running FTP server.
a) lftp
b) ftp
c) vsftpd
d) both b &c

125. Pick the purpose of linux askmethod.
a) it is installation method with cd rom
b) it is installation method with hard disk
c) it is installation method with network
d) none of the above

126. What do you mean by DNS?
a) It is a name server that is used for linking between ipaddresses to names and the reverse
b) it is having reverse lookup zone and records
c) it is having forward lookup zone and records
d) All the above

127. Where the port numbers can be seen in RHEL5?
a) port number cannot be viewed
b) it can be viewed in windows and mac os only
c) it can be seen in /etc/portnums
d) it can be seen in /etc/services

128. How will the Linux be the virus proof operating system?
a) the ports are closed
b) the end user cannot access the system resources for stopping some services directly
c) it is very flexible.
d) all the above

129. The ------ files can not be played directly in the RHEL5.
a) audio cd files.
b) mp3
c) both a &b
d) none of the above

130. Match the following
a) fdisk                        -           i) encrypted passwords
b) uname                     -           ii) user names
c) /etc/passwd             -           iii) formatting
d) /etc/shadow                        -           iv) viewing the kernel

131. In RHEL5 desktop and Desktop are same?
a) yes both are same
b) not same
c) may be
d) not be determined.

132. Pick out the flavor of Linux.
a) ubuntu
b) slackware
c) suse
d) all the above

133. Which can be used for web based service installation?
a) webmin
b) samba
c) swat
d) adminserv

134. What is the purpose of MX record in DNS?
a) mail sending
b) mail receiving
c) mail exchange record
d) all the above

135. DNS server is otherwise known as -----------.
a) name server
b) BIND server
c) both a & b
d) none of the above

136. Which language is used for the development of Linux OS?
a) C
b) java
c) perl
d) all the above

137. Which person was the team leader of the Linux OS project?
a) Karl Pearson
b) Sam Jackson
c) Linus Torvalds
d) All the above

138. What is the command for viewing all the process in the particular machine?
a) top
b) bottom
c) left
d) right

139. pick out the command for rebooting the machine?
a) reboot
b) reboot -f
c) init 6
d) all the above

140. Which command can be used for detecting the hardware and boot information
a) dmesg
b) kernel
c) grub
d) none of the above

141. How DHCP server is working?
a) It is working with DNS server
b) It is working under DORA process
c) It is working with ADS
d) None of the above

142. ----- command is used for updating the time stamp.
a) hang
b) touch
c) halt
d) spot

143. -------- command is used for creating a dummy file with no contents.
a) hang
b) touch
c) halt
d) spot

144. What is the purpose of chkconfig command in RHEL5?
a) It is the command used for saving up a particular configuration
b) It is the command used for deleting up a particular configuration
c) It is the command used for restarting a particular configuration
d) All the above

145. Does RHEL5 support IPV6?
a) no
b) yes
c) may be
d) not be determined

146. Where will be the Nfs files stored usually in RHEL5?
a) /var/ftp/pub
b) /etc/passwd
c) /etc/group
d) /etc/nfs

147. Should it be the same /var/ftp/pub location always?
a) no
b) yes
c) may be
d) can't say

148. Which file is touched for changing the welcome message in the terminal?
a) /etc/passwd
b) /etc/message
c) /etc/motd
d) none of the above

149. which file is touched for changing the display message in the top of login?
a) /etc/motd
b) /etc/issue
c) /etc/message
d) /etc/shadow

150. Which command is used for viewing hidden files and inode numbers?
a) ls -l
b) ls -a
c) ls -lai
d) pwd.

Answers:

1.    a) man
2.    c) knowing the ipaddress of the specified machine
3.    d) both a & b
4.    c) sending the messages to all terminals
5.    d) Redhat Package Manager
6.    b) core operating system
7.    d) All the above
8.    d) a & b
9.    c) a & b
10.  a) lilo
11.  b) linux loader
12.  a) GRand Unified Boot loader
13.  d) All the above
14.  a) the important installation files (rpm files)
15.  c) Both 1 & 2 are true.
16.  a)  is a program that is used for giving inputs to the machine.
17.  d) All the above
18.  a) is a snippet that is used to perform a specified task.
19.  b) Fedora
20.  a) Debian
21.  c) both a & b
22.  a) date
23.  a) 6
24.  b) statement 2 is true
25.  d) all the above
26.  b) ext2
27.  a) mkswap
28.  b) ICMP
29.  a) whois
30.  d) traceroute
31.  a) cat /proc/sys/net/ipv4/ip_forward
32.  c) /etc/services
33.  b) /etc/nologin
34.  a) last
35.  b) su
36.  b) Common Unix Print Service
37.  c) Printer services
38.  b) 53
39.  c) both a & b
40.  a) more
41.  c) du .
42.  c) cmd1 && cmd2
43.  a) to display information about the syntax for a command
44.  b) startx
45.  a) pwd
46.  a) for copying files
47.  b) mv <src location> <dst location>
48.  b) ls -a
49.  c) both a & b
50.  a) kill <process id>
51.  d) all the above
52.  b) /etc/shadow
53.  c) both are true
54.  b) useradd -d /<home dir path>  <username>
55.  b) userdel <username>
56.  c) userdel -r <username>
57.  d) All are true.
58.  a) / and swap
59.  a) grub-install
60.  d) both a & c
61.  a) it is taking the number of character of the soft link name.
62.  b) cat /proc/cpuinfo
63.  d) All the above
64.  c) fsck
65.  d) All the above
66.  b) 1994
67.  a) Bourne Again Shell
68.  b) K Desktop Environment
69.  c) Keep all partitions and use existing free space
70.  a) Disk Druid
71.  a) passwd
72.  a) /etc
73.  c) empty directory for mounting
74.  a) /
75.  a)  /proc
76.  c) both a &b
77.  a) mkdir
78.  b) rm -rf
79.  d) all the above
80.  b) it will display the first and last 10 lines of a file
81.  a) aspell
82.  c) both a & b
83.  a) nice
84.  a) disk usage
85.  d) updatedb
86.  b) umount
87.  d) all the above
88.  d) passwd <username>
89.  a) chage -M 30 username
90.  b) pwunconv
91.  a) to convert normal passwords to shadow passwords.
92.  d) all the above
93.  a) co-administrators
94.  c) visudo
95.  d) all the above
96.  read – 4, write – 2, execute – 1
97.  a) Set Group ID
98.  b) chattr
99.  c) a & b
100.       b) both are false
101.       b) repquota
102.       a) edquota
103.       c) both a & b
104.       d) All the above
105.       b) 631
106.       c) both a & b
107.       a) initial RAM disk
108.       a) to enter the permanent mount points and file systems
109.       a) 6
110.       b) /etc/inittab
111.       d) All the above
112.       b) Logical Volume Manager
113.       a) it used to view the physical volume links.
114.       d) both b & c
115.       b) level 1
116.       a) mdadm
117.       c) both a&b
118.       a) lsmod
119.       c) ethtool
120.       d) all the above
121.       a) it is used to copy one file from remote location in a secure manner.
122.       c) it is the answer file for installing a new version of OS
123.       a) to provide ip addresses automatically to all clients.
124.       c) vsftpd
125.       c) it is installation method with network
126.       d) All the above
127.       d) it can be seen in /etc/services
128.       d) all the above
129.       b) mp3
130.       a-iii, b-iv, c-ii, d-i
131.       b) not same
132.       d) all the above
133.       a) webmin
134.       c) mail exchange record
135.       c) both a & b
136.       a) C
137.       c) Linus Torvalds
138.       a) top
139.       d) all the above
140.       a) dmesg
141.       b) It is working under DORA process
142.       b) touch
143.       b) touch
144.       a) It is the command used for saving up a particular configuration
145.       b) yes
146.       a) /var/ftp/pub
147.       a) no
148.       c) /etc/motd
149.       b) /etc/issue
150.       c) ls -lai 

0 Comments: