Users and developers require some way to identify by human readable names the many resources that comprise a ubiquitous computing environment. In addition, naming in such environments should work well despite ad hoc situations, and it should also provide context-based naming. This paper describes the Nonanchored Unified Naming (NUN) system, which satisfies these requirements. It is based on relative naming among resources and provides the ability to name arbitrary types of resources. By having resources themselves take part in naming, resources are able to contribute their specialized knowledge into the name resolution process, making context-dependent mapping of names to resources possible.