Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Linux MCQ

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

1. A ____ is the central component of an operating system.

Ans. Kernel

2. Linux distributions are Unix-like operating systems usually built on top of Linux
kernel. (True/False)
Ans. True

3. ____ is sponsored by Red Hat. (Pick the right option)


a) Fedora Linux
b) SuSE Linux
c) Lycoris Linux
d) Xandros Linux
Ans. Fedora Linux

4. ____ is the lowest layer of the computer’s software.


Ans. Operating system

5. Device drivers usually interpret the commands, which are then passed on to the
operating system for execution. (True/False)
Ans. False. Shells usually interpret the commands, which are then passed on to the
operating system for execution.

6. A ___ is a special program that can control a specific type of hardware. (Pick the
right option)
a) Shell
b) Device driver
c) Complier
d) Database
Ans. b) Device driver

7. The shell has the capability to redirect the input and output and run operation in
the background. (True/False)
Ans. True

8. _____ is mainly used as a scripting language rather than an interactive shell.


Ans. B shell

9. ____ is the default shell of FreeBSD. (Pick the right option)


a) Korn shell
b) Z shell
c) TCSH shell
d) Bourne Again shell
Ans. c) TCSH shell

10. A ____ is a process that starts another process.


Ans. Parent process

11. The ps command produces a report of the processes that run on a Linux system.
(True/False)
Ans. True
12. ‘U’ is the command-line argument that displays the user name and process start
time. (True/False)
Ans. False. ‘u’ is the command-line argument that displays the user name and
process start time.

13. The Linux file structure begins with the _____.


Ans. Root directory ‘/’

14. In Linux, the directory structure follows the Filesystem Hierarchy Structure
(FHS). (True/False)
Ans. True

15. _____ directory has system configuration files, network configuration files,
application configuration files and other installed software. (Pick the right option)
a) /var
b) /mnt
c) /opt
d) /etc
Ans. /etc

16. In Linux, a running program is referred to as a _____.


Ans. Process

17. The ‘ps’ command is useful to know the directory you are working in.
(True/False)
Ans. False. The ‘Is’ command is useful to know the directory you are working in.

18. _____ is used to pass the output of one command through the input of the
subsequent command.
Ans. Pipe

19. The shell is considered as a program that serves as a _______ between the user
and the operating system.
Ans. Buffer

20. Name two types of commands present in the bash shell.


Ans. Internal and external commands

21. A run-level is a state of ____ and the ____ that specifies what system services
are running.
Ans. init, Whole system

22. The ____ IDs are used to identify users in Linux.


Ans. 6

23. Name the init level which represents the shutdown and reboot of the system.
(Pick the right option)
a) 0 b) 3
c) 6 d) 2
Ans. Numeric User
24. The kernel with any odd number is a stable kernel. (True/False)
Ans. False. The kernel with any odd number is a development kernel.

25. Linux kernel is modular in nature and is not a large massive entity. (True/False)
Ans. True

26. The patch files are used to apply a series of edits to a set of ____ files.
Ans. Source

27. If a generic kernel is to be downloaded, you can download the source package
from the ____.
Ans. http://www.kernel.org/

28. The ____ of GNOME’s user admin tool helps to define the user account settings.
(Pick the right option)
a) Advanced panel
b) User privileges
c) Account properties
d) New user accounts
Ans. Advanced panel

29. The user management tools like GNOME’s users-admin or KDE’s KUser uses
some default files called ____ files.
Ans. Configuration

30. The users can use the ____ command to change their passwords by modifying
password files.
Ans. Passwd

31. On a Linux system, everything is a process. (True/False)


Ans. False. On a Linux system, everything is a file, if it is not a file it should be a
process.

32. To export a file system, one should add correct entry to the _____ file.
Ans. /etc/exports

33. The tree structure of the Linux file system may vary based on the_____. (Pick
the right option)
a) System user
b) Hardware devices
c) System directories
d) System administrator
Ans. System administrator

34. The ____ permission is granted to the user whose GID is the same as that of the
file.
Ans. Group

35. The owner permission is granted to the user whose _____ is same as that of the
file.
Ans. UID
36. In the following sentence, identify the group permissions:
drwxr-x— 2 mayank freeos 4096 Dec 28 04:09 tmp
a) Drw
b) r-x
c) x–
d) wxr
Ans. b) r-x

