Unix/Lunux MCQ Quiz Hub

UNIX SYSTEM Mcq

Choose a topic to test your knowledge and improve your Unix/Lunux skills

In UNIX, which of the following command is used to set the task priority ?





✅ Correct Answer: 2

Which of the following flags are set when ‘JMP’ instruction is executed ?





✅ Correct Answer: 4

Everything below the system call interface and above the physical hardware is known as ______.





✅ Correct Answer: 1

Linux operating system uses





✅ Correct Answer: 2

In Unix, how do you check that two given strings a and b are equal?





✅ Correct Answer: 4

The directory structure used in Unix file system is called





✅ Correct Answer: 1

Which statement is not true about process 0 in the Unix operating system?





✅ Correct Answer: 1

Which or the following commands would return process_id of sleep command?





✅ Correct Answer: 2

What does the following command do ? grep − vn "abc" x





✅ Correct Answer: 1

The Unix Kernel maintains two key data structures related to processes, the progress table and the user structure. Which of following information is not the part of user





✅ Correct Answer: 3

A Unix file may be of the type :





✅ Correct Answer: 4

A Unix file may be of the type :





✅ Correct Answer: 4

12. Match the following for Unix system calls: List – I List – II (a) exec (i) Creates a new process (b) brk (ii) Invokes another program overlaying memory space with a copy of an executable file (c) wait (iii) To increase or decrease the size of data region (d) fork (iv) A process synchronizes with termination of child process code: a b c d





✅ Correct Answer: 1

WOW32 is a :





✅ Correct Answer: 4

The Unix command : $ vi file1 file2





✅ Correct Answer: 2

_______ maintains the list of free disk blocks in the Unix file system.





✅ Correct Answer: 3

A part of Windows 2000 operating system that is not portable is





✅ Correct Answer: 2

Match the following with reference to Unix shell scripts : List-I List-II a. $? i. File name of the current script b. $# ii. List of arguments c. $0 iii. The number of arguments d. $* iv. Exit status of last command Codes: a b c d





✅ Correct Answer: 3

The output generated by the LINUX command : $ seq 1 2 10 will be





✅ Correct Answer: 3

In UNIX, ______________ creates three subdirectories: 'PIS' and two subdirectories 'progs' and data from just created subdirectory 'PIS'.





✅ Correct Answer: 3

Which statement is not correct about “init” process in Unix?





✅ Correct Answer: 3

Unix command to change the case of first three lines of file “shortlist” from lower to upper





✅ Correct Answer: 4

Match the following vi commands in Unix: List-I List-II a. :w i. saves the file and quits editing mode b. :x ii. escapes unix shell c. :q iii. saves file and remains in editing mode d. :sh iv. quits editing mode and no changes are saved to the file Codes: a b c d





✅ Correct Answer: 4

The Unix Operating System Kernel maintains two key data structures related to processes, the process table and the user structure. Now, consider the following two statements: I. The process table is resident all the time and contain information needed for all processes, even those that are not currently in memory. II. The user structure is swapped or paged out when its associated process is not in memory, in order not to waste memory on information that is not needed. Which of the following options is correct with reference to above statements ?





✅ Correct Answer: 3

Consider the following operations to be performed in Unix: “The pipe sorts all files in the current directory modified in the month of “June” by order of size and prints them to the terminal screen. The sort option skips ten fields then sorts the lines in numeric order.” Which of the following Unix command will perform above set of operations?





✅ Correct Answer: 1

Which of the following statement(s) is/are True regarding ‘nice’ command of UNIX? I. It is used to set or change the priority of a process. II. A process’s nice value can be set at the time of creation. III. ‘nice’ takes a command line as an argument.





✅ Correct Answer: 3

In UNIX, processes that have finished execution but have not yet had their status collected are known as ................





✅ Correct Answer: 3

Which of the following information about the UNIX file system is not correct?





✅ Correct Answer: 3

Which of the following option with reference to UNIX operating system is not correct?





✅ Correct Answer: 4

What is the function of following UNIX command? WC – l < a >b&





✅ Correct Answer: 2

Which of the following statement is not correct with reference to cron daemon in UNIX O.S?





