March 5th, 2024

In domain\user syntax, you can often use the period as an abbreviation for “this computer”

In general, the Windows syntax for a user in a domain on a system is domain\user or computername\user. A handy abbreviation is using a single period to represent the local computer name. For example, at the main logon screen, if you want to log in as a local account, you can type .\user instead of some monstrosity like DESKTOP-LWFX8QRP\user.

This is also useful when connecting remotely to another system either via Remote Desktop or the Visual Studio remote debugger: You can type .\user to provide a local account on the remote system.

Just a handy little typing-saver for today, that’s all.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

4 comments

Discussion is closed. Login to edit/delete existing comments.

  • David Hayman

    How is this implemented for non-domain things, such as IIS APPPOOL\Web App? Or conversely, how does it work for domain-like things that aren’t traditional domains, such as logging into Entra ID?

  • Vijay Anand E G · Edited

    The period (.) always represents the current context.

    • The current folder (in CLI)
    • Local computer
    • To refer SQL instance in the local machine like .\SQLEXPRESS
    • The User’s home directory (from the Windows Run dialog)
    • Joe Beans

      All of those period operators are separately implemented in their respective domains. It would be great if there were a universal resource tree, you know, like a “Shell Namespace”.

  • KM · Edited

    I always default to \user. This prevents me from the questioning whether the . is resolved on my machine or the remote machine.