Linux MCQs
Linux MCQ Questions & Answers
Which is the core of the operating system?
- shell
- kernel
- command
- script
Which among the following interacts directly with system hardware?
- Shell
- Commands
- Kernel
- Applications
The system calls in UNIX is written using which language
- c
- c++
- Assembly Language
- Fortan
Unix is which kind of Operating System?
- Multi User
- Multi Processes
- Multi Tasking
- All of the mentioned
Which command is used to display the operating system name
- os
- unix
- kernel
- uname
Which command is used to display the unix version
- uname -r
- uname -n
- uname -t
- kernel
Which option of ls command used to view file inode number
- -l
- -o
- -a
- -i
How do you get help about the command “cp”?
- help cp
- man cp
- cd
- None of the mentioned
Which command is used to display disk consumption of a specific directory
- du
- ds
- dd
- dds
Which command is used to extract a column from a text file
- paste
- get
- cut
- tar
Which option of rm command is used to remove a directory with all its sub directories
- -b
- -o
- -p
- -r
Which option of rm command is used to remove a directory with all its sub directories
- -b
- -o
- -p
- -r
Command used to count number of character in a file is
- grep
- wc
- count
- cut
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
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
Which of the following commands will allow the user to search contents of a file for a particular pattern
- touch
- grep
- find
- ls
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
Which command gives the first byte where the difference is in the file1 & file2?
- Diff
- cmp
- comm
- Ls-a
When mv f1 f2 is executed which file’s inode is freed?
- f1
- f2
- new inode will be used
- no inode is freed
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
If two files on same partition point to the same inode structure they are called
- SOFTLINK
- HARDLINK
- ALIAS
- Special files
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
