Unix / Linux Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Unix Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : C

Explanation

Dot dot (..) represents parent directory and Dot (.) represents current working directory.

Q 2 - Which of the following is correct to create an alias name for 'ls' as 'list'?

A - alias list=”ls”

B - alias list “ls”

C - alias “list” as “ls”

D - alias “ls” as “list”

Answer : A

Explanation

Syntax is alias alias-name=”command”.

Q 3 - Which character can be used to separate two commands on the same line?

A - :

B - ;

C - ,

D - None of the above

Answer : B

Explanation

Q 4 - Following file contains the encrypted password of the users.

A - /etc/passwd

B - /etc/shadow

C - /etc/gshadow

D - /etc/user.conf

Answer : B

Explanation

Q 5 - Which option can be used with ‘chmod’ to apply permission bits recursively on all the files.

A - –r

B - -R

C - –l

D - -f

Answer : B

Explanation

Q 6 - Which command can be used to show OS name?

A - lname

B - uname

C - osname

D - config

Answer : B

Explanation

‘uname’ can display much more technical information about your hardware and OS apart from name of the OS.

Q 7 - How can you execute ‘date’ command staying within vi editor?

A - !date

B - :!date

C - :>date

D - Noe of the above

Answer : B

Explanation

Staying in command mode of vi, hit : and any command following exclamation (!).

Q 8 - What are the options used to list the contents of a .tar file?

A - cvf

B - tvf

C - xvf

D - lvf

Answer : B

Explanation

‘t’ to list out, ‘v’ is verbose mode & ‘f’ for target file.

Q 9 - In general the working directory of the user root is __

A - /

B - /root

C - /admin

D - /home/root

Answer : B

Explanation

This path is editable even after installation of the system.

Q 10 - Out of the following which can place in home directory?

A - cd

B - cd ~

C - Both (a) and (b)

D - None.

Answer : C

Explanation

unix_questions_answers.htm
Advertisements