Home>Article>Operation and Maintenance> What is the difference between linux and windows file systems
Difference: 1. The Linux file system is case-sensitive, while the Windows file system is not case-sensitive; 2. The Linux file path uses "/", while the Windows file path uses "\"; 3. Linux does not Lock exclusive access to the file, and Windows locks exclusive access to the file.
The operating environment of this tutorial: linux7.3&&windows10 system, Dell G3 computer.
If you start browsing the file system on your Linux computer, you will not find any Windows, program files, or user folders. (Although the /home/ directory is very similar to the Users folder.)
Linux directory structure not only uses different names for folders, it uses an entirely different layout. For example, on Windows, an application might store all of its files in C:\Program Files\Application. On Linux, its files will be split between multiple locations - its binaries in /usr/bin, its libraries in /usr/lib, and its configuration files in /etc/.
Case Sensitive
On Windows you cannot have a file named FILE and another file named FILE in the same folder. Windows file systems are not case sensitive, so they treat these names as the same file.
On Linux, the file system is case-sensitive. This means you can have files named file, File and FILE in the same folder. Each file will have different contents - Linux treats uppercase and lowercase letters as different characters.
File path
Windows uses backslashes, just like DOS. For example, the path to the user directory on Windows is:
C:\Users\username
On Linux, the path to the user home directory is:
/home/name
Windows displays partitions and devices with drive letters
Windows displays partitions with drive letters and equipment. Whether you have multiple hard drives, multiple partitions on the same hard drive, or attached removable devices, each file system is available under its own drive letter.
Linux does not have a drive letter. Instead, it makes other file systems accessible in any directory. (Windows can do this too, but that's not how it works.)
On Linux, everything is in / - the root directory. There are no files on the root directory because there are files other than C: on Windows. When you connect your device to your computer, it will be available under /media/. The contents of this directory show the contents of the mounted partition.
If you have multiple hard drives or hard drive partitions, you can mount them anywhere on the file system. For example, you can put your home directory on a separate partition by mounting another partition on /home. However, you can mount a partition anywhere - you can even mount it to /myBackupDrive.
Everything is a file
Just as every mounted file system is a directory under / (the root directory), everything on Linux is a file. For example, your first hard drive is represented by /dev/sda, your CD drive is available at /dev/cdrom, and your mouse is represented by /dev/mouse.
This phrase is actually a bit simplistic - not really a file on Linux. But knowing what this phrase means can help you understand how Linux works.
Deleting or modifying open files
On Linux and other UNIX-like operating systems, applications do not lock exclusive access to files as frequently as they do on Windows access. For example, let's say you are watching a video file in VLC in Windows. The credit is playing and you've finished watching it, so you try to delete it. You'll see an error message - You need to stop watching the file in VLC before you can delete, rename or do anything with it.
On Linux, it is usually possible to delete or modify video files while they are playing. You will not see an error message about the file being in use.
These differences also apply to other UNIX-like operating systems. However, there may be some differences - for example, Mac OS X is not case-sensitive. It is not case sensitive, just like Windows.
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What is the difference between linux and windows file systems. For more information, please follow other related articles on the PHP Chinese website!