37. In Linux, devices are placed in ______ directory.


Ans. /dev

38. Data on _____ devices is generally transferred in one or more blocks at a time and pre-
fetched and cached.
Ans. Block

39. In general-purpose OS, device drivers are considered as the programs that independently
communicate with applications via some OSspecific protocol. (True/False)
Ans. True

40. Kernel is a collection of different software applications. (True/False)


Ans. False. Linux desktop is a collection of different software applications.

41. Which among the following is a powerful interactive shell that is available under Linux?
(Pick the right option)
a) ksh
b) scsh
c) zsh
d) csh
Ans. c) zsh

42. _____ is used to accept input from the keyboard and allocate an input value to a user-
defined shell variable.
Ans. Read command

43. Bash shell supports path name expansion using the _____ technique.
Ans. Curly brace

44. The variables provided by Bash shell that are prefixed with ‘~’ are called ______.
Ans. Tilde expansions

45. ~+ is used as a shortcut to obtaining the value of the PWD variable which includes the
current working directory. (True/False)
Ans. True

46. Which among the following is the command that displays advanced file attributes?
(Pick the right option)
a) lsattr b) mkdir
c) chattr d) lpr
Ans. a) lsattr
47. When either the bash command or the dot (.) command is used to run a script, it is not
required to set executable permissions on the script. (True/False)
Ans. True.

48. A reserved group of _____ is applied for the names of the system variables.
Ans. Keywords

49. Which among the following is the system variable that indicates the name of the user’s
computer? (Pick the right option)
a) BASH_VERSION
b) HOSTNAME
c) CDPATH
d) HISTFILE
Ans. b) HOSTNAME

50. When allotting value to a variable, you must put spaces on either side of the equal sign.
(True/False)
Ans. False. When allotting value to the variable, do not put spaces on either side of the equal
sign.

51. ____ is applied to change the meaning of the characters or to escape special characters
within the text like quotation marks.
Ans. Backslash

52. ‘#! /bin/bash’ is known as the _____ line in a shell script.


Ans. Bang

53. What is the syntax used to set the permissions for the user and the group to read and
execute the script ‘script.sh’?
Ans. chmod ug = rx script.sh

54. The VFS enhances the speed and efficiency of access to the files. (True/False)
Ans. True

55. The processes within a system communicate with each other in the absence of network
socket semantics using ____.
Ans. Named pipes

56. All the partitions are attached to the system through ______.
(Pick the right option)
a) Mount points b) Directories
c) Links d) File system
Ans. Mount points

57. The main use of a workstation or client installation is for personal use only. (True/False)
Ans. True

58. The _____ command in Linux creates archives for files and directories.
Ans. tar

59. In the _____ mode of vi editors, all the keys on the keyboard act as editing commands.
Ans. Command
60. To write to a file and then quit the file, _____ command is used. (Pick the right option)
a) :q b) :wq
c) :r d) :q!
Ans. b):wq

61. The vi editor automatically corrects words which are misspelt. (True/False)
Ans. True

62. In vi editor, _____ command is used to delete one line.


Ans. Dd

63. ____ is a powerful data manipulation and scripting programming language.


Ans. awk

64. awk performs well in comparing both _____ and _____ values.
Ans. String, Numeric

65. A collection of records is known as ______. (Pick the right option)


a) Fields
b) Database file
c) Function
d) Attribute
Ans. b) Database file

66. awk is a very simple programming language. (True/ False)


Ans. False. awk is a complex programming language.

67. _____ has the ability to filter text in a pipeline.


Ans. SED

68. ____ option of the sed command is used to read the sed commands from the sed script
file.
Ans. -f

69. ____ option is used to suppress the output of the sed command. (Pick the right option)
a) -n
b) n
c) -f
d) -l
Ans. a)-n

70. When –n option is used in sed, the p option of the print flag must be used. (True/False)
Ans. True.

71. The two major classes of X client application that should connect to the X server to
develop a GUI are ______ and ____.
Ans. Desktop environment, Window manager

72. An alternative desktop environment that is based on the Qt 3 graphical toolkit is ____.
(Pick the right option)
a) KDE
b) GNOME
c) XFCE
d) IDE
Ans. a) KDE

You might also like