Windows drive letters are not limited to A-Z
ryanliptak.com497 points by LorenDB 3 days ago
497 points by LorenDB 3 days ago
The NT paths are how the object manager refers to things. For example the registry hive HKEY_LOCAL_MACHINE is an alias for \Registry\Machine
https://learn.microsoft.com/en-us/windows-hardware/drivers/k...
In this way, NT is similar to Unix in that many things are just files part of one global VFS layout (the object manager name space).
Paths that start with drive letters are called a "DOSPath" because they only exist for DOS compatibility. But unfortunately, even in kernel mode, different sub systems might still refer to a DOSPath.
Powershell also exposes various things as "drives", pretty sure you could create your own custom drive as well for your custom app. For example, by default there is the 'hklm:\' drive path:
https://learn.microsoft.com/en-us/powershell/scripting/sampl...
Get-PSDrive/New-PSDrive
You can't access certificates in linux/bash as a file path for example, but you can in powershell/windows.
I highly recommend getting the NtObjectManager powershell module and exploring about:
https://github.com/googleprojectzero/sandbox-attacksurface-a...
ls NtObject:\
It's baffling than after 30 years, Windows is still stuck in a weird directory naming structure inherited from the 80's that no longer make sense when nobody has floppy drives.
> Windows is still stuck in a weird directory naming structure inherited from the 80's that no longer make sense when nobody has floppy drives.
I think you could make this same statement about *nix, except it's 10 years _worse_ (1970s). I strongly prefer the fhs over whatever MS thinks it's doing, but let's not pretend that the fhs isn't a pile of cruft (/usr/bin vs /bin, /etc for config, /media vs /mnt, etc)
Unix starts at root, which is how nature intended. It does not change characteristics based on media - you can mount a floppy at root if you want.
Why get upset over /media vs /mnt? You do you, I know I do.
For example The Step CA docs encourage using /etc/step-ca/ (https://smallstep.com/docs/step-ca/certificate-authority-ser...) for configuration for their product. Normally I would agree but as I am manually installing this thing myself and not following any of the usual docs, I've gone for /srv/step-ca.
I think we get enough direction from the ... "standards" ... for Unix file system layouts that any reasonably incompetent admin can find out which one is being mildly abused today and get a job done. On Windows ... good luck. I've been a sysadmin for both platforms for roughly 30 years and Windows is even odder than Unix.
> Unix starts at root, which is how nature intended. It does not change characteristics based on media - you can mount a floppy at root if you want.
Why is the root of one of my drives `/` while the roots of my other drives are subdirectories of that first drive?
Thinking of it in terms of namespaces might help; it's not that the drive is special, it's that there's a view that starts from / and one disk filesystem happens to be dropped there and others are dropped elsewhere; with something like initramfs there aren't any drives on /, just a chunk of ram, though you usually pivot to a physical one later (many linux-based embedded systems don't because your one "drive" is an SD card that can't handle real use, so you just keep the "skeleton" in memory and drop various bits of eMMC or SD or whatever into the tree as-convenient.)
I do get it, I just don't think that the UNIX way is necessarily more natural than the Windows way.
Because you (or your distro) configured it like that. You don’t have to do it that way.
Only the root of the root filesystem is /
The point is that any filesystem can be chosen as the OS’s root.
The root of all other filesystems - there could be multiple per drive - is where you tell the filesystem to be mounted, or in your automounter’s special directory, usually /run/media, where it makes a unique serial or device path.
* clarity
There is more pliability in the Linux ecosystem to change some of these things.
And anyway, there has to be a naming scheme; the naming scheme is abstracted from the storage scheme.
It's not the case that your /var and /usr are different drives; though it can be in a given installation.
All of those are optional restrictions, not mandatory. On Windows, it's (practically) mandatory.
Maybe some Windows wizards could get around the mandatory restrictions, but an average Linux user can get around the optional ones.
Streaming as defacto metaphor for file access goes back to tape drives. Random Access patterns make more sense with today’s media yet we’re all still fscanf-ing
Of course there are alternatives but the resource-as-stream metaphor is so ubiquitous in Unix, it’s hard to avoid.
Drive letters are just /mnt, you can get around that, even with GUI.
So why a default Windows install still uses and shows C:?
Because A is reserved for floppy drive, and B - for zip drive.
No, A: and B: were for floppies, when having 2 floppy readers was the norm.
But anyway ignoring the sarcasm my question was implying: if this is totally customizable in Windows, why Microsoft still ships C: (or whatever other letter) as the default name for the first user partition? Show it to legacy programs with hardcoded values to maintain compatibility, but at least in Explorer and MS controlled software, use some more modern/legible name.
A: and B: were both for floppies, dual floppy systems were around and common, both with and without hard disks, long before Zip disks existed, and Zip disks came around far too late (1994!) to influence the MS-DOS naming standard.
Drive B was always a floppy disk drive.
Zip disks presented themselves with drive letters higher than B (usually D: assuming you had a single hard disk). However, some (all?) Zip drives could also accept legacy 3.5" floppies, and those would show up as B.
You're confused and you're thinking of the LS-120 SuperDisk. On some machines, it could be setup to appear as A: or B: when a 3.5" floppy was inserted.
Zip drives were never compatible with 3.5" floppies, and always were enumerated using the first available external storage letter (ie, D: in typical machines).