Linux Questions & Answers – Linux Commands – 1

This set of Linux / Unix multiple choice questions and answers focuses on various Linux commands and their command line options & parameters. It will be useful for anyone learning Linux Basics, Essentials and/or Fundamentals.

1. The dmesg command
a) Shows user login logoff attempts
b) Shows the syslog file for info messages
c) kernel log messages
d) Shows the daemon log messages
View Answer

Answer: c
Explanation: None.

2. The command “mknod myfifo b 4 16”
a) Will create a block device if user is root
b) Will create a block device for all users
c) Will create a FIFO if user is not root
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

3. Which command is used to set terminal IO characteristic?
a) tty
b) ctty
c) ptty
d) stty
View Answer

Answer: d
Explanation: None.
advertisement
advertisement

4. Which command is used to record a user login session in a file
a) macro
b) read
c) script
d) none of the mentioned
View Answer

Answer: c
Explanation: None.

5. Which command is used to display the operating system name
a) os
b) unix
c) kernel
d) uname
View Answer

Answer: d
Explanation: None.

6. Which command is used to display the unix version
a) uname -r
b) uname -n
c) uname -t
d) kernel
View Answer

Answer: a
Explanation: None.

7. Which command is used to print a file
a) print
b) ptr
c) lpr
d) none of the mentioned
View Answer

Answer: c
Explanation: None.
advertisement

8. Using which command you find resource limits to the session?
a) rlimit
b) ulimit
c) setrlimit
d) getrlimit
View Answer

Answer: b
Explanation: None.

9. Which option of ls command used to view file inode number
a) –l
b) -o
c) –a
d) –i
View Answer

Answer: d
Explanation: None.
advertisement

10. Find / -name ‘*’ will
a) List all files and directories recursively starting from /
b) List a file named * in /
c) List all files in / directory
d) List all files and directories in / directory
View Answer

Answer: a
Explanation: None.

Sanfoundry Global Education & Learning Series – Linux Administration & Programming.

Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.

To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.