48
67.3k

80+ Unix Operating System Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Bachelor of Science in Computer Science SY (BSc CS) , Bachelor of Science in Computer Science (BSc CS) .

1.

Unix OS was first developed by

A. dennis ritchie
B. bjarne stroustrup
C. ken thompson
D. brian kernighan
Answer» C. ken thompson
2.

Unix OS was first developed at

A. microsoft corp. usa
B. at & t bell labs, usa
C. ibm, usa
D. borland international, usa
Answer» B. at & t bell labs, usa
3.

Unix is written in

A. c language
B. ada language
C. perl language
D. pascal language
Answer» A. c language
4.

Unix is a

A. single user, single tasking os
B. single user, multi-tasking os
C. multi-user, multi- tasking os
D. none
Answer» C. multi-user, multi- tasking os
5.

Which of the following is a command for searching a pattern in a file?

A. find
B. grep
C. look up.
D. none
Answer» B. grep
6.

Unix Command can be typed in

A. lower case
B. upper case
C. both the cases
D. none
Answer» A. lower case
7.

Shell Program is stored in a file called

A. unix
B. sh
C. dd
D. cc
Answer» B. sh
8.

WhicBh shell offers a command history feature

A. c shell
B. visual shell
C. bourne shell
D. korn shell
Answer» C. bourne shell
9.

The minimum number of links for any directory file are

A. 3
B. 4
C. 1
D. 2
Answer» D. 2
10.

The default value of Umask is

A. 1024
B. 4021
C. 0022
D. 1001
Answer» C. 0022
11.

Binary executable required for system administration is usually placed in ________ directory.

A. letc
B. lusr
C. ldev
D. none
Answer» A. letc
12.

All user directories are usually placed in _________ directory.

A. letc
B. lusr
C. ldev
D. none
Answer» B. lusr
13.

If there are three links for a file then the number of copies of the file would be

A. one
B. two
C. three
D. four
Answer» A. one
14.

After typing the contents of file test created by you by giving the command cat>test you save the contents by

A. pressing the keys ctrl-c
B. typing save and pressing enter
C. pressing esc key
D. pressing ctrl-d
Answer» D. pressing ctrl-d
15.

The file for which we do not have write permission can be deleted using the command

A. rm-i file
B. rm-i file
C. rm-r-file
D. rm-f-file
Answer» D. rm-f-file
16.

The permission 746 can be represented as

A. rwxrwx- -x
B. rw- -w-r-x
C. rwxr-xr-x
D. rwxr- -rw–
Answer» D. rwxr- -rw–
17.

A Sticky bit applies to a file would mean that

A. no one can remove it
B. it would stick around in memory even when its execution is over
C. next time you login it would get executed on its own
D. none of the above
Answer» B. it would stick around in memory even when its execution is over
18.

The command pwd gives

A. present working directory
B. password in encrypted form
C. password in decrypted form
D. none
Answer» A. present working directory
19.

Which of the following is not a unix command

A. cd
B. rm
C. pwd
D. del
Answer» D. del
20.

The size of any block in the unix file system is

A. 512 bytes
B. 1024 bytes
C. 2048 bytes
D. any of the above
Answer» D. any of the above
21.

To find the block size on your file system the command is

A. blksz
B. szblk
C. chksz
D. cmchk
Answer» D. cmchk
22.

Each entry in inode table is of size

A. 64 kb
B. 32kb
C. 32 bytes
D. 64 bytes
Answer» D. 64 bytes
23.

The program contained in boot block, that loads kernel into memory is called

A. disk bootstrap program
B. master boot program
C. shell program
D. none of the above
Answer» A. disk bootstrap program
24.

The state of the file system is contained in

A. boot block
B. a special block created by book block
C. super block
D. none of the above
Answer» C. super block
25.

Which file gets executed when we use the passwd command

A. /etc/passwd
B. /etc/pwd
C. /bin/passwd
D. /passwd
Answer» C. /bin/passwd
26.

The command cal j 1997 would give the output as

A. the calendar of jan, june and july 1997
B. only calendar of jan 1997
C. an error
D. none of the above
Answer» C. an error
27.

The output of command banner “Unix shell programming” would be

A. a banner showing ‘unix’,’shell’ and ‘programming’ words displayed in separate lines
B. a banner showing ‘unix shell’ in one single line
C. nothing
D. a banner showing ‘unix shell programming’ in one line.
Answer» B. a banner showing ‘unix shell’ in one single line
28.

To see the last access time of various files in a file system the command is

