UNIX MCQ Question and Answers
By BYJU'S Exam Prep
Updated on: September 25th, 2023
Here you may find UNIX MCQ questions and answers. In order to get ready for the upcoming Computer Science Engineering exam, these UNIX MCQ questions help him. Here, there are 5 multiple-choice questions.
Check out the comprehensive answer to the UNIX MCQs, as well as it will guide you in understanding the answer and clear up your doubt for questions of a similar nature.
Table of content
UNIX MCQ Question 1
Which command is used to sort the lines of data in a file in reverse order?
- sort
- sh
- st
- sort -r
Answer: D. sort-r
Solution
Sort is essentially used to sort a file. It arranges the lines by default in ASCII collating order.
The following sort options are as follows:
- To reverse the order (-r).
- Using the primary key to order (-k).
- Numeric order (-n).
- Eliminating redundant lines (-u).
UNIX MCQ Question 2
The Unix shell is both _______ and _______ language.
- scripting, interpreter
- high level, low level
- interactive, responsive
- interpreter, executing
Answer: D. scripting, interpreter
Solution
The UNIX shell functions as both an interpreter and a scripting language. Additionally, we can remark whether a shell may be interactive or not. When we log in to our system, the interactive shell displays a prompt and waits for our requests, while the non-interactive shell is controlled by the interactive shell when running a shell script.
UNIX MCQ Question 3
In which language UNIX is written?
- C++
- C
- JAVA
- Python
Answer: B. C
Solution
Dennis Ritchie and Ken Thompson desired an operating system that could function on various hardware, so they converted the initial Assembly language version of UNIX into a more versatile language. In order to add portability, one of the strongest aspects, they redesigned the entire operating system in C language in 1973.
UNIX MCQ Question 4
Which of the following is not a feature of Unix?
- multiuser
- easy to use
- multitasking
- portability
Answer: B. easy to use
Solution
A user can execute numerous tasks simultaneously since UNIX is a multitasking operating system. The fact that it enables collaboration among multiple users on a single operating system makes it a multiuser system. However, a significant drawback of UNIX is that its command-line richness necessitates a particular kind of dedication to comprehend the topic. In other words, the user must be fully aware of the commands and how they work.
UNIX MCQ Question 5
Which Unix command is used for changing the current directory?
- pwd
- rm
- cd
- cp
Answer: D. cd
Solution
For navigating the file system, use the cd (change directory) command. Usually, a parameter is used to run the cd command. The directory supplied as an argument replaces the current directory as soon as it is invoked. To copy files, use the cp command, and to delete them, use the rm command.
As an illustration, suppose that our current directory is /bin/user06 and that we want to change it to a directory called dir one that is located inside the user06 directory. Enter the following command:
$ cd dir_one
$pwd
/bin/user06/dir_one
☛ Related Questions: