Introduction
In this article, we will discuss how to change the default options for procmount in Ubuntu Linux. Procmount is a user-space daemon that provides a filesystem view of the process table. By default, it runs with some options, which might not be suitable for all use cases. In this tutorial, we will explain how to change these options.
Prerequisites
To follow this tutorial, you need:
- A Ubuntu 22.04 server hosted in the cloud.
- Root access to the server.
Current Situation
By default, procmount is mounted with the hidepid=2 option. This option hides the init process (PID 1) from the proc filesystem. However, in some cases, you might want to see the init process. In this tutorial, we will explain how to change this option.
Changing Default Options
To change the default options for procmount, you need to edit the /etc/fstab file.
Editing /etc/fstab
Open the /etc/fstab file using your favorite text editor:
sudo nano /etc/fstab
Find the line that starts with "proc" and edit the options field:
proc /proc proc defaults 0 0
Change it to:
proc /proc proc defaults,hidepid= 0 0
Replace
In this article, we explained how to change the default options for procmount in Ubuntu Linux. We showed you how to edit the /etc/fstab file to hide or display specific processes in the proc filesystem.