Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    linux filesystem


    can anybody clarify my doubts

    what is the difference between swap , tmpfs and sysfs filesystem??


    what is the use of /dev/pts and /dev/shm and ?

  2. #2
    Join Date
    May 2004
    arch linux
    Hello and welcome!

    Check this webpage for lots of info on the filesystem and various directories/folders under Linux:

    Linux Filesystem Hierarchy

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Those are not easy questions, but I'll do my best.

    As you know, the sum total of memory in use by programs on a unix system can exceed the physical memory on the server.
    Normally, when available physical memory runs low, small chunks of memory are "paged" out to swap space on a LRU (least recently used) basis. If memory runs really low, entire programs are moved to swap space (swapping).

    The tmpfs file system type doesn't have any physical disk component. The contents of the file system are stored in RAM. If you copy a lot of stuff into a tmpfs file system,
    then it will cause your system to page and perhaps swap (unless it's limited at mount time). Of course, when you reboot, all contents of a tmpfs file system are

    I use this for cases where I am creating and removing a lot of files (I run MailScanner and it moves stuff around all the time).

    sysfs is like procfs, but it was created to unclutter /proc (at least according to wikipedia). /proc gives the user a way to modify kernel parameters using what appear to be files.
    For example, if I want to turn on ip forwarding in my kernel, I can do it like this:
    # echo 1 >/proc/sys/net/ipv4/ip_forward

    /dev/pts gives a method of accessing the terminals of various shells - if you are ssh'd into a system or if you open a bunch of xterm windows, each one is allocated a different pseudo terminal (go ahead and type "tty" in a terminal window and it will tell you which pseudo terminal is allocated to that window).

    $ tty

    Now, open another window and do this:
    $ echo hello >/dev/pts/4

    You will see the word "hello" come out on that terminal.

    Hope this helps.

  4. $spacer_open
  5. #4
    Dear mahesh,

    1. Swap - it is extended memory of physical memory, when the physical memory exceeds from its limit, at that time this memory will be used to run the application or machine

    2.tmpfs - it is one type of filesystem. After you mount this using /dev/fstab, some memory from ram will be allocated for system running. But it can use only allocated memory, if the memory exceeds, system will struct

    3. sysfs - It is also on the filesystem type. when kernel extracts, then motherboard details will be placed under this directory. Just take a look of this directory and let you know yourself

    4./dev/pts - it is a very importent device entry, because it is only having the console entries /dev/pts/pty..tty0

Posting Permissions

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