Interview Questions And Answers

Q: - Explain /proc filesystem?

/proc is a virtual filesystem that provides detailed information about Linux kernel, hardware’s and running processes. Files under /proc directory named as Virtual files. Because /proc contains virtual files that’s why it is called virtual file system.
These virtual files have unique qualities. Most of them are listed as zero bytes in size. Virtual files such as /proc/interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system's hardware. Others, like the /proc/filesystems file and the /proc/sys/ directory provide system configuration information and interfaces.

Submitted By:-Parveen Kumar            Email-ID: - parveen.antil@gmail.com

Q: - Can we change files parameters placed under /proc directory?

Yes
To change the value of a virtual file, use the echo command and a greater than symbol (>) to redirect the new value to the file. For example, to change the hostname on the fly, type:

echo www.nextstep4it.com > /proc/sys/kernel/hostname

Submitted By:- Parveen Kumar            Email-ID: -parveen.antil@gmail.com

Q: - What is the use of sysctl command?

The /sbin/sysctl command is used to view, set, and automate kernel settings in the /proc/sys/ directory.

Submitted By:- Parveen Kumar            Email-ID: - parveen.antil@gmail.com

 

1
2