250+ TOP MCQs on Linux Proc Filesystem and Answers

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

Answer: a
Clarification: 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

Answer: a
Clarification: 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

Answer: d
Clarification: 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

Answer: c
Clarification: None.

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

Answer: a
Clarification: 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

Answer: c
Clarification: None.

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

Answer: a
Clarification: 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

Answer: b
Clarification: None.

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

Answer: a
Clarification: None.

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

Answer: a

Leave a Reply

Your email address will not be published. Required fields are marked *