• Squibbles@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 days ago

    Cool though still a bit confusing, like what’s a “Device file”? Also so many of those are so similar in use like /usr and /sbin. Why would one be used over another?

    • SapientLasagna@lemmy.ca
      link
      fedilink
      English
      arrow-up
      3
      ·
      10 days ago

      /sbin is like /bin, but for system administrative type commands. /usr holds all the other software that isn’t critical to get the system up and running.

      A device file is a special file that’s like a pointer to a piece of actual hardware, like a serial port or a hard drive. /dev also has some non-hardware special files like /dev/zero. When you read from that one, you get an endless stream of zeros. Or /dev/null, that discards any data that’s written to it.