Score:0

How partition works with files?

us flag

I'm new to ubuntu.. I didn't find a better title but that's the context :

now in windows for example if i created 5 partition it will take names like E:, C:, D: etc and every partiton will store the files i put in, but in linux i can't locate the partitions.. all my files, folders is in a slash, /etc, /home etc, and the partition are actually files in /dev/sda* and if i created a partition it will create a file like that, also i can't cat /dev/sda1 so can anyone explain how this works?

Thanks.

user535733 avatar
cn flag
See `man mount`, which explains it quite well. You must *mount* the *device* onto a directory (called a *mountpoint*) in your filesystem. Then you can see the files in that directory. Example: `sudo mount /dev/sda3 /mnt`, then `ls /mnt`
N0rbert avatar
zw flag
Does this answer your question? [What is a block device?](https://askubuntu.com/questions/190436/what-is-a-block-device)
Score:1
au flag

There are two ways that I know of.

Option 1:

lsblk

It is a simple utility that shows just disks and their partition.

Option 2:

sudo fdisk -l

fdisk is an utility that manipulates partition table. It is more comprehensible than lsblk and shows additional information such as type of filesystem, disk model, boot partition.

Score:0
in flag

Think of the file system in Linux as a system independent from the hardware. You have the root directory and all folders below it. But it isn't specified, where they are physically located. I. E. You can have the whole system on one partition. Except for the /tmp folder, which is located on another partition. Other example: If I have a lot of files and my own hard disk, I can mount it under /home, if I want to share with you or under /home/MaestroGlanz, if I don't. You can mount any partition at any point, that exists. If you want to see, where your partitions are mounted, you can run the command df. If you go into /etc/fstab, you can edit this structure.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.