Linux MCQs – LINUX commands – Part 4
Multiple choice questions and answers (MCQs) on Linux focuses on “Managing of users accounts and groups” to prepare for exams, interviews, and certifications, such as Redhat exam, CompTIA exam, Ubuntu / SuSE certification, LPI certification exam. These MCQs will easily prepare anyone to pass their Linux test.
1. Which command will you use to display the routes of an available network?
A route status
B netstat -r
C show route
D None of the above
[st_adsense]
2. Which screen manipulation command resets the screen to the normal state?
A tput rmso
B tput smso
C tput cup
D tput blink
3. Which command to display the date in the following format “dd/mm/yyyy”?
A date + %d/%m/%Y
B date + ”%d/%m/%Y”
C date + /%d/%m/20%y
D date + ”/%d/%m/20%y”
4. Which command to display the file ‘test.txt’ ?
A man test.txt > more
B cat test.txt < more
C cat test.txt | more
D None of the above
[st_adsense]
5. Which command displays the name of the operating system?
A uname -n
B uname -r
C uname -o
D uname –m
6. How to add the file “file1” in the compressed file “example.tar”?
A We can’t add the file1 in example.tar
B tar -cvf example.tar file1
C tar -rvf file1 example.tar
D tar -evf file1 example.tar
7. How to run ls command in vi editor ?
A :ls
B :!ls
C !ls
D We can’t execute it
8. Which command gives the first byte or the difference between the two files?
A diff
B cmp
C comm
D ls -a
[st_adsense]
9. To open the file “file1” with the cursor on line number 4 we use the following command $______ ?
A vi +/se 4 file1
B vi +4 file1
C vi +set 4 file1
D vi + “set 4” file1
10. “sed” is a command generally used to _________ ?
A Perform complex calculations
B Modify / print the selective content of a file
C Perform non-blocking I/O based on FIFO
D None of the above
[st_adsense]