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 on the service menu, select Properties. On the Properties page, you can view the hostname under Computer Name.
Remote desktop
You can connect to your VM by 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:
- Enter hostname in PowerShell, the command prompt, or an SSH terminal.
- Enter
ipconfig /all
in the command prompt (Windows only). - View the computer name in the system settings (Windows only).