TOP 50 UNIX MCQS

unix mcq

Unix Multiple Choice Questions & Answers focuses on “Shell Programming using read Command and Command Line Arguments | UNIX MCQ |

TOP 50 UNIX MCQS

1.)The shell does the following in Unix
1. 1.Provides security to files
2. 2.Talks to the hardware
3. 3.Is the file manager
4. Is the user interface

UNIX MCQS Ans : 4

2.) The “renice” command needs these arguments.
1. Job number and process id
2. Job number and nice level
3. Nice level and process id
4. Program name and nice level

Ans : 3

3.) By default, “ps” will list
1. Processes for other users only
2. All processes running in your account
3. All processes for all users
4. Only processes running in that terminal

Ans : 3

4.) The “nice” command in UNIX is used to
1. Communicate with other users
2. Create processes
3. Improve relationships
4. Change Priority levels of running processes

UNIX MCQS Ans : 4

5.) Which of the following keys is used to replace a single character with new text in UNIX?
1. r
2. S
3. C
4. s

Ans : 4

6.) The root directory is designated by what special character?
1. \
2. /
3. $
4. %

Ans : 2

7.) Which of the following is not a file type in UNIX? 
1. Shells
2. Links
3. Text files
4. Binary files

Ans : 1

8.) Which one is not a characteristic of pipes in UNIX?
1. can save you keystrokes
2. multiple pipes can be used on a command line
3. cannot be used with redirection
4. connect commands

Ans : 3

9.) UNIX was developed by
1. Bell labs
2. California university
3. American defence academy
4. Berkley software

Ans : 1

10.) To use a Unix system with a GUI you need this type of window to enter Unix commands
1. Terminal
2. Command
3. Dos
4. Dialog box

UNIX MCQS Ans : 1

11.) Which of the following commands are useful to job and process management in UNIX?
1. Ps
2. All of these
3. Jobs
4. Top

Ans : 2

12.) Which is not one of the 3 classifications of users granted permissions for files in UNIX?
1. Owner
2. Group
3. All others
4. Manager

Ans : 4

13.) Which symbol will be used with grep command to match the pattern pat at the beginning of a line?
1. ^pat
2. pat$
3. pat^
4. $pat

Ans : 1

14.) Which of the following is not one of the 3 general components of the Unix operating system in UNIX?
1. the file system
2. the GUI
3. the kernel
4. the shell

Ans : 2

15.) Every process running on the system has a
1. Both Process ID & Permissions
2. Background job
3. Permissions
4. Process ID

Ans : 4

16.) The name of the top directory is
1. Top
2. Topdir
3. Root
4. Master

Ans : 3

17.) To find out a file’s inode number, use this option on the “ls” command in UNIX
1. -in
2. -num
3. -inode
4. -i

Ans : 4

18.) The sort command in UNIX
1. Used to sort the list of files in a directory
2. Used to sort a file
3. Used to save the list of files in a directory
4. None of these

UNIX MCQS Ans : 2

19.) Which command sends the word count of the file infile to the newfile.
1. wc infile >newfile
2. wc infile | newfile
3. wc newfile
4. wc infile – newfile

Ans : 1

20.) The tar command in UNIX
1. Used to create compressed archives of directories and files only
2. None of these
3. Used to extract directories and files from an archives only
4. for both: Used to create compressed archives of directories and files and used to extract directories
and files from an archives

Ans : 4

21.) In an inode, you usually will find:
1. The time the file’s inode was last modified
2. all are correct
3. A file reference count: the total number of names the file has
4. The location of the file’s contents on the disk, if any

Ans : 2

22.) A file with permission status of RWXR_XR__ indicates
1. The owner has all permissions, the group has only Read permissions.
2. The group has all permissions, the owner has only Read and Execute permissions.
3. The owner has all permissions, the group has only Read and Execute permissions
4. The owner has only Read and Execute permissions.

Ans : 3

23.) Which of the following is not a job status?
1. Idling
2. Stopped
3. Done
4. Running

Ans : 1

24.) The method used by Unix to do multitasking is called
1. time switching
2. Time slicing
3. task switching
4. processor sharing

Ans : 2

25.) To invoke “bash” you type
1. bsh
2. bash
3. sh
4. bah

