Explore topic-wise MCQs in Unix.

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

1.

If two users execute the same program, the memory requirements are doubled.

A. True
B. False
C. May be
D. Can't say
Answer» C. May be
2.

Which of the following action can be taken by a process upon receiving a signal?

A. ignore the signal
B. terminate the process
C. suspend the process
D. ignore the signal, terminate and suspend the process
Answer» E.
3.

We cannot find out the name of the program scheduled using at command.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
4.

Kill -l will list all the signal numbers on our machine.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
5.

The environment variables are available in _____

A. *environ[ ]
B. env[ ]
C. env
D. pipe
Answer» B. env[ ]
6.

Which of the following signals are generated from the hardware?

A. SIGFPE
B. SIGILL
C. SIGSEGV
D. SIGPE, SIGILL, SIGSEGV
Answer» E.
7.

Which of the following functions are used for obtaining and setting the value of environment variables?

A. getenv
B. setenv
C. env
D. getenv and setenv
Answer» E.
8.

Every process running on the system has a

A. Permissions
B. Process ID
C. Both a and b
D. Background job
Answer» C. Both a and b
9.

Processes with a nice level of -20

A. are least nice
B. are very nice
C. are kind of nice
D. are the nicest
Answer» B. are very nice
10.

The parent process picks up the exit status of a child using ___ system call.

A. wait
B. waitp
C. exec
D. kill
Answer» B. waitp
11.

The PID of our login shell doesn’t change.

A. True
B. False
C. May be
D. Can't say
Answer» C. May be
12.

A process can be terminated using the exit or _exit system call.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
13.

Which of the following is not a job status?

A. Idling
B. Running
C. Stopped
D. Done
Answer» B. Running
14.

Both exit and _exit system call share an identical syntax.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
15.

Address space of a process is virtual.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
16.

To start a process in the background, enter the command with this character at the end.

A. $
B. #
C. &
D. %
Answer» D. %
17.

Which system call is used to set a timer that generates the SIGALARM signal?

A. pause
B. alarm
C. read
D. signal
Answer» C. read
18.

nohup command doesn’t send the standard output of a command to any file.

A. True
B. False
C. May be
D. Can't say
Answer» C. May be
19.

Which of the following commands are useful to job and process management?

A. Jobs
B. Ps
C. Top
D. All of the above
Answer» E.
20.

A process is an instance of _______ program.

A. waiting
B. executing
C. terminated
D. halted
Answer» C. terminated
21.

Which of the following characteristics of the original process are preserved when, the exec system call is executed

A. The current working directory
B. The open files
C. PID and PPID
D. All of these
Answer» E.
22.

Which of the following comments about the signals system call are true?

A. It takes up two arguments
B. The first argument is an integer
C. The second argument is a pointer to a function
D. All of the above
Answer» E.
23.

Choose the correct statement.

A. Any process has an associated owner ID and group ID
B. Effective ID defines who you are for the duration of a process
C. Real ID defines who you are for the duration of a process
D. Both (a) & (b)
Answer» E.
24.

It is better to use & with nice command.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
25.

Each process is identified by a unique integer called ______

A. PID
B. PPID
C. TID
D. PTID
Answer» B. PPID
26.

The "renice" command needs these arguments.

A. Nice level and process id
B. Program name and nice level
C. Job number and process id
D. Job number and nice level
Answer» B. Program name and nice level
27.

Which of the following system calls returns one or more file descriptors?

A. dup, dup2
B. fcntl
C. pipe
D. dup, dup2, fcntl and pipe
Answer» E.
28.

The cron tab is a table having a list of commands that are scheduled to be run at regular intervals.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
29.

Every process has a parent process.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
30.

Jobs scheduled using batch command goes to a special at queue.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
31.

The method used by Unix to do multitasking is called

A. task switching
B. time switching
C. time slicing
D. processor sharing
Answer» D. processor sharing
32.

What is the default disposition of most signals?

A. ignore the signal
B. terminate the process
C. suspend the process
D. kill the signal
Answer» C. suspend the process
33.

The "nice" command is used to

A. Communicate with other users
B. Improve relationships
C. Change Priority levels of running processes
D. Create processes
Answer» D. Create processes
34.

The parent id of a child is called ______

A. PID
B. PPID
C. TID
D. PTID
Answer» C. TID
35.

By default, "ps" will list

A. All processes running in your account
B. Only processes running in that terminal
C. All processes for all users
D. Processes for other users only
Answer» C. All processes for all users
36.

POSIX shell provides job control facilities like bg or fg.

A. True
B. False
C. May be
D. Can't say
Answer» C. May be
37.

___ system call behaves in an identical manner to the kill command.

A. alarm
B. kill
C. pause
D. signal
Answer» C. pause
38.

What does the following command do?$ kill %2

A. kills job number 2
B. kills the second background job
C. invalid command
D. kill all foreground & background jobs
Answer» C. invalid command
39.

Which of the following functions is used for handling environment variables of a process?

A. getenv
B. setenv
C. letenv
D. getenv and setenv
Answer» E.
40.

Which library function uses kill to send any signal to the current process?

A. getc
B. raise
C. catch
D. try
Answer» C. catch
41.

The "ps" command gives you a

A. Static view of running processes
B. Dynamic view of running processes
C. Has nothing to do with processes
D. Method of moving processes to the background
Answer» B. Dynamic view of running processes
42.

Which of the following signals can neither be ignored nor catch?

A. SIGKILL
B. SIGSTOP
C. SIGKILL and SIGSTOP
D. SIGALR
Answer» D. SIGALR
43.

There are _____ signals that are generated from the keyboard.

A. 2
B. 3
C. 1
D. 5
Answer» C. 1
44.

The sources from where the signals can be generated are:

A. keyboard
B. hardware
C. a C program
D. keyboard, hardware, a C program
Answer» E.
45.

A system call is a programmatic way in which the program requests for the service from the kernel of an operating system.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
46.

What will the output of the following command?$ ps -t dev/console

A. processes running on terminal named console
B. undefined output
C. erroneous
D. processes running on the current terminal
Answer» B. undefined output
47.

The -a option when used with ps command lists processes of all users but doesn’t display the system processes.

A. True
B. False
C. May be
D. Can't say
Answer» B. False
48.

When fork() is invoked, the child process created gets a new PID.

A. True
B. False
C. May be
D. Can't say
Answer» B. False