Explore topic-wise MCQs in Operating System.

This section includes 56 Mcqs, each offering curated multiple-choice questions to sharpen your Operating System knowledge and support exam preparation. Choose a topic below to get started.

1.

If we do not specify the executable file name at the compilation time in GCC, then in linux the compiler creates executable named as

A. a.out
B. a.exe
C. x.out
D. x.exe
Answer» B. a.exe
2.

Running “make” command without the arguments starts the target ____ in the makefile.

A. “.phony”
B. “clean”
C. first
D. none of the mentioned
Answer» D. none of the mentioned
3.

/bin/dmesg picks the messages from

A. /proc/kmesg
B. /sbin/klogd
C. both /proc/kmesg and /sbin/klogd
D. none of the mentioned
Answer» B. /sbin/klogd
4.

“ps” command uses the file _____ to provide the information.

A. /proc/[PID]/stat
B. /proc/[PID]/smaps
C. /proc/[PID]/oom_score_adj
D. /proc/[PID]/oom_score
Answer» B. /proc/[PID]/smaps
5.

What is /proc/[PID]/root?

A. symbolic link that points to the process’s root directory
B. regular file which holds all the PID of the system
C. root directory
D. does not exists in the proc filesystem
Answer» B. regular file which holds all the PID of the system
6.

What is /bin/sh ?

A. bourne shell
B. hard or symbolic link to the real shell command
C. bash shell
D. both bash shell and bourne shell
Answer» C. bash shell
7.

The directory /media is the

A. mount point for removable media
B. mount point for filesystem
C. mount point for removable media & filesystem
D. none of the mentioned
Answer» B. mount point for filesystem
8.

In linux filesystem, the passwords of different users are stored in

A. /etc/passwd file
B. /bin/passwd file
C. /etc/shadow file
D. /bin/shadow file
Answer» D. /bin/shadow file
9.

Static files of the bootloader are installed in

A. /boot directory
B. /root directory
C. /bin directory
D. /sbin directory
Answer» B. /root directory
10.

If no file is specified in sed command then

A. sed command will not work
B. sed reads from standard input
C. sed reads the data already present in buffer
D. it is necessary to provide the filename
Answer» C. sed reads the data already present in buffer
11.

If any sed command does not specify any address then the command is applied to

A. each input line
B. none of the input line
C. last input line
D. none of the mentioned
Answer» B. none of the input line
12.

In vi editor, the key combination CTRL+f

A. moves screen down one page
B. moves screen up one page
C. moves screen up one line
D. moves screen down one line
Answer» B. moves screen up one page
13.

Which command puts a script to sleep untill a signal is recieved?

A. sleep
B. suspend
C. disown
D. break
Answer» C. disown
14.

Which option of the kill command sends the given signal name to the specified process

A. -l
B. -n
C. -s
D. -a
Answer» D. -a
15.

What is job number?

A. same as PID
B. a unique number, assigned to each job in shell
C. same as PID and a unique number, assigned to each job in shell
D. none of the mentioned
Answer» C. same as PID and a unique number, assigned to each job in shell
16.

fc stands for

A. find command
B. fix command
C. both find & fix command
D. none of the mentioned
Answer» D. none of the mentioned
17.

Which one of the following is not a valid operator in bash shell?

A. ||
B. ~
C.
D. -=
Answer» D. -=
18.

Which character to use to escape meaning of special characters in search operations?

A. [].
B. ^
C. .
D. ;
Answer» E.
19.

who | cut –d ” ” -f1 what is the ouput if the who command displays like this user1 tty 0 1234

A. user1
B. user1 tty 0 1234
C. tty
D. tty 0 1234
Answer» B. user1 tty 0 1234
20.

What will be printed for the command below? $ grep –c “^echo” abc

A. The count of lines that do not contain the pattern echo in file abc
B. The count of lines which begin with the pattern echo in file abc
C. The count of lines that ends with the pattern echo in file abc
D. None of the mentioned
Answer» C. The count of lines that ends with the pattern echo in file abc
21.

What is the output of the following command for bash shell: echo linux $0

A. linux echo
B. linux linux
C. linux bash
D. linux
Answer» D. linux
22.

? Specifies

A. one or more character
B. zero or more charecter
C. one character
D. none of the mentioned
Answer» D. none of the mentioned
23.

The user bhojas logged in and performed the following sequence of command. What will be the output of the last command? $ cd project/module1 $ pwd

A. /home/bhojas/project/module1
B. /home/project/module1
C. /usr/bhojas/project/module1
D. project/module1
Answer» B. /home/project/module1
24.

