Linux Proc Filesystem Questions & Answers – 4

DigitalOcean Referral Badge DigitalOcean Referral Badge

1.

The command “cd /proc/10/cwd” provides the

   A.) current working directory of process having PID 10
   B.) current version of the filesystem
   C.) current status of the process having PID 10
   D.) none of the mentioned

Answer: Option 'A'

current working directory of process having PID 10

DigitalOcean Referral Badge

2.

Which one of the following command will print the environement of process 1?

   A.) cat /proc/bin/1/env
   B.) cat /proc/1/environ
   C.) cat /proc/1/var/env
   D.) none of the mentioned

Answer: Option 'B'

cat /proc/1/environ

DigitalOcean Referral Badge

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: Option 'A'

major minor numbers of device files

DigitalOcean Referral Badge

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 these

Answer: Option 'C'

kernel modules can send the information to processes & process information can be accessed
 

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

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 these

Answer: Option 'A'

proc filesystem exists only as a reflection of the in-memory kernel data structure

DigitalOcean Referral Badge

6.

Proc files are

   A.) read-only files
   B.) read-write files
   C.) both read-write and read-only files
   D.) none of these

Answer: Option 'C'

both read-write and read-only files

DigitalOcean Referral Badge

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 these

Answer: Option 'A'

memory usages is always fluctuating

DigitalOcean Referral Badge

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 these

Answer: Option 'B'

stored in secondary memory

DigitalOcean Referral Badge

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 these

Answer: Option 'A'

Different network system compiled into the system
 

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

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 these

Answer: Option 'A'

change the hostname

DigitalOcean Referral Badge

Linux Proc Filesystem Questions & Answers – 4 Download Pdf

Recent Posts