Universal Naming Convention (UNC)

An Explanation of UNC Path Names in Windows

Mother and son looking at laptop
Michael Heffernan/Taxi/Getty Images

Universal Naming Convention (UNC) is the naming system used in Microsoft Windows for accessing things like shared network folders and printers on a local area network (LAN).

Support for working with UNC paths in Unix and other operating systems can also be set up using cross-platform file sharing technologies like Samba.

Note: UNC is sometimes called Uniform Naming Convention. It also stands forĀ Universal Network Controller, which has to do with network device drivers.

UNC Name Syntax

UNC names identify network resources using a specific notation. These names consist of three parts - a host device name, a share name, and an optional file path.

These three elements are combined using backslashes:

\\host-name\share-name\file_path

The "host-name" Section

The host-name portion of a UNC name can consist of either a network name string set by an administrator and maintained by a network naming service like DNS or WINS, or by an IP address

These host names normally refer to either a Windows PC or a Windows-compatible printer.

The "share-name" Section

The share-name portion of a UNC name references a label created by an administrator or, in some cases, within the operating system.

In most versions of Microsoft Windows, for example, the built-in share name admin$ refers to the root directory of the operating system installation (usually C:\Windows but sometimes C:\\WINDOWS or C:\\WINNT).

UNC paths do not include Windows driver letters, only a label that may reference a particular drive.

The "file_path" Section

The file_path portion of a UNC name references a local subdirectory beneath the share point. This part of the path is optional.

When no file_path is specified, the UNC path simply points to the top level folder of the share.

The file_path must be absolute. Relative paths are not allowed.

How to Work With UNC Paths

Consider a standard Windows PC or Windows-compatible printer named teela. In addition to the built-in admin$ share, say you have also defined a share point called temp that is located at C:\temp.

Using UNC names, this is how you would connect to folders on teela:

\\teela\admin$ (to reach C:\WINNT)
\\teela\admin$\system32 (to reach C:\WINNT\system32)
\\teela\temp (to reach C:\temp)

New UNC shares can be created through Windows Explorer. Just right-click a folder and choose one of the Share menu options to assign it a share name.

What About Other Backslashes in Windows?

Microsoft uses other backslashes throughout Windows too, like in the local file system. One example is C:\Users\Administrator\Downloads to show the path to the "Downloads" folder in the "Administrator" user account.

You might also see backslashes when working with command-line commands, such as:

net use h: * \\computer\files

Alternatives to UNC

Using Windows Explorer or the DOS command prompt, and with proper security credentials, you can map network drives and remotely access folders on a computer via its drive letter rather than a UNC path

Microsoft established UNC for Windows after Unix systems had defined a different path name convention. Unix network paths (including Unix and Linux related operating systems like macOS and Android) use forward slashes instead of backslashes.