How do you print the lines between 5 and 10, both inclusive

A. cat filename | head | tail -6
B. cat filename | head | tail -5
C. cat filename | tail +5 | head
D. cat filename | tail -5 | head -10
Answer» B. cat filename | head | tail -5
25.

What does the following command do ? who | wc –l

A. List the number of users logged in
B. List the users
C. List the number of users in the system
D. Display the content of who command
Answer» B. List the users
26.

User’s Primary Group id is listed in which file, at the time of creation of the user (On a standard Unix system)

A. /etc/passwd
B. /etc/groups
C. /etc/login
D. /etc/profile
Answer» B. /etc/groups
27.

When a child process exits before the parent process exits, which of the following is true:

A. the child process becomes defunct
B. the parent process becomes defunct
C. if the parent process does not handle SIGCHLD, the child process becomes a zombie
D. none of the mentioned
Answer» D. none of the mentioned
28.

___ is a directory (which should exist), on which to mount the file system?

A. Root
B. Boot
C. Mount-point
D. Partition
Answer» D. Partition
29.

The command chmod 4777 a.out

A. will set the suid bit of a.out
B. will set the suid bit of a.out only if the command is issued by root
C. is not a valid command
D. will set the sticky bit of a.out
Answer» B. will set the suid bit of a.out only if the command is issued by root
30.

A user executes the following command successfully: $ chmod +x file1.txt Which of the following is true of the output of this command?

A. The command results in adding execute permission to the user who ran this command
B. The command results in adding execute permission for the owner of the file
C. The command results in an error since the file is not an executable file
D. The command results in adding execute permission for all users (i.e., user,group & others)
Answer» E.
31.

Given the command $ chmod o-w datafile

A. sets write permission to everyone for datafile
B. sets write permission to others for datafile
C. clears write permission to everyone for datafile
D. clears write permission to others for datafile
Answer» E.
32.

If the umask value is 0002. what will be the permissions of new directory

A. 777
B. 775
C. 774
D. 664
Answer» C. 774
33.

All device files are stored in which directory?

A. /etc
B. /bin
C. /dev
D. /usr
Answer» D. /usr
34.

What UNIX command is used to update the modification time of a file?

A. time
B. modify
C. cat
D. touch
Answer» E.
35.

Which command will you use to see the available routes?

A. show route
B. route status
C. netstat -r
D. none of the mentioned
Answer» D. none of the mentioned
36.

Which of the following commands will allow the user to search contents of a file for a particular pattern

A. touch
B. grep
C. find
D. ls
Answer» C. find
37.

Which command is used to display disk consumption of a specific directory

A. du
B. ds
C. dd
D. dds
Answer» B. ds
38.

Which option of ls command used to view file inode number

A. –l
B. -o
C. –a
D. –i
Answer» E.
39.

Which command is used to print a file

A. print
B. ptr
C. lpr
D. none of the mentioned
Answer» D. none of the mentioned
40.

HOW_MANY_TYPES_OF_LINUX_FILES_ARE_TYPICALLY_USED??$

A. 2
B. 3
C. 4
D. 5
Answer» D. 5
41.

WHICH_ONE_OF_THE_FOLLOWING_IS_NOT_A_LINUX_DISTRIBUTION??$

A. debian
B. gentoo
C. open SUSE
D. multics
Answer» E.
42.

Which character is known as a root directory?

A. ^
B. &
C. &&
D. /
Answer» E.
43.

Linux i?

A. single user, single tasking
B. single user, multitasking
C. multi user, single tasking
D. multi user, multitasking
Answer» E.
44.

Which of the following are grouped into directories and subdirectories?

A. register
B. memory
C. files
D. routines
Answer» D. routines
45.

Which of the following is an alternate source of UNIX?

A. MS-DOS
B. Windows 3.1
C. Windows NT
D. Linux
Answer» B. Windows 3.1
46.

Which desktop environment is not used in any linux distribution?

A. gnome
B. kde
C. unity
D. none of the mentioned
Answer» E.
47.

Which of the following is a UNIX clone?

A. XENIX
B. Windows 3.1
C. Windows NT
D. Linux
Answer» B. Windows 3.1
48.

The first process launched by the linux kernel is

A. init process
B. zombie process
C. batch process
D. boot process
Answer» B. zombie process
49.

Which of the following is the first version of the UNIX operating system?

A. PDP-2
B. Linux
C. MS-DOS
D. PDP-7
Answer» E.
50.

Which one of the following bootloader is not used by linux?

A. GRUB
B. LILO
C. NTLDR
D. None of the mentioned
Answer» D. None of the mentioned