Linux – Is /dev/sda1 a directory

arch linuxlinux

I understand that "sda1" refers to my first hard-drive and the first partition on it but does Linux treat it as a directory or are the backslashes used just for our understanding that the drive is a device the system has access to? Also why do people in the an Arch installation usually mount /dev/sda1 to /mnt? Isn't /dev/sda1 supposed to be the root folder of the OS. Please correct me if I have the wrong impression but I am quite new to Linux fundamentals.

EDIT: Actually I think I understood what is happening. The /mnt belongs to the temporary OS running on the installation disk whereas after installation the /dev/sda1 will become the root folder. Please correct me if I am wrong.

Best Answer

Actually /dev/sda1 is a block device and when it is mounted (depending on the /etc/fstab mounting map) it shows under a directory (if you want to call it like that) - actually everything in Linux/UNIX is file or directory.

http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/dev.html

/mnt is usually a directory that you can use to mount other block devices, but this is up to your choice of action. You can always create new directories in which you can mount block devices, like your external hard drive or flash drive.

Related Question