✅ Correct Answer: 4

In Unix, files can be protected by assigning each one a 9-bit mode called rights bits. Now, consider the following two statements: I. A mode of 641 (octal) means that the owner can read and write the file, other members of the owner’s group can read it, and users can execute only. Which of the following options is correct with reference to above statements?





✅ Correct Answer: 3

In Unix, the login prompt can be changed by changing the contents of the file ...............





✅ Correct Answer: 3

A unix file system has 1-KB blocks and 4-byte disk addresses. What is the maximum file size if i-nodes contain 10 direct entries and one single, double and triple indirect entry each?





✅ Correct Answer: 3

In Unix operating system, special files are used to :





✅ Correct Answer: 2

Match the following in Unix file system : List - I List - II (a) Boot block (i) Information about file system (b) Super block (ii) Information about file (c) Inode table (iii) Storage space (d) Data block (iv) Code for making OS ready Codes : (a) (b) (c) (d)





✅ Correct Answer: 1

In Unix, the command to enable execution permission for file “mylife” by all is ................





✅ Correct Answer: 4

Which of the following out commands will output "onetwothree"?





✅ Correct Answer: 3

Assume that an implementation of Unix operating system uses i-nodes to keep track of data blocks allocated to a file. It supports 12 direct block addresses, one indirect block address and one double indirect block address. The file system has 256 bytes block size and 2 bytes for disk block address. The maximum possible size of a file in this system is





✅ Correct Answer: 4

Which of the following set of Unix commands will always display “WELCOME” ?





✅ Correct Answer: 3

Which of the following shell scripts will produce the output “my first script” ?





✅ Correct Answer: 3

Which of the following statements is not true for UNIX Operating System ?





✅ Correct Answer: 2

Consider the following UNIX command: sort < in > temp; head -30 < temp; rm temp Which of the following functions shall be performed by this command?





✅ Correct Answer: 3

The mv command changes





✅ Correct Answer: 3

A UNIX file system has 1 KB block size and 4-byte disk addresses. What is the maximum file size if the inode contains ten direct block entries, one single indirect block entry, one double indirect block entry and one triple indirect block entry?





✅ Correct Answer: 3

A user level process in Unix traps the signal sent on a Ctrl + C input and has a signal handling routine that saves appropriate files before terminating the process. When a Ctrl + C input is given to this process, what is the mode in which the signal handling routine executes ?





✅ Correct Answer: 2

Which one of the following options is not a shell in UNIX system?





✅ Correct Answer: 3

Which command allows you to view your file 24 lines at a time ?





✅ Correct Answer: 1

The Unix command used to find out the number of characters in a file is





✅ Correct Answer: 2

Find the odd man out:





✅ Correct Answer: 3

Which of the following changes permission to deny write permission to group and others?





✅ Correct Answer: 1

Which of the following OS treats hardware as a file system?





✅ Correct Answer: 1

An example of a memory management system call in UNIX is:





✅ Correct Answer: 2

An example of a directory found in most UNIX system is:





✅ Correct Answer: 1

The “nice” command is used in Unix:





✅ Correct Answer: 4

Which of the following is not an Unix Command ?





✅ Correct Answer: 4

A system call in Linux operating system to create a new child process, which is a copy of the parent process:





✅ Correct Answer: 2

The environment variable in Linux, that contain a list of directories the shell automatically recognizes.





✅ Correct Answer: 1

In Linux, the subdirectory that contains system configuration files including user passwords:





✅ Correct Answer: 3

Linux partitions are created using the file system:





✅ Correct Answer: 3

Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?





✅ Correct Answer: 1

Consider the following statements : (a) UNIX provides three types of permissions * Read * Write * Execute (b) UNIX provides three sets of permissions * permission for owner * permission for group * permission for others Which of the above statement/s is/are true?





✅ Correct Answer: 3

Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation. Windows (a) Create - process () (b) WaitForSingleObject () (c) CreateFile () (d) CloseHandle () UNIX (i) Open () (ii) Close () (iii) Fork () (iv) Wait () Code : (a) (b) (c) (d)





✅ Correct Answer: 1