![Hands-On Networking with Azure](https://wfqqreader-1252317822.image.myqcloud.com/cover/144/36700144/b_36700144.jpg)
上QQ阅读APP看书,第一时间看更新
Creating a virtual network using Azure CLI 2.0
To create a virtual network using Azure CLI 2.0, you have to follow these steps:
- Log in to your Azure account using the following command az login, you have to open the URL that pops up on the CLI, and then enter the following code:
![](https://epubservercos.yuewen.com/EC5107/19470396608902006/epubprivate/OEBPS/Images/04998b72-a6e4-4573-9a05-70f3b2ee8870.png?sign=1738883217-W7fwo4M3LTmegd4VZUvx3pAt30wDFFHj-0-5a0268857c9f846c0b7f5074256f0bf7)
Figure 1.19: Logging in to Azure via Azure CLI 2.0
- To create a new virtual network, you need to run the following command:
az network vnet create --name CLIVNet --resource-group PacktPub --location westeurope --address-prefix 192.168.0.0/16 --subnet-name s1 --subnet-prefix 192.168.1.0/24