The Interix single-rooted file system

Interix has a single-rooted file system that supports both hard and symbolic links. The single-rooted system is mapped to a multi-drive Windows file system.

The Interix root directory (/) is mapped to the Windows Services for UNIX installation directory, which is typically C:\SFU. Under the root directory are typical UNIX directories, such as /usr, /bin, dev, and /etc. In addition, there are also other, less familiar Interix-specific directories, such as /net, as well as directories that are part of the Windows Services for UNIX installation, such as admin.

You can access the drive letters mounted on your Windows system through the special /dev/fs/A through /dev/fs/Z directories. For example, to change the current directory to the root of the C: drive, enter cd /dev/fs/C. There is no cycle in the file system because, although the Interix root directory (/) contains these special entries, the Windows Services for UNIX installation directory does not. In addition, if Windows Services for UNIX is installed as an upgrade for Interix 2.2, symbolic links are also created in the root directory that represent the letters of the local drives which exist at that time. For example, if drives A:, C:, and D: exist on the computer when Windows Services for UNIX is installed, the symbolic links /A, /C, and /D are created. You can use these symbolic links in UNIX-style paths as you would /dev/fs/driveletter. For example, to set the current directory to C:\Windows, you can use either:

These symbolic links are provided to support scripts developed to run with previous versions of Interix.

Unlike the Windows command prompt, Interix does not maintain current directories for each drive. The Interix cd(1) sets the current directory to the specified directory, even if it is on a drive that is different from the current drive. The following command-and-response sample shows how the cd command works in Interix:

C:\>cd
C:\
C:\>cd d:\winnt
C:\>cd
C:\
C:\>cd d:
D:\WINNT

Note how the cd command works in Interix:

$ pwd
/dev/fs/C
$ cd /dev/fs/D/WINNT
$ pwd
/dev/fs/D/WINNT

Symbolic links are not created for devices that do not exist when Windows Services for UNIX is installed (such as removable drives). If you want to use symbolic links to access these drives, you must create them yourself. For more information on creating symbolic links, see ln(1).

Older versions of Interix required two slashes before a drive letter; for example, cd //C. Now you can use a single or double forward slash (/) before the drive letter. The commands cd /C and cd //C function similarly. The Interix subsystem remains compatible with scripts written for older releases because it ignores any additional slashes following the first slash. The Interix subsystem will actually accept any number of forward slashes, but they are unnecessary. For example, cd ////common///lib will change the present working directory to /common/lib. The recommended usage is one slash.

You can use a new virtual directory, /net, to access remote file systems by using names that are similar to Windows Universal Naming Convention (UNC) names. The UNC standard syntax is \\hostname\sharename; the Interix syntax is /net/hostname/sharename. For example, UNC name \\Saturn\usr\someone is /net/Saturn/usr/someone.

The systems and shares that are accessible through /net depend on the Windows networking at your site. If you have Client for NFS installed, the host names of computers that have export network file system (NFS) shares will be visible in /net.

The Interix file system includes /proc. For more information, see proc(1).