The hostname identifies your virtual machine (VM) in the user interface and Azure operations. You first assign the hostname of a VM in the Virtual machine name field during the creation process in the Azure portal. After you create a VM, you can view and modify the hostname either through a remote connection or in the Azure portal.
View hostnames
You can view the hostname of your VM in a cloud service by using any of the following tools.
Azure portal
In the Azure portal, go to your VM, and select Properties from the left navigation. On the Properties page, you can view the hostname under Computer Name.
Remote Desktop
You can connect to your VM using a remote desktop tool like Remote Desktop (Windows), Windows PowerShell remoting (Windows), SSH (Linux and Windows) or Bastion (Azure portal). You can then view the hostname in a few ways:
- Type hostname in PowerShell, the command prompt, or SSH terminal.
- Type ipconfig /all in the command prompt (Windows only).
- View the computer name in the system settings (Windows only).