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