UNIX MCQS Ans : 2

26.) Processes with a nice level of -20
1. are least nice
2. are kind of nice
3. are very nice
4. are the nicest

Ans : 1

27.) The tail command in UNIX
1. Can be used to display the list of last 10 files in the current directory
2. None of these
3. Can be used to display the list of last 15 in the current directory
4. Can be used to look at the tail or bottom of the file

Ans : 4

28.) To start a process in the background, enter the command with this character at the end.
1. &
2. $
3. #
4. %

Ans : 1

28.) Which command is used to change protection mode of files starting with the string emp and ending with
1,2, or 3?
1. chmod 777 emp*
2. chmod 222 emp?
3. chmod u+x emp[l-3]
4. chmod u+r ??? emp

Ans : 3

29.) Which command is used to copy all files having the string chap and any two characters after that to the
progs directory?
1. cp chap?? /progs/*
2. cp chap?? progs
3. cp chap[12] /progs/*.*
4. cp chap* progs

UNIX MCQS Ans : 2

30.) The operating system controls
1. the processor
2. all of these
3. the hard drive
4. printers

Ans : 2

31.) Which command is used to extract specific columns from the file?
1. paste
2. cut
1. 3.cat
3. grep

Ans : 2

32.) The redirection symbol for output is
1. |
2. ^
3. >
4. <

Ans : 3

33.) To list all the files in the directory in long format use the following options with the “ls” command.
1. -al
2. -l
3. -lf
4. -hl

Ans : 1

34.) To get to the on-line reference manual, you use this command in UNIX
1. Man
2. Manual
3. None of these
4. Online

Ans : 1

35.) The last character of the “bash” prompt is usually
1. $
2. #
3. %
4. ?

UNIX MCQS Ans : 1

36.) Multiple Unix commands can be put into a file to form a program. This is called a
1. Pipe
2. Link
3. Script
4. Shell

Ans : 3

37.) To become the superuser, you can can use the command in UNIX:
1. chprio
2. superuser
3. root
4. su

Ans : 4

38.) Which command is used to display the UNIX version
1. uname -t
2. kernel
3. uname -r
4. uname -n

Ans : 3

39.) The letters “bash” stand for
1. Berkeley admin shell
2. Bourne again shell
3. Berkeley adhoc shell
4. Born after shell

UNIX MCQS Ans : 2

40.) Who needs to possess the superuser account in UNIX?
1. System administrator
2. President of the company
3. Department manager
4. Ordinary users

Ans : 1

41.) If you attempt to change directory to a directory for which you don’t have Read permission, you get the
following message.
1. Invalid directory
2. Read denied
3. Permission denied
4. Invalid change

Ans :3

42.) The standard output device for Unix is
1. the keyboard
2. the mouse
3. the printer
4. the monitor

Ans :4

43.) Links are
1. dummy filenames in the directory only
2. point to other files only
3. like pipes
4. Both point to other files and dummy filenames in the directory

UNIX MCQSAns :4

44.) Which one of the following options is not a shell in UNIX system?
1. Korn Shell
2. Net Shell
3. C Shell
4. Bourne Shell

UNIX MCQS Ans :2

45.) The Unix command used to find out the number of characters in a file is
1. c
2. chcnt
3. nc
4. wc

Ans :4

46.) Command options
1. All of these
2. Can be combined with targets
3. Are required for commands to work
4. Are preceded by a dash

UNIX MCQS Ans :1

47.) The search path is stored in an environment variable named:
1. PATH
2. DIRS
3. SEARCHPATH
4. PATHS

Ans :1

48.) Files in UNIX may be a representation of the systems:
1. I/O devices
2. Terminals
3. Disk drives
4. All are correct

Ans : 4

49.) There is redirection for
1. Appending to a file
2. Output
3. Input
4. All of these

Ans : 4

50.) Which of the following is not a major Unix shell?
1. bash shell
2. Korn shell
3. C shell
4. X shell

UNIX MCQS Ans : 4

Did we left something?

Comment down below and share your knowledge with others too , Thanks.

Or Please give your valuable feedback to us...

Feedback

Author: Saad Mansuri

Leave a Reply

Your e-mail address will not be published. Required fields are marked *