Results 1 to 7 of 7

Thread: how is /proc mounted by default?

  1. #1
    Join Date
    Aug 2012
    Beans
    3

    how is /proc mounted by default?

    I want to change my mount configuration for /proc to use hidepid and a specified gid mount option.
    I guess I could just write that in fstab and be done with it.

    However I wondered: who mounted /proc in the first place, with what exact options?

    There appears to be no systemd mount unit responsible.
    The "with what exact options" bit pertains to that mount does not include default options.

    I could not find any information on this, although it might just be that I'm bad at searching.
    Best Wishes
    Last edited by apla; May 16th, 2020 at 05:32 PM.

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,234
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: how is /dev/proc mounted by default?

    What Ubuntu is this? There's no /dev/proc in my Xubuntu 19.10.

  3. #3
    Join Date
    Aug 2012
    Beans
    3

    Re: how is /dev/proc mounted by default?

    Good point, I was confused and talking about /proc. Been reading a lot about pseudo-devicefiles and must have unconsciously warped proc to be a pseudo-device in my head, because folks tend to refer to it as a pseudo-filesystem.

    That also explains why I had a hard time finding information on it. According to the man page it is usually "mounted by the system", I figure that means the kernel. Thanks for your help!
    Last edited by apla; May 16th, 2020 at 05:36 PM.

  4. #4
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: how is /proc mounted by default?

    /proc is a virtual file system, or a pseudo-file system that doesn't contain any real files, but is maintained by the kernel to provide information about run-time information like memory used, processor information, etc.

    If you were to look at /proc, you'd see that with a few exceptions all the file sizes are 0. You can use the command line to get instantaneous information from some of the "files" in /proc, like:

    Code:
     xxxx@xxxx:~$ uptime
     12:40:03 up 179 days, 12:39,  1 user,  load average: 0.00, 0.01, 0.05
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  5. #5
    Join Date
    Aug 2012
    Beans
    3

    Re: how is /proc mounted by default?

    This answer hardly relates to my question. In fact, for the question of who mounted it it is fully irrelevant - both, devices and file systems, are mounted at some point by someone or something.
    Last edited by apla; May 16th, 2020 at 06:19 PM.

  6. #6
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: how is /proc mounted by default?

    It is entirely relevant. It is maintained by the kernel at runtime. That is "who mounted it", as you suggested.

    Your query may have been solved as far as your concerns, but others might read this thread and not have any idea what you learned in your research.
    Last edited by QIII; May 16th, 2020 at 06:44 PM.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  7. #7
    Join Date
    Dec 2014
    Beans
    1,510

    Re: how is /proc mounted by default?

    Actually /proc, /sys/, /run, /dev, /tmp and some others are mounted by systemd very early in the boot process. See https://www.freedesktop.org/wiki/Sof...PIFileSystems/ for details. You can change mount options for these by putting lines for them in /etc/fstab, /lib/systemd/system/systemd-remount-fs.service will then remount them with these option.

    Holger

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •