{"id":1340,"date":"2025-10-23T04:06:46","date_gmt":"2025-10-23T04:06:46","guid":{"rendered":"https:\/\/www.woodcentral.com\/-\/peter\/?p=1340"},"modified":"2026-06-05T09:47:51","modified_gmt":"2026-06-05T09:47:51","slug":"comparing-linux-and-windows-file-structures","status":"publish","type":"post","link":"https:\/\/www.woodcentral.com\/-\/peter\/comparing-linux-and-windows-file-structures\/","title":{"rendered":"Comparing Linux and Windows file structures"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\uddc2 1. Drives and File Systems<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Windows<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows assigns each <strong>drive or partition a letter<\/strong>, such as:\n<ul class=\"wp-block-list\">\n<li><code>C:<\/code> \u2192 the main system drive<\/li>\n\n\n\n<li><code>D:<\/code> \u2192 a second hard drive or DVD drive<\/li>\n\n\n\n<li><code>E:<\/code> \u2192 a USB drive, etc.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Each drive has its <strong>own separate root directory<\/strong>, e.g.:\n<ul class=\"wp-block-list\">\n<li><code>C:\\Windows<\/code><\/li>\n\n\n\n<li><code>D:\\Music<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So in Windows, the letter <strong>defines a separate file tree<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Linux<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linux does <strong>not<\/strong> use drive letters.<\/li>\n\n\n\n<li>Instead, it uses a <strong>single unified file hierarchy<\/strong>, starting from a single root directory: <code>\/<\/code> Everything\u2014no matter which drive or partition it comes from\u2014is placed <strong>somewhere inside this tree<\/strong>.<\/li>\n\n\n\n<li>Other drives or partitions are <strong>mounted<\/strong> into this hierarchy at specific locations called <strong>mount points<\/strong>.<\/li>\n\n\n\n<li>Examples:\n<ul class=\"wp-block-list\">\n<li><code>\/ \u2190 root filesystem (usually on the main drive)<\/code><\/li>\n\n\n\n<li><code>\/home \u2190 might be on another partition<\/code><\/li>\n\n\n\n<li><code>\/mnt\/usb \u2190 a mounted USB stick<\/code><\/li>\n\n\n\n<li><code>\/media\/cdrom \u2190 a mounted CD-ROM<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So when you mount a new drive, you \u201cattach\u201d it somewhere in the directory tree, rather than giving it a letter.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd20 2. File and Directory Names (Case Sensitivity)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Windows<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Case-insensitive<\/strong> (mostly):\n<ul class=\"wp-block-list\">\n<li><code>Document.txt<\/code>, <code>document.txt<\/code>, and <code>DOCUMENT.TXT<\/code> are considered the <strong>same file<\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Windows file systems (NTFS, FAT32) preserve case, but the OS generally doesn\u2019t distinguish it.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Linux<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Case-sensitive<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>Document.txt<\/code>, <code>document.txt<\/code>, and <code>DOCUMENT.TXT<\/code> are <strong>different files<\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>This applies everywhere, including filenames, directory names, and commands.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/Home   # Error if the directory is actually \/home<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\udde9 3. File Paths and Separators<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Concept<\/th><th>Windows<\/th><th>Linux<\/th><\/tr><\/thead><tbody><tr><td>Path separator<\/td><td>Backslash <code>\\<\/code><\/td><td>Forward slash <code>\/<\/code><\/td><\/tr><tr><td>Root directory<\/td><td>Drive letter + <code>:\\<\/code> (e.g. <code>C:\\<\/code>)<\/td><td>Single <code>\/<\/code><\/td><\/tr><tr><td>Example path<\/td><td><code>C:\\Users\\Peter\\Documents<\/code><\/td><td><code>\/home\/peter\/documents<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Linux paths look simpler, and <code>\/<\/code> is consistent across all systems (including macOS).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd12 4. Permissions and Ownership<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linux uses <strong>ownership and permissions<\/strong> (user\/group\/other + read\/write\/execute flags).<br>Example: <code>-rw-r--r-- user group file.txt<\/code><\/li>\n\n\n\n<li>Windows uses <strong>Access Control Lists (ACLs)<\/strong>, which are more complex but conceptually similar.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2699\ufe0f 5. Drives in Practice<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To see drives in Linux:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This shows block devices like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sda\n\u251c\u2500sda1\n\u251c\u2500sda2\nsdb\n\u2514\u2500sdb1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These represent physical devices (<code>\/dev\/sda<\/code>, <code>\/dev\/sdb<\/code>) and their partitions (<code>\/dev\/sda1<\/code>, etc.).<br>You mount them to directories like <code>\/mnt<\/code> or <code>\/media<\/code> to access their contents.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0d Summary<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Windows<\/th><th>Linux<\/th><\/tr><\/thead><tbody><tr><td>Drives<\/td><td>Identified by letters (<code>C:<\/code>, <code>D:<\/code>)<\/td><td>Mounted into <code>\/<\/code> hierarchy<\/td><\/tr><tr><td>Root<\/td><td><code>C:\\<\/code> (or other letter)<\/td><td><code>\/<\/code><\/td><\/tr><tr><td>Case sensitivity<\/td><td>No<\/td><td>Yes<\/td><\/tr><tr><td>Path separator<\/td><td><code>\\<\/code><\/td><td><code>\/<\/code><\/td><\/tr><tr><td>Drive mounting<\/td><td>Automatic letter assignment<\/td><td>Manual or automatic mount point<\/td><\/tr><tr><td>File permissions<\/td><td>ACLs<\/td><td>rwx (user\/group\/other)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\uddc2 1. Drives and File Systems Windows So in Windows, the letter defines a separate file tree. Linux So when you mount a new drive, you \u201cattach\u201d it somewhere in the directory tree, rather than giving it a letter. \ud83d\udd20 2. File and Directory Names (Case Sensitivity) Windows Linux Example: \ud83e\udde9 3. File Paths and &#8230; <a title=\"Comparing Linux and Windows file structures\" class=\"read-more\" href=\"https:\/\/www.woodcentral.com\/-\/peter\/comparing-linux-and-windows-file-structures\/\" aria-label=\"Read more about Comparing Linux and Windows file structures\">Read more<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,2],"tags":[],"class_list":["post-1340","post","type-post","status-publish","format-standard","hentry","category-linux","category-technology"],"_links":{"self":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/posts\/1340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/comments?post=1340"}],"version-history":[{"count":0,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/posts\/1340\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/media?parent=1340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/categories?post=1340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.woodcentral.com\/-\/peter\/wp-json\/wp\/v2\/tags?post=1340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}