Linux MCQs

Linux MCQ Questions & Answers

Which is the core of the operating system?

  • shell
  • kernel
  • command
  • script

kernel

Which among the following interacts directly with system hardware?

  • Shell
  • Commands
  • Kernel
  • Applications

Kernel

The system calls in UNIX is written using which language

  • c
  • c++
  • Assembly Language
  • Fortan

c

Unix is which kind of Operating System?

  • Multi User
  • Multi Processes
  • Multi Tasking
  • All of the mentioned

All of the mentioned

Which command is used to display the operating system name

  • os
  • unix
  • kernel
  • uname

uname

Which command is used to display the unix version

  • uname -r
  • uname -n
  • uname -t
  • kernel

kernel

Which option of ls command used to view file inode number

  • -l
  • -o
  • -a
  • -i

-i

How do you get help about the command “cp”?

  • help cp
  • man cp
  • cd
  • None of the mentioned

man cp

Which command is used to display disk consumption of a specific directory

  • du
  • ds
  • dd
  • dds

du

Which command is used to extract a column from a text file

  • paste
  • get
  • cut
  • tar

cut

Which option of rm command is used to remove a directory with all its sub directories

  • -b
  • -o
  • -p
  • -r

-r

Which option of rm command is used to remove a directory with all its sub directories

  • -b
  • -o
  • -p
  • -r

-r

Command used to count number of character in a file is

  • grep
  • wc
  • count
  • cut

wc

Which command is used to display all the files including hidden files in your current and its subdirectories ?

  • ls -aR
  • ls -a
  • ls -R
  • ls -l

ls -aR

Which of the following commands can be used to change default permissions for files and directories at the time of creation

  • chmod
  • chown
  • umask
  • chgrp

umask

Which of the following commands will allow the user to search contents of a file for a particular pattern

  • touch
  • grep
  • find
  • ls

grep

The command syntax to display the file ‘sample.txt’ one page at a time is

  • man sample.txt>more
  • cat sample.txt<more
  • cat sample.txt|more
  • None of the mentioned

cat sample.txt|more

Which command gives the first byte where the difference is in the file1 & file2?

  • Diff
  • cmp
  • comm
  • Ls-a

cmp

When mv f1 f2 is executed which file’s inode is freed?

  • f1
  • f2
  • new inode will be used
  • no inode is freed

f2

There are two hard links to the “file1” say hl and h2 and a softlink sl. What happens if we deleted the “file1”?

  • We will still be able to access the file with hl and h2 but not with sl
  • We will not be able to access the file with hl and h2 but with sl
  • We will be able to access the file with any of hl, h2 and sl
  • We will not be able to access the file with any of hl, h2 and sl

HARDLINK

If two files on same partition point to the same inode structure they are called

  • SOFTLINK
  • HARDLINK
  • ALIAS
  • Special files

We will still be able to access the file with hl and h2 but not with sl

Deleting a soft-link

  • Deletes the destination file
  • Deletes both the softlink and the destination file
  • Deletes just the softlink
  • backup of the destination is automatically created

Deletes just the softlink

Want to know more about our courses?

Enquire Now

Please Sign Up to Download

Enquiry Form