A. is-iu
B. is-i
C. is-acc
D. is-mt
Answer» A. is-iu
29.

To ascertain what are the contents of the file in your the system the best way would be

A. do a cat command on each file and find its contents
B. use the command cat*
C. use the command file*
D. none of the above
Answer» C. use the command file*
30.

Which of these is not a command of Unix related with DOS

A. dosdir a:proj
B. doscopy trial a:/
C. doscp/home/proj/prg a:/
D. dosls
Answer» B. doscopy trial a:/
31.

Which of following commands do not belong to multiple file editing commands

A. :n!
B. :q!
C. :rnew!
D. all the above
Answer» D. all the above
32.

The difference between the commands ps –e and ps –a is

A. ps –e gives details of every process running in memory whereas ps –a gives output for all the process that you have launched
B. ps –e gives details of every process running in memory whereas ps –a gives details of all user processes
C. no difference , both give same output
D. none of the above
Answer» B. ps –e gives details of every process running in memory whereas ps –a gives details of all user processes
33.

The father of all processes is

A. root
B. sh
C. sched
D. init
Answer» C. sched
34.

The process id numbers of the processes vhand,bdflush,sched and init are

A. 1,2,3 and 4
B. 2,3,0 and 1
C. 3,4,1 and 2
D. 0,1,2 and 3
Answer» B. 2,3,0 and 1
35.

Which of the following is not true regarding the command $ nohup cat *.let | nohup sort >f1 &

A. the process would die if the user logs out before the command’s execution is over
B. if the user logs out the output of sort would be dtored in a file nohup.out
C. it is optional to give nohup before sort
D. this background process is also known as a deamon process
Answer» A. the process would die if the user logs out before the command’s execution is over
36.

Which of the following is not true regards the kill command

A. super user can kill deamon processes
B. for sure kill the signal no is 9
C. there is no surety that the shell process will get killed by the command kill
D. using kill command you can kill other user’s processes too
Answer» A. super user can kill deamon processes
37.

Which of the following is not true

A. the at command permits you to receive messages only by mail
B. a person’s login name appears in the file at.allow if he is not allowed to use the at command
C. both are false
D. both are true
Answer» C. both are false
38.

For a person to receive messages he should have his terminal set to a parameter which will allow him receive messages.The command to set this parameter is

A. message –on
B. msg –o
C. mesg –y
D. message–y
Answer» C. mesg –y
39.

The command that unix offers to a user to find out whether he can send messages to a particular terminal are

A. finger and who
B. finger –mesg and who –t
C. finger –i and who –t
D. finger –i and who –t
Answer» D. finger –i and who –t
40.

If the user has read a news item he cannot read it again because of creation of the file

A. _news_time
B. news.time
C. .news.time
D. .news_time
Answer» D. .news_time
41.

To read the stale news the option available is

A. news –a
B. delete the file /usr/news
C. delete the file _news.time
D. delete the file .news_time
Answer» A. news –a
42.

The message of the day is stored in a file called

A. /etc/profile
B. /etc/motv
C. .profile
D. autoexec.bat
Answer» B. /etc/motv
43.

The incoming mail of user with the login name aa12 is stored in the file

A. /usr/spool/mail/aa12
B. /usr/aa12/mbox
C. /spool/mail/aa12
D. /usr/aa12/.mbox
Answer» A. /usr/spool/mail/aa12
44.

.mailrc is the file

A. which stores the incoming mail
B. which is used to type the mail to be sent
C. which is invoked when the mail command is executed
D. which permits you to customize the vi environment
Answer» C. which is invoked when the mail command is executed
45.

The escape sequence \033[4m is used to

A. underlying characters
B. mark them as bold
C. display them in reverse video
D. none of the above
Answer» B. mark them as bold
46.

Which of the following assignments is illegal

A. a=’ls’
B. b=’ls –l’
C. c=’1972’
D. d=’who | grepaal’
Answer» C. c=’1972’
47.

Which of the following assignment is illegal

A. a=’cat file’
B. a=100 b=50
C. age=25
D. all the above
Answer» C. age=25
48.

A null variable a can be created using

A. a=
B. a=’’
C. a=””
D. all the above
Answer» D. all the above
49.

The shell metacharacter $# represents

A. total number of arguments supplied to the shell script
B. total number of files in the current directory
C. total number of users who have logged in
D. total number of processes running in the background
Answer» A. total number of arguments supplied to the shell script
50.

When we are executing a shell script the shell acts as

A. an interpreter
B. a compiler
C. an operating system
D. none of the above
Answer» A. an interpreter

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.