Linux Proc Filesystem Questions & Answers – 4

This set of Linux / Unix questions and answers focuses on variables in Linux Proc Filesystem. This is set 4.

1. The command “cd /proc/10/cwd” provides the
a) current working directory of process having PID 10
b) current status of the process having PID 10
c) current version of the filesystem
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

2. Which one of the following command will print the environement of process 1?
a) cat /proc/1/environ
b) cat /proc/bin/1/env
c) cat /proc/1/var/env
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

3. The file /proc/[PID]/mountinfo contains
a) major minor numbers of device files
b) root of the mount within the filesystem
c) mount point relative to the process’s root
d) all of the mentioned
View Answer

Answer: d
Explanation: None.

4. With the help of proc filesystem
a) kernel and kernel modules can send the information to processes
b) process information can be accessed
c) kernel modules can send the information to processes & process information can be accessed
d) none of the mentioned
View Answer

Answer: c
Explanation: None.
advertisement
advertisement

5. Most files and directories within /proc are 0 bytes in size because
a) proc filesystem exists only as a reflection of the in-memory kernel data structure
b) these files contains very only one or two instructions
c) proc filesystem doesn’t exists only as a reflection
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

6. Proc files are
a) read-only files
b) read-write files
c) both read-write and read-only files
d) none of the mentioned
View Answer

Answer: c
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

7. Accessing the file /proc/meminfo gives the different result each time because
a) memory usages is always fluctuating
b) a new process id is assigned
c) logical address is different from the physical address
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

8. The files of /proc directory are
a) stored in secondary memory
b) generated by the kernel
c) stored in secondary memory & generated by the kernel
d) none of the mentioned
View Answer

Answer: b
Explanation: None.
advertisement

9. The directory /proc/net contains information about
a) Different network system compiled into the system
b) IP address of the system
c) MAC address of the system
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

10. The command “echo www.sanfoundry.com > /proc/sys/kernel/hostname” will
a) change the hostname
b) print “www.sanfoundry.com”
c) do nothing
d) none of the mentioned
View Answer

Answer: a
Explanation: None.
advertisement

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.