11 July 2013

Linux MCQ Questions and Answers - Set 4

5 comments

linux Question and answer in linux
This is set 4 in the ongoing series of MCQ. Hope you have enjoyed the other parts of the series. Like other sets this set also contains some Linux questions with their answers.

1

In Linux which of following command do you use to know the purpose of a command?

which

whatis

what

purpose

Answer

2

What is the process id of init process?

2

6

4

1

Answer

3

Suppose I have made some changes in my Php.ini file and I want to restart my Apache server, which of following command should I use?

sudo service apache2 restart

sudo /etc/init.d/apache2 restart

Both A and B

Only A

Answer

4

Which command is used to show process hierarchy in tree format?

ps -tree

pstree

ps -t

none of these

Answer

5

Which of the following command is used to see the content of tar(backup.tar) file without extracting it?

tar -xvf backup.tar

tar -svf backup.tar

tar -tvf backup.tar

none of these

Answer

6

Which command is used to execute the last command you have executed?

!!

!-1

Both A and B

Only A

Answer

7

What is the purpose of id command?

Print effective and real UID

Print effective and real GID

Print effective and real UID and GID

None of these

Answer

8

Which command is used to print the login shell of an user?

echo $SHELL

echo $LOGIN

echo $LSHELL

None of the Above

Answer

9

Which of the following command return the exit status of last command?

$!

$$

$?

$#

Answer

10

which command is used to print the current working direcotry?

pwd

echo $PWD

Both A and B

Only A

Answer

That's it.
Hope you Enjoyed the MCQ :)



If You Liked This Post Please Take a Time To Share This Post

You May Also Like...

5 comments:

  1. it's really helpful for beginners!!!!!

    ReplyDelete
  2. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
    Data Science
    Selenium
    ETL Testing
    AWS
    Python Online Classes

    ReplyDelete
  3. Thanks for this blog.it is very helpful and informative.
    also, visit Linux Classes in Pune

    ReplyDelete